Skip to content

Commit b54aa29

Browse files
committed
gpt-oss : fix ungrouped tool calls in grammar
1 parent cf9a0d6 commit b54aa29

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

common/chat.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1345,13 +1345,13 @@ static common_chat_params common_chat_params_init_gpt_oss(const common_chat_temp
13451345
});
13461346

13471347
auto recipient_in_role = builder.add_rule("recipient_in_role",
1348-
"\"<|start|>assistant\"? \" to=functions.\" " +
1349-
string_join(tool_rules_recipient_in_role, " | ")
1348+
"\"<|start|>assistant\"? \" to=functions.\" ( " +
1349+
string_join(tool_rules_recipient_in_role, " | ") + " )"
13501350
);
13511351

13521352
auto recipient_in_channel = builder.add_rule("recipient_in_channel",
1353-
channel + " \" to=functions.\" " +
1354-
string_join(tool_rules_recipient_in_channel, " | ")
1353+
channel + " \" to=functions.\" ( " +
1354+
string_join(tool_rules_recipient_in_channel, " | ") + " )"
13551355
);
13561356

13571357
builder.add_rule("root", recipient_in_role + " | " + recipient_in_channel);

0 commit comments

Comments
 (0)