Skip to main content

normalize_arguments_field

Function normalize_arguments_field 

Source
pub fn normalize_arguments_field(obj: Value) -> Value
Expand description

Normalize the arguments/parameters field in a tool call object. If the object has “parameters” but not “arguments”, copy parameters to arguments.

§Background

Different LLM formats use different field names:

  • Llama and JSON parsers use “parameters” (correct per JSON Schema spec)
  • Mistral and Qwen use “arguments”

This function normalizes to “arguments” for consistent downstream processing.