GLM-4.5 Model Support Follow-up (#8445)

This commit is contained in:
Binyao Jiang
2025-07-27 23:35:20 -07:00
committed by GitHub
parent 484d0e021d
commit 581e7dcb92
6 changed files with 44 additions and 15 deletions

View File

@@ -156,8 +156,7 @@ class Glm4MoeDetector(BaseFormatDetector):
tools,
individual_call_start_token=self.bot_token,
individual_call_end_token=self.eot_token,
# GLM4Moe is not compatible with multiple tool_calls under tool_choice condition: it will output unlimited tool_calls...
# tool_call_separator="\\n",
tool_call_separator="\\n",
function_format="xml",
call_rule_fmt='"{name}" "\\n" {arguments_rule} "\\n"',
key_value_rule_fmt='"<arg_key>{key}</arg_key>" "\\n" "<arg_value>" {valrule} "</arg_value>"',

View File

@@ -148,4 +148,5 @@ class Qwen3CoderDetector(BaseFormatDetector):
function_format="xml",
call_rule_fmt='"<function={name}>\\n" {arguments_rule} "\\n</function>"',
key_value_rule_fmt='"<parameter={key}>\\n" {valrule} "\\n</parameter>"',
key_value_separator="\\n",
)