This commit is contained in:
ochafik 2024-10-22 10:53:01 +01:00
parent 75764871e6
commit fa8462ffd3

View file

@ -353,7 +353,7 @@ llama_tool_call_handler llama_tool_call_handler_init(
} }
} }
auto tool_call = builder.add_rule("tool_call", join(tool_rules.begin(), tool_rules.end(), " | ")) + " space"; auto tool_call = builder.add_rule("tool_call", join(tool_rules.begin(), tool_rules.end(), " | ")) + " space";
builder.add_rule("root", parallel_tool_calls ? "(" + tool_call + ")+" : tool_call); builder.add_rule("", parallel_tool_calls ? "(" + tool_call + ")+" : tool_call);
if (allow_content) { if (allow_content) {
handler.grammar_trigger_words.push_back("<function="); handler.grammar_trigger_words.push_back("<function=");
} }