vllm.tool_parsers.structural_tag_registry ¶
Functions:
-
get_model_structural_tag–Build a structural tag with xgrammar's builtin model templates.
-
register_vllm_structural_tag–Register a vLLM-owned structural tag builder.
_dump_tool_choice_for_xgrammar(tool_choice) ¶
Convert tool_choice objects to xgrammar's expected protocol.
Source code in vllm/tool_parsers/structural_tag_registry.py
_dump_tool_for_xgrammar(tool) ¶
Convert tool objects to xgrammar's Chat Completions tool protocol.
Source code in vllm/tool_parsers/structural_tag_registry.py
get_model_structural_tag(model, tools, tool_choice, reasoning) ¶
Build a structural tag with xgrammar's builtin model templates.
Source code in vllm/tool_parsers/structural_tag_registry.py
register_vllm_structural_tag(model) ¶
Register a vLLM-owned structural tag builder.