FunctionDefinition

data class FunctionDefinition @JvmOverloads constructor(val name: String, val description: String? = null, val parameters: JsonSchema)(source)

Represents a function definition that can be called by the model.

Constructors

Link copied to clipboard
constructor(name: String, description: String? = null, parameters: JsonSchema)
constructor(name: String, description: String? = null, block: JsonSchemaBuilder.() -> Unit)

Secondary constructor that allows creating a FunctionDefinition by specifying its name, an optional description, and a block to define the JSON Schema parameters through a JsonSchemaBuilder.

Properties

Link copied to clipboard

A description of what the function does

Link copied to clipboard

The name of the function

Link copied to clipboard

The parameters the function accepts, in JSON Schema format