Skip to main content

parse_tool_calls

Function parse_tool_calls 

Source
pub fn parse_tool_calls(response: &Value) -> Vec<ToolCall>
Expand description

Parse tool calls from an LLM API response.

Tries OpenAI format first (choices[0].message.tool_calls), then falls back to Anthropic format (root content[] with type: "tool_use" blocks).