FunctionRequest

@Serializable
class FunctionRequest(val name: String, val description: String?, val parameters: JsonObject?, val strict: Boolean? = null) : ToolFunction

Function signature declared in a chat completion request.

Constructors

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

Properties

Link copied to clipboard

Natural-language description of what the function does; helps the model decide when to call it.

Link copied to clipboard
open override val name: String

Function name the model can call.

Link copied to clipboard
val parameters: JsonObject?

JSON-Schema description of the arguments the function accepts.

Link copied to clipboard

Whether the API constrains the generated arguments to parameters instead of merely prompting for them. Beta feature; left out of the request when null, which the API reads as false.

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open override fun toString(): String