Skip to main content

extract_tool_calls

Function extract_tool_calls 

Source
pub fn extract_tool_calls(value: &Value) -> Option<Vec<ToolCall>>
Expand description

Extract tool call information from a Value.

Supports two formats:

  • OpenAI format: [{"id": "...", "function": {"name": "...", "arguments": "..."}}]
  • Simplified format: {"id": "...", "name": "...", "arguments": "..."}