File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -1326,7 +1326,7 @@ static common_chat_params common_chat_params_init_gpt_oss(const common_chat_temp
1326
1326
builder.resolve_refs (parameters);
1327
1327
1328
1328
tool_rules.push_back (builder.add_rule (name + " -call" ,
1329
- " \" " + name + " \" " + " space? \" <|constrain|>json<|message|>\" " + builder.add_schema (name + " -args" , parameters)
1329
+ " \" " + name + " \" " + " space* \" <|constrain|>\" ? \" json<|message|>\" " + builder.add_schema (name + " -args" , parameters)
1330
1330
));
1331
1331
});
1332
1332
@@ -1343,6 +1343,7 @@ static common_chat_params common_chat_params_init_gpt_oss(const common_chat_temp
1343
1343
" <|constrain|>" ,
1344
1344
" <|message|>" ,
1345
1345
" <|start|>" ,
1346
+ " <|end|>" ,
1346
1347
};
1347
1348
});
1348
1349
}
@@ -1358,7 +1359,7 @@ static void common_chat_parse_gpt_oss(common_chat_msg_parser & builder) {
1358
1359
static const common_regex to_regex (" to=" );
1359
1360
static const common_regex channel_type_regexp (" (final|analysis|commentary)" );
1360
1361
static const common_regex user_tool_call_regex (
1361
- " functions\\ .([a-zA-Z_][a-zA-Z0-9_]*)\\ s? (?:<\\ |constrain\\ |>([a-zA-Z]+))?<\\ |message\\ |>"
1362
+ " functions\\ .([a-zA-Z_][a-zA-Z0-9_]*)\\ s*(?: (?:<\\ |constrain\\ |>)? ([a-zA-Z]+))?\\ s* <\\ |message\\ |>"
1362
1363
);
1363
1364
static const common_regex builtin_tool_call_regex (" (?:browser|python)[\\ s\\ S]*<\\ |message\\ |>" );
1364
1365
You can’t perform that action at this time.
0 commit comments