File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -1378,12 +1378,6 @@ static void common_chat_parse_gpt_oss(common_chat_msg_parser & builder) {
1378
1378
return builder.consume_rest ();
1379
1379
};
1380
1380
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
-
1387
1381
auto tool_call = [&]() {
1388
1382
if (auto res = builder.try_consume_regex (user_tool_call_regex)) {
1389
1383
auto name = builder.str (res->groups [1 ]);
@@ -1405,7 +1399,9 @@ static void common_chat_parse_gpt_oss(common_chat_msg_parser & builder) {
1405
1399
if (builder.syntax ().parse_tool_calls ) {
1406
1400
tool_call ();
1407
1401
} 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 ));
1409
1405
}
1410
1406
} else if (builder.try_consume_regex (message_regex)) {
1411
1407
if (!builder.try_find_regex (end_regex)) {
You can’t perform that action at this time.
0 commit comments