Skip to content

Commit 2ab97b6

Browse files
committed
gpt-oss : loosen function name matching during parse
1 parent b54aa29 commit 2ab97b6

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
@@ -1393,7 +1393,7 @@ static void common_chat_parse_gpt_oss(common_chat_msg_parser & builder) {
13931393
static const common_regex start_regex("<\\|start\\|>assistant");
13941394
static const common_regex end_regex("<\\|end\\|>");
13951395
static const common_regex to_regex(" to=");
1396-
static const common_regex function_regex("functions\\.([a-zA-Z_][a-zA-Z0-9_]*)");
1396+
static const common_regex function_regex("functions\\.([^<\\s]+)");
13971397
static const common_regex user_tool_call_regex("(?: <\\|constrain\\|>([a-zA-Z]+))?<\\|message\\|>");
13981398
static const common_regex builtin_tool_call_regex("(?:browser|python)[\\s\\S]*<\\|message\\|>");
13991399

0 commit comments

Comments
 (0)