feat: 使得model_info.extra_params能够单独指定模型的temprature

pull/1390/head
Ronifue 2025-11-29 18:15:46 +08:00
parent b1047c36f5
commit 79e8962f6f
2 changed files with 3 additions and 1 deletions

View File

@ -301,7 +301,7 @@ class LLMRequest:
message_list=(compressed_messages or message_list),
tool_options=tool_options,
max_tokens=self.model_for_task.max_tokens if max_tokens is None else max_tokens,
temperature=self.model_for_task.temperature if temperature is None else temperature,
temperature=temperature if temperature is not None else (model_info.extra_params or {}).get("temperature", self.model_for_task.temperature),
response_format=response_format,
stream_response_handler=stream_response_handler,
async_response_parser=async_response_parser,

View File

@ -56,6 +56,7 @@ price_in = 2.0
price_out = 3.0
[models.extra_params] # 可选的额外参数配置
enable_thinking = false # 不启用思考
# temperature = 0.5 # 可选:为该模型单独指定温度,会覆盖任务配置中的温度
[[models]]
model_identifier = "deepseek-ai/DeepSeek-V3.2-Exp"
@ -65,6 +66,7 @@ price_in = 2.0
price_out = 3.0
[models.extra_params] # 可选的额外参数配置
enable_thinking = true # 启用思考
# temperature = 0.7 # 可选:为该模型单独指定温度,会覆盖任务配置中的温度
[[models]]
model_identifier = "Qwen/Qwen3-Next-80B-A3B-Instruct"