parse_function_args

Function parse_function_args 

Source
pub fn parse_function_args<T: DeserializeOwned>(
    tool_call: &ToolCall,
) -> Result<T, Error>
Expand description

Parses the JSON arguments from a ToolCall into a specific type.

This function simplifies the common task of deserializing the arguments string of a ToolCall into a strongly-typed Rust struct.