Skip to main content

parse_text_tool_calls

Function parse_text_tool_calls 

Source
fn parse_text_tool_calls(content: &str) -> (Vec<Value>, String)
Expand description

Fallback for models that emit tool calls as <tool_call>{...}</tool_call> text in the message content instead of the structured tool_calls field (the Hermes/Qwen convention). Returns the parsed calls (in OpenAI shape) plus the content with the blocks stripped out.