name
(str
): The name of the parameter.description
(str | None
): The description of the parameter.type
(str
): The type of the parameter.default
(Any
): The default value of the parameter.required
(bool
): Whether the parameter is required.dict[str, Any]
: The parameter in dictionary format.
function
(Callable
): The function to consume.model
(type[BaseModel]
): The Pydantic model class to convertFunctionSchema
: FunctionSchema instance
api
(OpenAIAPI
): The API to convert to.dict
: The function schema in OpenAI-compatible format.