Skip to main content

parse_tool_calls

Function parse_tool_calls 

Source
pub fn parse_tool_calls(text: &str) -> (String, Vec<ToolCall>)
Expand description

Find all <|tool_call>…<tool_call|> blocks, parse them, and return:

  • clean: the input text with all tool-call blocks (and stray markers) removed.
  • the parsed ToolCall list.