Optional
description: stringA description of the callable function. While optional, it is strongly recommended to provide a description.
Optional
parameters: { The initial parameters of the callable function.
Private
_parametersOptional
descriptionA description of the callable function. While optional, it is strongly recommended to provide a description.
A UUID generated for this function by the library.
The name of the callable function. This name will be used by the AI assistant.
JSON definition of the callable function as consumed by OpenAI's API.
The list of optional CallableFunctionParameter
instances.
The list of CallableFunctionParameter
instances.
The list of required CallableFunctionParameter
instances.
Adds a parameter to the object.
The parameter to add or the JsonSchema of the parameter and its name to add.
Whether the parameter is required.
this
Gets a parameter by name.
The name of the parameter to get.
The parameter with the given name, or undefined if it does not exist.
Removes a parameter by name.
The name of the parameter to remove.
this
Serializes the callable function to JSON.
The CallableFunction
as a JSON object.
Optional
description?: stringOptional
id?: stringOptional
parameters?: { Optional
$comment?: stringOptional
additionalOptional
default?: anyOptional
deprecated?: booleanOptional
description?: stringOptional
examples?: any[]Optional
maxOptional
minOptional
patternOptional
properties?: Record<string, JsonSchema>Optional
readOptional
required?: string[]Optional
title?: stringOptional
unevaluatedOptional
writeStatic
fromJSONCreates a new CallableFunction
instance from a serialized callable function.
The JSON object of the CallableFunction instance.
Optional
description?: stringOptional
id?: stringOptional
parameters?: { Optional
$comment?: stringOptional
additionalOptional
default?: anyOptional
deprecated?: booleanOptional
description?: stringOptional
examples?: any[]Optional
maxOptional
minOptional
patternOptional
properties?: Record<string, JsonSchema>Optional
readOptional
required?: string[]Optional
title?: stringOptional
unevaluatedOptional
writeA new CallableFunction
instance
Generated using TypeDoc
The name of the callable function. This name will be used by the AI assistant.