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)
|
// Generation prompt
|
||||||
prompt.push_str("<|im_start|>assistant\n/think\n\n");
|
prompt.push_str("<|im_start|>assistant\n");
|
||||||
prompt
|
prompt
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -187,6 +187,8 @@ pub fn clean_text(text: &str) -> String {
|
|||||||
.replace("<|tool_call|>", "")
|
.replace("<|tool_call|>", "")
|
||||||
.replace("<|execute_start|>", "")
|
.replace("<|execute_start|>", "")
|
||||||
.replace("<|execute_end|>", "")
|
.replace("<|execute_end|>", "")
|
||||||
|
.replace("<think>", "")
|
||||||
|
.replace("</think>", "")
|
||||||
.replace("/think", "")
|
.replace("/think", "")
|
||||||
.replace("/no_think", "")
|
.replace("/no_think", "")
|
||||||
.trim()
|
.trim()
|
||||||
|
|||||||
Reference in New Issue
Block a user