#2622 Could not parse response content as the length limit was reached - CompletionUsage(completion_tokens=16384, prompt_token

223.73* Posted at: 7 hours ago 👁12

Could not parse response content as the length limit was reached - CompletionUsage(completion_tokens=16384, prompt_tokens=1286, total_tokens=17670, completion_tokens_details=None, prompt_tokens_details=None)


=
system:Windows-10-10.0.22621-SP0
version:v3.91
frozen:True
language:zh
root_dir:A:/BaiduNetdiskDownload/FY/win-pyvideotrans-v3.91_20251220_225815

1 Replies

您遇到的错误是 OpenAI API 的 token 限制错误,表明翻译请求超出了模型的最大上下文长度(通常是 16K tokens)。请按以下步骤解决:

  1. 减少单次翻译量:在软件主界面,点击右下角的 “设置更多参数”,找到 “每批字幕行数” 选项,将其数值调小(例如从 20 改为 5 或 10)。
  2. 开启完整上下文:在“设置更多参数”中,确保 “发送完整字幕” 选项是未勾选状态。如果勾选,会发送整个字幕文件,极易超出 token 限制。
  3. 使用串行处理:如果是在批量处理多个视频,请在 菜单 -> 工具 -> 高级选项 中,勾选 “批量翻译时强制串行”,避免并发请求加剧问题。
  4. 检查字幕内容:如果字幕文件本身异常冗长(例如单句字幕包含数百字),请先用记事本等工具检查并手动拆分过长的句子。

完成以上调整后,重新尝试翻译任务。

请查看更多参考文档:

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