Skip to content

Commit 3b57133

Browse files
committed
gpt-oss : loosen function name matching during parse
1 parent 178dced commit 3b57133

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

common/chat.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1417,7 +1417,7 @@ static void common_chat_parse_gpt_oss(common_chat_msg_parser & builder) {
14171417
static const common_regex start_regex("<\\|start\\|>assistant");
14181418
static const common_regex end_regex("<\\|end\\|>");
14191419
static const common_regex to_regex(" to=");
1420-
static const common_regex function_regex("functions\\.([a-zA-Z_][a-zA-Z0-9_]*)");
1420+
static const common_regex function_regex("functions\\.([^<\\s]+)");
14211421
static const common_regex user_tool_call_regex("(?: <\\|constrain\\|>([a-zA-Z]+))?<\\|message\\|>");
14221422
static const common_regex builtin_tool_call_regex("(?:browser|python)[\\s\\S]*<\\|message\\|>");
14231423

0 commit comments

Comments
 (0)