OpenAiChatCompletionFunctionTool

@Serializable
data class OpenAiChatCompletionFunctionTool(val type: String, val function: OpenAIFunctionDefinition)

OpenAI tool wrapper containing the tool type and function definition.

Example:

{
"type": "function",
"function": { "name": "get_weather", "description": "Gets the weather" }
}

Constructors

Link copied to clipboard
constructor(type: String, function: OpenAIFunctionDefinition)

Properties

Link copied to clipboard

The function definition with name, description, and parameters schema.

Link copied to clipboard

The tool type (always "function").