Skip to main content

decode_tool_specs

Function decode_tool_specs 

Source
pub fn decode_tool_specs(
    value: Option<&JsonValue>,
) -> Result<Vec<ToolSpec>, ChatWireError>
Expand description

Decode OpenAI-style function tools from a request’s tools value: an array of {type: "function", function: {name, description?, parameters?}}. Absent → empty; malformed → ChatWireError.