MCPcopy Index your code
hub / github.com/mudler/LocalAI / resolve_parser

Function resolve_parser

backend/python/tinygrad/tool_parsers/base.py:70–77  ·  view source on GitHub ↗

Return a parser instance by name, falling back to a no-op passthrough.

(name: Optional[str])

Source from the content-addressed store, hash-verified

68
69
70def resolve_parser(name: Optional[str]) -> ToolParser:
71 """Return a parser instance by name, falling back to a no-op passthrough."""
72 # Import for side effects — each module registers itself.
73 from . import hermes, llama3_json, mistral, qwen3_xml # noqa: F401
74
75 if name and name in _REGISTRY:
76 return _REGISTRY[name]()
77 return PassthroughToolParser()
78
79
80class PassthroughToolParser(ToolParser):

Callers 2

_reset_stateMethod · 0.90
_load_llmMethod · 0.90

Calls 1

Tested by

no test coverage detected