File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -1352,16 +1352,15 @@ static void common_chat_parse_deepseek_v3_1(common_chat_msg_parser & builder) {
1352
1352
// There's no opening "<think>" tag, so we need to handle this differently
1353
1353
1354
1354
// First, try to find the "</think>" tag that separates thinking from regular content
1355
- static const common_regex thinking_end_regex (" </think>" );
1356
- if (auto res = builder.try_find_regex (thinking_end_regex, std::string::npos, false )) {
1355
+ if (auto res = builder.try_find_literal (" </think>" )) {
1357
1356
// The prelude contains everything before the "</think>" tag
1358
1357
auto stripped_reasoning = string_strip (res->prelude );
1359
1358
1360
1359
if (!stripped_reasoning.empty ()) {
1361
1360
builder.add_reasoning_content (stripped_reasoning);
1362
1361
}
1363
1362
1364
- // The parser position is already advanced past the "</think>" tag by try_find_regex
1363
+ // The parser position is already advanced past the "</think>" tag by try_find_literal
1365
1364
// The rest is regular content
1366
1365
builder.add_content (builder.consume_rest ());
1367
1366
} else {
You can’t perform that action at this time.
0 commit comments