#2549 Could not parse response content as the length limit was reached - CompletionUsage(completion_tokens=8192, prompt_tokens

183.187* Posted at: 2 days ago 👁12

Could not parse response content as the length limit was reached - CompletionUsage(completion_tokens=8192, prompt_tokens=1598, total_tokens=9790, completion_tokens_details=None, prompt_tokens_details=PromptTokensDetails(audio_tokens=None, cached_tokens=1472), prompt_cache_hit_tokens=1472, prompt_cache_miss_tokens=126)


=
system:Windows-10-10.0.19045-SP0
version:v3.90
frozen:True
language:zh
root_dir:D:/软件/配音

1 Replies

您遇到的错误信息 Could not parse response content as the length limit was reached 表明在使用 OpenAI 或兼容 OpenAI API 的模型(如 DeepSeek、智谱AI等)进行翻译时,AI 模型的回复内容过长,超出了软件预设的解析长度限制。

核心原因是:您当前翻译的单个批次字幕内容过多,导致 AI 模型生成的回复过长。

请按以下步骤解决:

  1. 降低单次翻译量(最有效方法):

    • 在软件主界面,点击 “设置更多参数”
    • 找到 “每批字幕行数” 选项,将数值调小。建议先从 510 开始尝试。
    • 如果问题依旧,可以尝试设置为 1,即逐行翻译,虽然速度会变慢,但能确保成功。
  2. (可选)调整 AI 模型参数:

    • 如果您使用的是在线 AI 模型(如 DeepSeek),请确保在“翻译设置”中为该模型配置的 max_token 参数足够大(例如 4096 或 8192)。但请注意,此错误通常是软件解析限制,而非模型本身的 token 限制。
  3. 检查字幕文件:

    • 如果字幕文件本身某一段落(两句字幕之间的间隔)文本量巨大,也可能触发此问题。您可以在“字幕编辑”界面手动拆分过长的句子。

操作路径总结:
主界面 -> “设置更多参数” -> 调小 “每批字幕行数”

执行此操作后,软件会将字幕分成更小的批次发送给 AI 翻译,从而避免生成过长的回复内容,解决此错误。

请查看更多参考文档:

Post Your Reply
Open source and free maintenance is not easy. If this project is helpful to you, please consider making a small donation to help the project continue to maintain and update.

Donate: https://ko-fi.com/jianchang512

Similar issues already exist

Trending Questions