mirror of
https://github.com/ikawrakow/ik_llama.cpp.git
synced 2026-05-01 03:41:53 +00:00
Add back the fix for Kimi-K2 tool-call parsing issues (#1070)
Co-authored-by: firecoperana <firecoperana>
This commit is contained in:
@@ -918,12 +918,13 @@ static void common_chat_parse_kimi_k2(common_chat_msg_parser & builder) {
|
|||||||
form.tool_start = "<|tool_call_begin|>";
|
form.tool_start = "<|tool_call_begin|>";
|
||||||
form.tool_sep = "<|tool_call_argument_begin|>{";
|
form.tool_sep = "<|tool_call_argument_begin|>{";
|
||||||
form.key_start = "\"";
|
form.key_start = "\"";
|
||||||
form.key_val_sep = "\": ";
|
form.key_val_sep = "\":";
|
||||||
form.val_end = ", ";
|
form.val_end = ",";
|
||||||
form.tool_end = "}<|tool_call_end|>";
|
form.tool_end = "}<|tool_call_end|>";
|
||||||
form.scope_end = "<|tool_calls_section_end|>";
|
form.scope_end = "<|tool_calls_section_end|>";
|
||||||
form.raw_argval = false;
|
form.raw_argval = false;
|
||||||
form.last_val_end = "";
|
form.last_val_end = "";
|
||||||
|
form.allow_toolcall_in_think = true;
|
||||||
return form;
|
return form;
|
||||||
})();
|
})();
|
||||||
builder.consume_reasoning_with_xml_tool_calls(form, "<think>", "</think>");
|
builder.consume_reasoning_with_xml_tool_calls(form, "<think>", "</think>");
|
||||||
|
|||||||
Reference in New Issue
Block a user