Skip to main content

functions.parameters

The parameters object is used to define the input data that will be passed to the function.

functions[].parameters
object

An object that contains the parameters

Parameters

The parameters object defines the function parameters that will be passed to the AI.

parameters.type
stringrequired

Defines the top-level type of the parameters. Must be set to "object"

parameters.properties
objectrequired

An object containing the properties definitions to be passed to the function

parameters.required
string[]

Array of required property names from the properties object

Properties

The properties object defines the input data that will be passed to the function. It supports different types of parameters, each with their own set of configuration options. The property name is a key in the properties object that is user-defined.

properties.{property_name}
objectrequired

An object with dynamic property names, where:

Schema Types

String Properties

{property_name}.type
stringrequired

The type of property the AI is passing to the function. Must be set to "string"

{property_name}.description
string

A description of the property

{property_name}.enum
string[]

An array of strings that are the possible values

{property_name}.default
string

The default string value

{property_name}.pattern
string

Regular expression pattern for the string value to match

{property_name}.nullable
boolean
Default: false

Whether the property can be null

Example

parameters:
type: object
properties:
property_name:
type: string
description: A string value
pattern: ^[a-z]+$