cli : fix reasoning responses in CLI (#18961)

* cli : fix reasoning responses in CLI

* fix build

* fix build (2)
This commit is contained in:
Xuan-Son Nguyen
2026-01-20 18:23:25 +01:00
committed by GitHub
parent d1e3556481
commit 2c1f199653
12 changed files with 417 additions and 390 deletions
+6 -6
View File
@@ -616,15 +616,15 @@ void test_command7_parser_compare(testing & t) {
auto test_legacy = [&](const std::string & input, bool need_more_input, bool print_results) {
// Original common_chat_combinator_parser taken from chat.cpp
common_chat_parser_params params;
params.format = COMMON_CHAT_FORMAT_GENERIC;
params.reasoning_format = COMMON_REASONING_FORMAT_AUTO;
params.reasoning_in_content = false;
params.thinking_forced_open = false;
common_chat_msg_parser builder(
input,
/* .is_partial = */ need_more_input,
{
/* .format = */ COMMON_CHAT_FORMAT_GENERIC,
/* .reasoning_format = */ COMMON_REASONING_FORMAT_AUTO,
/* .reasoning_in_content = */ false,
/* .thinking_forced_open = */ false,
}
params
);
builder.try_parse_reasoning("<|START_THINKING|>", "<|END_THINKING|>");