Skip to content

Commit 1776dd7

Browse files
committed
report error on builtin tool call and consume the call
1 parent 56a8731 commit 1776dd7

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

common/chat.cpp

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1379,13 +1379,9 @@ static void common_chat_parse_gpt_oss(common_chat_msg_parser & builder) {
13791379
auto name = builder.str(res->groups[1]);
13801380
auto args = builder.consume_rest();
13811381
builder.add_tool_call(name, "", args);
1382-
} else if (auto res = builder.try_consume_regex(browser_tool_call_regex)) {
1383-
auto code = builder.consume_rest();
1384-
LOG_INF("builtin tool call to python code: %s", code.c_str());
1385-
} else if (auto res = builder.try_consume_regex(python_tool_call_regex)) {
1386-
auto name = builder.str(res->groups[0]);
1387-
auto args = builder.consume_rest();
1388-
LOG_INF("builtin tool call to browser.%s %s", name.c_str(), args.c_str());
1382+
} else if (builder.try_consume_regex(browser_tool_call_regex) || builder.try_consume_regex(python_tool_call_regex)) {
1383+
builder.consume_rest();
1384+
LOG_ERR("builtin tool calls not implemented");
13891385
} else {
13901386
throw common_chat_msg_parse_exception("expected function call, got: " + consume_until_start());
13911387
}

0 commit comments

Comments
 (0)