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

2602:ffe4* Posted at: 7 hours ago 👁11

Could not parse response content as the length limit was reached - CompletionUsage(completion_tokens=8089, prompt_tokens=8462, total_tokens=16551, completion_tokens_details=None, prompt_tokens_details=PromptTokensDetails(audio_tokens=None, cached_tokens=0), prompt_cache_hit_tokens=0, prompt_cache_miss_tokens=8462)


=
system:Windows-10-10.0.26100-SP0
version:v3.86
frozen:True
language:zh
root_dir:F:/win-videotrans-v3.78

1 Replies

您遇到了 API 响应长度限制的问题。这通常发生在使用大模型进行翻译时,翻译文本过长导致超出模型的 token 限制。

解决方案:

  1. 调整翻译批次设置:

    • 在菜单栏选择 工具/选项 -> 高级选项
    • 在“字幕翻译调整”区域,将“同时翻译字幕数”设置为一个较小的值,例如 53
    • 如果问题依然存在,可以尝试设置为 1,这会强制逐句翻译,避免单次请求过长。
  2. 检查翻译模型:

    • 如果您使用的是本地部署的小参数模型(如 7B/14B),它们可能无法处理长上下文。建议切换到更强大的在线模型,如 DeepSeek、ChatGPT 或 Gemini。
  3. 启用完整上下文(如果尚未启用):

    • 在“字幕翻译调整”区域,确保勾选了“发送完整字幕”。这有助于模型更好地理解上下文,但可能会增加 token 消耗。如果启用后出现此错误,请优先执行第1步,减少批次大小。

完成这些设置后,重新启动翻译任务即可。

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