mirror of https://github.com/Mai-with-u/MaiBot.git
feat: 使得model_info.extra_params能够单独指定模型的temprature
parent
b1047c36f5
commit
79e8962f6f
|
|
@ -301,7 +301,7 @@ class LLMRequest:
|
||||||
message_list=(compressed_messages or message_list),
|
message_list=(compressed_messages or message_list),
|
||||||
tool_options=tool_options,
|
tool_options=tool_options,
|
||||||
max_tokens=self.model_for_task.max_tokens if max_tokens is None else max_tokens,
|
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,
|
response_format=response_format,
|
||||||
stream_response_handler=stream_response_handler,
|
stream_response_handler=stream_response_handler,
|
||||||
async_response_parser=async_response_parser,
|
async_response_parser=async_response_parser,
|
||||||
|
|
|
||||||
|
|
@ -56,6 +56,7 @@ price_in = 2.0
|
||||||
price_out = 3.0
|
price_out = 3.0
|
||||||
[models.extra_params] # 可选的额外参数配置
|
[models.extra_params] # 可选的额外参数配置
|
||||||
enable_thinking = false # 不启用思考
|
enable_thinking = false # 不启用思考
|
||||||
|
# temperature = 0.5 # 可选:为该模型单独指定温度,会覆盖任务配置中的温度
|
||||||
|
|
||||||
[[models]]
|
[[models]]
|
||||||
model_identifier = "deepseek-ai/DeepSeek-V3.2-Exp"
|
model_identifier = "deepseek-ai/DeepSeek-V3.2-Exp"
|
||||||
|
|
@ -65,6 +66,7 @@ price_in = 2.0
|
||||||
price_out = 3.0
|
price_out = 3.0
|
||||||
[models.extra_params] # 可选的额外参数配置
|
[models.extra_params] # 可选的额外参数配置
|
||||||
enable_thinking = true # 启用思考
|
enable_thinking = true # 启用思考
|
||||||
|
# temperature = 0.7 # 可选:为该模型单独指定温度,会覆盖任务配置中的温度
|
||||||
|
|
||||||
[[models]]
|
[[models]]
|
||||||
model_identifier = "Qwen/Qwen3-Next-80B-A3B-Instruct"
|
model_identifier = "Qwen/Qwen3-Next-80B-A3B-Instruct"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue