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

183.187* Posted at: 16 hours ago 👁11

Could not parse response content as the length limit was reached - CompletionUsage(completion_tokens=8192, prompt_tokens=1594, total_tokens=9786, completion_tokens_details=None, prompt_tokens_details=PromptTokensDetails(audio_tokens=None, cached_tokens=768), prompt_cache_hit_tokens=768, prompt_cache_miss_tokens=826)


=
system:Windows-10-10.0.19045-SP0
version:v3.91
frozen:True
language:zh
root_dir:D:/

1 Replies

这个错误提示表明您在使用 OpenAI 的 API 进行翻译时,返回的翻译结果内容过长,超出了模型的单次输出限制(8192个tokens)。这通常发生在翻译长视频或字幕文件时。

核心解决方法:减少单次发送给AI翻译的字幕行数。

请按以下步骤操作:

  1. 调整翻译批次设置:

    • 在软件主界面,点击右下角的 “设置更多参数”
    • 在弹出的窗口中,找到 “每批字幕行数” 选项。
    • 将数值调小,例如从默认的 50 改为 2010。这能确保每次发送给AI的文本量在限制之内。
  2. (可选)调整高级选项:

    • 如果上述方法无效,或想进行更精细的控制,请进入菜单栏的 工具 -> 高级选项
    • “字幕翻译调整” 区域,找到 “同时翻译字幕数” 选项,同样将其调小(例如改为 510)。

原理说明:
软件会将字幕分批发送给翻译接口。当某批字幕的原文+译文总长度超过模型限制时,就会触发此错误。减少每批的行数可以有效降低单次请求的文本量。

如果调整后问题依旧,请检查您的视频字幕是否异常冗长(例如单句字幕包含数百字)。您也可以尝试更换为其他翻译渠道(如Google、DeepSeek等)进行对比。

请查看更多参考文档:

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