Skip to main content

parse_text_tool_calls

Function parse_text_tool_calls 

Source
pub fn parse_text_tool_calls(text: &str) -> Option<Vec<Part>>
Expand description

Parse text-based tool calls from model output.

Returns Some(parts) if tool calls were found and parsed, where parts contains Part::FunctionCall entries (and optionally Part::Text for any non-tool-call text before/after the tags).

Returns None if no tool call tags were detected.