vllm.parser.glm47_moe
¶
GLM-4.7 parser for reasoning and tool calls.
GLM-4.7 uses XML-like tool calls::
<tool_call>func_name<arg_key>key</arg_key><arg_value>value</arg_value></tool_call>
The function name can be followed directly by the first <arg_key> tag,
and tool calls may have no arguments.
Classes:
-
Glm47MoeParser–GLM-4.7 parser backed by the declarative parser engine.
Glm47MoeParser
¶
Bases: ParserEngine
GLM-4.7 parser backed by the declarative parser engine.
Source code in vllm/parser/glm47_moe.py
_ClosedArgs
¶
Closed key/value pairs of a raw argument text, reused by longer texts.
Raw arguments only grow while a call streams, so a parse of a text that
extends text resumes after its last closed value.
Source code in vllm/parser/glm47_moe.py
_glm47_parse_args(raw_args, partial, closed=None)
¶
Return the arguments and the key of the open trailing value, if any.