#4887 {'model': 'gpt-5', 'frequency_penalty': 0, 'timeout': 300, 'max_completion_tokens': 8192, 'temperature': 0.2}

2401:e180* Posted at: 2 hours ago

Error code: 400 - {'error': {'message': "Unsupported value: 'temperature' does not support 0.2 with this model. Only the default (1) value is supported.", 'type': 'invalid_request_error', 'param': 'temperature', 'code': 'unsupported_value'}}
{'model': 'gpt-5', 'frequency_penalty': 0, 'timeout': 300, 'max_completion_tokens': 8192, 'temperature': 0.2}:Traceback (most recent call last):
File "videotrans\translator\_openaicompat.py", line 75, in _item_task
File "openai\_utils\_utils.py", line 298, in wrapper
File "openai\resources\chat\completions\completions.py", line 1215, in create
File "openai\_base_client.py", line 1332, in post
File "openai\_base_client.py", line 1105, in request
openai.BadRequestError: Error code: 400 - {'error': {'message': "Unsupported value: 'temperature' does not support 0.2 with this model. Only the default (1) value is supported.", 'type': 'invalid_request_error', 'param': 'temperature', 'code': 'unsupported_value'}}

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "videotrans\util\TestSrtTrans.py", line 19, in run
File "videotrans\translator\__init__.py", line 858, in run
File "videotrans\translator\_base.py", line 72, in run
File "videotrans\translator\_base.py", line 142, in _run_srt
File "tenacity\__init__.py", line 338, in wrapped_f
File "tenacity\__init__.py", line 477, in call
File "tenacity\__init__.py", line 378, in iter
File "tenacity\__init__.py", line 400, in
File "concurrent\futures\_base.py", line 451, in result
File "concurrent\futures\_base.py", line 403, in __get_result
File "tenacity\__init__.py", line 480, in call
File "videotrans\translator\_openaicompat.py", line 78, in _item_task
videotrans.configure.excepts.StopTask: Error code: 400 - {'error': {'message': "Unsupported value: 'temperature' does not support 0.2 with this model. Only the default (1) value is supported.", 'type': 'invalid_request_error', 'param': 'temperature', 'code': 'unsupported_value'}}
{'model': 'gpt-5', 'frequency_penalty': 0, 'timeout': 300, 'max_completion_tokens': 8192, 'temperature': 0.2}


=
system:Windows-10-10.0.26200-SP0
version:v4.01
frozen:True
language:zh
root_dir:C:/Users/stanl/Desktop/win-pyvideotrans-v4.00-528

1 Replies

该错误原因是模型 gpt-5 不支持除 1 以外的 temperature 值,而软件默认将 AI 翻译模型的温度设为 0.2

解决方案

  1. 打开软件顶部菜单 工具/选项 → 高级选项
  2. 找到 字幕翻译调整 区域下的 AI翻译模型温度值,将其从 0.2 改为 1
  3. 保存设置,重新执行翻译任务。

请查阅相关文档:

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