feat(llm): 统一思考模式配置,支持显式禁用状态
This commit is contained in:
@@ -273,13 +273,13 @@ impl KimiClient {
|
||||
async fn chat_completion(&self, messages: Vec<Message>) -> Result<String> {
|
||||
let url = format!("{}/chat/completions", self.base_url);
|
||||
|
||||
let thinking = if self.thinking_enabled {
|
||||
Some(ThinkingConfig {
|
||||
thinking_type: "enabled".to_string(),
|
||||
})
|
||||
} else {
|
||||
None
|
||||
};
|
||||
let thinking = Some(ThinkingConfig {
|
||||
thinking_type: if self.thinking_enabled {
|
||||
"enabled".to_string()
|
||||
} else {
|
||||
"disabled".to_string()
|
||||
},
|
||||
});
|
||||
|
||||
// 对于 kimi-k2.6 等支持思考模式的模型,使用默认 temperature 即可
|
||||
// 思考模式下不显式指定 temperature
|
||||
|
||||
Reference in New Issue
Block a user