Skip to content

Commit e84ee88

Browse files
author
ochafik
committed
r1: fix inadvertent newline in grammar before <|tool▁call▁end|>
1 parent ce28224 commit e84ee88

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

common/chat.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -567,8 +567,7 @@ static common_chat_params common_chat_params_init_deepseek_r1(const common_chat_
567567
auto args_rule = builder.add_schema(name + "-args", parameters);
568568
tool_rules.push_back(builder.add_rule(name + "-call",
569569
"\"<|tool▁call▁begin|>function<|tool▁sep|>" + name + "\\n"
570-
"```json\\n\" " + args_rule + " \"```"
571-
"<|tool▁call▁end|>\""));
570+
"```json\\n\" " + args_rule + " \"```<|tool▁call▁end|>\""));
572571
});
573572
// Distill Qwen 7B & 32B models seem confused re/ syntax of their tool call opening tag,
574573
// so we accept common variants (then it's all constrained)

0 commit comments

Comments
 (0)