FunctionObject

data class FunctionObject(val name: String, val description: String? = null, val parameters: JsonElement? = null, val strict: Boolean? = false)(source)

Represents a function that can be called by the model.

See also

Constructors

Link copied to clipboard
constructor(name: String, description: String? = null, parameters: JsonElement? = null, strict: Boolean? = false)

Properties

Link copied to clipboard
@SerialName(value = "description")
val description: String?

A description of what the function does, used by the model to choose when and how to call the function.

Link copied to clipboard
@SerialName(value = "name")
val name: String

The name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.

Link copied to clipboard
@SerialName(value = "parameters")
val parameters: JsonElement?

The parameters the function accepts, described as a JSON Schema object.

Link copied to clipboard
@SerialName(value = "strict")
val strict: Boolean?

Whether to enable strict schema adherence when generating the function call.