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 every block that parsed removed, and the channel markers. A block that does not parse (or has no closing marker) stays incleanverbatim, as inparse_hermes_tool_calls. Whitespace is kept, except that where a removed block had whitespace on both sides only one gap survives (seeparse_hermes_tool_calls).- the parsed
ToolCalllist.