Expand description
Streaming tool-call parser — state-machine extraction from partial LLM output.
Detects <tool_call> blocks incrementally as tokens arrive, firing callbacks
as soon as </tool_call> is seen. Handles malformed tags and unclosed JSON tolerantly.
Ported from hermes-rs parser.rs philosophy.
Structs§
- Streaming
Tool Call Parser - State-machine streaming parser for XML tool calls
- Tool
Call - A detected tool call from streaming output
Enums§
- Parser
Event - Events emitted by the streaming parser
Functions§
- parse_
tool_ calls - Convenience: parse a full (non-streaming) response containing tool_call XML.