Skip to content

vllm.tool_parsers.response_template_tool_parser

Classes:

ResponseTemplateToolParser

Bases: ToolParser

Selects a response-template parser as the tool parser; ResponseTemplateParser extracts the tool calls.

Methods:

Source code in vllm/parser/response_template.py
class ResponseTemplateToolParser(ToolParser):
    """Selects a response-template parser as the tool parser;
    `ResponseTemplateParser` extracts the tool calls."""

    @classmethod
    def unified_parser_cls(cls) -> type[ResponseTemplateParser]:
        """The unified parser that selecting this tool parser stands for."""
        return ResponseTemplateParser

unified_parser_cls() classmethod

The unified parser that selecting this tool parser stands for.

Source code in vllm/parser/response_template.py
@classmethod
def unified_parser_cls(cls) -> type[ResponseTemplateParser]:
    """The unified parser that selecting this tool parser stands for."""
    return ResponseTemplateParser