OpenAIFunctionDefinition
@Serializable
Function definition for an OpenAI tool.
Example:
{
"name": "get_weather",
"description": "Gets the current weather for a city",
"parameters": {
"type": "object",
"properties": { "city": { "type": "string" } },
"required": ["city"]
},
"strict": true
}Content copied to clipboard
Properties
Link copied to clipboard
A human-readable description of what the function does, used by the model to choose when and how to call the function. null omits the field.
Link copied to clipboard
JSON Schema describing the function's parameters. Omitting parameters defines a function with an empty parameter list. null omits the field.
Link copied to clipboard
Whether to enable strict schema adherence when generating the function call. If true, the model follows the exact schema defined in parameters. Only a subset of JSON Schema is supported when strict is true. null omits the field (provider default applies).