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

134.195* Posted at: 4 hours ago 👁10

Could not parse response content as the length limit was reached - CompletionUsage(completion_tokens=4096, prompt_tokens=3317, total_tokens=7413, completion_tokens_details=None, prompt_tokens_details=None)


=
system:Windows-10-10.0.26200-SP0
version:v3.97
frozen:True
language:zh
root_dir:D:/win-pyvideotrans-v3.97-226

1 Replies

这是由于AI模型在生成回复时达到了最大长度限制,导致无法完整解析响应内容。这通常发生在处理长视频或复杂任务时,AI模型返回的文本过长。

解决方案:

  1. 在“菜单-工具-高级选项-字幕翻译调整”中,将“AI翻译渠道每批字幕行数”从默认值减少到更小的数值(例如从100改为20或10)。
  2. 取消勾选“AI翻译附带完整原字幕”选项,以减少每次发送给AI的上下文长度。
  3. 如果使用本地大模型(如Ollama),请确保模型支持足够长的上下文,或考虑升级到更大上下文的模型。
  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.

Related resource

Similar issues already exist