From b9041969303cd8b28ff022eed8b573ef2d07b64d Mon Sep 17 00:00:00 2001 From: CNE Pierre FICHEPOIL Date: Thu, 28 Aug 2025 14:18:46 +0000 Subject: [PATCH] fixed crash when had a newline before it --- common/chat.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/chat.cpp b/common/chat.cpp index 111b4a21b368c..35620be5b2fe0 100644 --- a/common/chat.cpp +++ b/common/chat.cpp @@ -1829,7 +1829,7 @@ static common_chat_params common_chat_params_init_hermes_2_pro(const common_chat // If thinking_forced_open, then we capture the tag in the grammar, // (important for required tool choice) and in the trigger's first capture (decides what is sent to the grammar) std::string(data.thinking_forced_open ? "[\\s\\S]*?(\\s*)" : "(?:[\\s\\S]*?\\s*)?") + ( - "(\\s*" + "\\s*(" "(?:" "||||)?"