Instance Propertymacpaw.openai 0.3.3OpenAI
description
The description of what the function does.
let description: String?
The description of what the function does.
let description: String?
s6OpenAI9ChatQueryV0C19CompletionToolParamV18FunctionDefinitionV11descriptionSSSgvp
What are these?7VTVQ
import OpenAI
struct FunctionDefinition
struct ChatQuery
Creates a model response for the given chat conversation https://platform.openai.com/docs/guides/text-generation
struct ChatCompletionToolParam
@frozen struct String
A Unicode string value that is a collection of characters.
init(from decoder: any Decoder) throws
init(name: String, description: String? = nil, parameters: Self.FunctionParameters? = nil)
let 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.
let parameters: Self.FunctionParameters?
The parameters the functions accepts, described as a JSON Schema object. https://platform.openai.com/docs/guides/text-generation/function-calling https://json-schema.org/understanding-json-schema/ **Python library defines only [String: Object] dictionary.
struct FunctionParameters
See the guide for examples, and the JSON Schema reference for documentation about the format.