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

223.73* Posted at: 1 month ago 👁94

Could not parse response content as the length limit was reached - CompletionUsage(completion_tokens=8192, prompt_tokens=538, total_tokens=8730, 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

此错误表明您使用的AI翻译渠道(很可能是OpenAI或类似大模型)因返回内容过长而中断。这通常发生在翻译长视频或字幕行数过多时,模型达到了其最大输出令牌(token)限制。

核心解决方案是减少单次发送给AI模型翻译的字幕行数。

请按以下步骤操作:

  1. 立即操作: 在软件主界面,点击右下角的 “设置更多参数”
  2. 调整关键参数:

    • 找到 “每批字幕行数”“同时翻译字幕数” 选项。
    • 将数值大幅调低,例如从默认的 50 改为 105
  3. 启用上下文(可选但推荐): 确保勾选了 “发送完整字幕” 选项,这有助于AI理解上下文,提高翻译质量,但也会增加token消耗。如果调低行数后仍报错,可以暂时取消勾选此选项。
  4. 重新处理: 返回主界面,务必勾选“清理已生成”,然后重新开始翻译任务。

如果上述方法无效,或您希望进行更精细的控制:

  • 进入 菜单 -> 工具 -> 高级选项
  • “字幕翻译调整” 区域,进一步调整 “每批字幕行数”
  • 您也可以尝试增加 “翻译后暂停秒” 的值(例如设为 3),以降低请求频率。

原理说明: 此错误 completion_tokens=8192 表明模型单次回复达到了最大限制(通常是8192个token)。通过减少单批次翻译的字幕内容,可以避免触发此限制。

请查看更多参考文档:

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.

Related resource

Similar issues already exist