We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5b9c5a4 commit 3fbe84fCopy full SHA for 3fbe84f
common/chat-parser.cpp
@@ -141,6 +141,9 @@ void common_chat_msg_parser::consume_literal(const std::string & literal) {
141
142
bool common_chat_msg_parser::try_parse_reasoning(const std::string & start_think, const std::string & end_think) {
143
auto handle_reasoning = [&](const std::string & reasoning, bool closed) {
144
+ if (reasoning.empty()) {
145
+ return;
146
+ }
147
if (syntax_.reasoning_in_content) {
148
add_content(syntax_.reasoning_format == COMMON_REASONING_FORMAT_DEEPSEEK ? "<think>" : start_think);
149
add_content(reasoning);
0 commit comments