File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -1337,6 +1337,7 @@ static common_chat_params common_chat_params_init_glm_4_5(const common_chat_temp
13371337}
13381338
13391339static void common_chat_parse_glm_4_5 (common_chat_msg_parser & builder) {
1340+ builder.consume_spaces ();
13401341 builder.try_parse_reasoning (" <think>" , " </think>" );
13411342 if (!builder.syntax ().parse_tool_calls ) {
13421343 builder.add_content (builder.consume_rest ());
@@ -1867,7 +1868,7 @@ static common_chat_params common_chat_templates_apply_jinja(
18671868 }
18681869
18691870 // GLM 4.5: detect by <arg_key> and <arg_value> tags (check before Hermes since both use <tool_call>)
1870- if (src.find (" <arg_key>" ) != std::string::npos && src.find (" <arg_value>" ) != std::string::npos && params.json_schema .is_null ()) {
1871+ if (src.find (" [gMASK]<sop> " ) != std::string::npos && src. find ( " <arg_key>" ) != std::string::npos && src.find (" <arg_value>" ) != std::string::npos && params.json_schema .is_null ()) {
18711872 return common_chat_params_init_glm_4_5 (tmpl, params);
18721873 }
18731874
You can’t perform that action at this time.
0 commit comments