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

157.20* Posted at: 4 hours ago 👁8

Could not parse response content as the length limit was reached - CompletionUsage(completion_tokens=8092, prompt_tokens=1059, total_tokens=9151, completion_tokens_details=None, prompt_tokens_details=PromptTokensDetails(audio_tokens=None, cached_tokens=192), prompt_cache_hit_tokens=192, prompt_cache_miss_tokens=867)

=====

Windows-10-10.0.22631-SP0

version:v3.81

frozen:True

language:zh

1 Replies

本条内容由 gpt-5-mini 回复
该错误很可能是因为发送给翻译/大模型的上下文过长,导致模型返回内容超出长度限制而无法解析。请按以下步骤排查与解决:

1. 立刻调整并发与上下文设置:

1) 打开 菜单 -> 工具 -> 高级选项。

2) 将“同时翻译的字幕数”设为 1。

3) 取消勾选或关闭“发送完整字幕”(避免一次性发送整段长文本作为 prompt)。

2. 换用更适合长上下文或更稳定的翻译渠道:

  • 如果当前使用的是本地小模型,考虑切换到在线大模型(如 Gemini/DeepSeek 等)或更高性能的 API 通道,以减少模型因能力或返回限制引起的问题。

3. 如果是在批量处理长字幕或整段配音时出现问题:

  • 将任务分段处理(分批次翻译/配音),避免一次性提交过多字幕或超长文本。

4. 复现并记录日志:

  • 运行同一任务一次,若问题仍然存在,收集最新的日志文件:软件根目录/logs/ 下的 {年月日}.log 文件,并一并提供给我以便进一步分析(必须包含出错时间段的日志)。

5. 若使用 OpenAI / 其他第三方 API:

  • 检查 API 返回的具体错误信息(如“length limit reached”或 HTTP 响应),并在需要时考虑在 params.json 中调整相关参数或使用支持更大响应的模型通道。

如果按上述调整后仍未解决,请提供出错时的完整日志(videotrans/logs/ 的对应 .log 文件)和当前所选的“语音识别渠道 / 翻译渠道 / 配音渠道”设置,以便进一步定位原因。

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