fix: remove /think trigger, add back <think> in clean_text
- Removed /think trigger from prompt (model generates better without it) - Added <think> and </think> back to clean_text (model uses plain text thinking tags, not special tokens)
This commit is contained in:
@@ -89,8 +89,8 @@ pub fn build_prompt(messages: &[ChatMessage], tools: &Option<Vec<ToolDef>>) -> S
|
||||
}
|
||||
}
|
||||
|
||||
// Generation prompt: thinking mode (MiniCPM5 native)
|
||||
prompt.push_str("<|im_start|>assistant\n/think\n\n");
|
||||
// Generation prompt
|
||||
prompt.push_str("<|im_start|>assistant\n");
|
||||
prompt
|
||||
}
|
||||
|
||||
@@ -187,6 +187,8 @@ pub fn clean_text(text: &str) -> String {
|
||||
.replace("<|tool_call|>", "")
|
||||
.replace("<|execute_start|>", "")
|
||||
.replace("<|execute_end|>", "")
|
||||
.replace("<think>", "")
|
||||
.replace("</think>", "")
|
||||
.replace("/think", "")
|
||||
.replace("/no_think", "")
|
||||
.trim()
|
||||
|
||||
Reference in New Issue
Block a user