Skip to main content

functions.parameters

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

NameTypeDefaultDescription
parametersOptionalobject-An object that contains the parameters

Parameters

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

NameTypeDefaultDescription
type Requiredstring-Defines the top-level type of the parameters. Must be set to "object"
properties Requiredobject-An object containing the properties definitions to be passed to the function
required Optionalstring[]-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.

NameTypeDefaultDescription
[key: string] Requiredobject-An object with dynamic property names, where:

Schema Types

String Properties

NameTypeDefaultDescription
type Requiredstring-The type of property the AI is passing to the function. Must be set to "string"
description Optionalstring-A description of the property
enum Optionalstring[]-An array of strings that are the possible values
defaultOptionalstring-The default string value
patternOptionalstring-Regular expression pattern for the string value to match
nullableOptionalbooleanfalseWhether the property can be null

Example

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