diff --git a/common/chat.cpp b/common/chat.cpp index 79c4c278e2..6feb59a9e6 100644 --- a/common/chat.cpp +++ b/common/chat.cpp @@ -1317,6 +1317,7 @@ static common_chat_params common_chat_params_init_mirothinker(const common_chat_ const std::string SECTION_BEGIN = ""; const std::string SECTION_END = ""; const std::string CALL_BEGIN = ""; + const std::string CALL_BEGIN2 = ""; const std::string ARGS_BEGIN = ""; const std::string CALL_END = ""; @@ -1339,8 +1340,8 @@ static common_chat_params common_chat_params_init_mirothinker(const common_chat_ // Match: {what_ever}{spaces}{tool_name} auto tool_parser = p.tool( p.tool_open( - p.until("") + - p.literal("") + + p.until(CALL_BEGIN2) + + p.literal(CALL_BEGIN2) + p.space() + p.literal("") + p.tool_name(p.literal(name)) +