OpenAIToolFunction

class OpenAIToolFunction(val name: String, val description: String? = null, val parameters: JsonObject? = null, val strict: Boolean? = null)(source)

Constructors

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

Properties

Link copied to clipboard
val description: String? = null

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

Link copied to clipboard

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
val parameters: JsonObject? = null

The parameters the functions accept, described as a JSON Schema object.

Link copied to clipboard
val strict: Boolean? = null

Whether to enable strict schema adherence when generating the function call. If set to true, the model will follow the exact schema defined in the parameters field. Only a subset of JSON Schema is supported when strict is true.