Skip to content

Commit e6a4578

Browse files
committed
remove extra function
1 parent 3875b4c commit e6a4578

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
@@ -1378,12 +1378,6 @@ static void common_chat_parse_gpt_oss(common_chat_msg_parser & builder) {
13781378
return builder.consume_rest();
13791379
};
13801380

1381-
auto consume_whole_message = [&]() {
1382-
// Move back to the start and consume up to the next message
1383-
builder.move_to(message_start_pos);
1384-
return consume_until_next(message_start_pos + 1);
1385-
};
1386-
13871381
auto tool_call = [&]() {
13881382
if (auto res = builder.try_consume_regex(user_tool_call_regex)) {
13891383
auto name = builder.str(res->groups[1]);
@@ -1405,7 +1399,9 @@ static void common_chat_parse_gpt_oss(common_chat_msg_parser & builder) {
14051399
if (builder.syntax().parse_tool_calls) {
14061400
tool_call();
14071401
} else {
1408-
builder.add_content(consume_whole_message());
1402+
// Move back to the start and consume up to the next message
1403+
builder.move_to(message_start_pos);
1404+
builder.add_content(consume_until_next(message_start_pos + 1));
14091405
}
14101406
} else if (builder.try_consume_regex(message_regex)) {
14111407
if (!builder.try_find_regex(end_regex)) {

0 commit comments

Comments
 (0)