FunctionParameters
See the guide for examples, and the JSON Schema reference for documentation about the format.
struct FunctionParameters
See the guide for examples, and the JSON Schema reference for documentation about the format.
struct FunctionParameters
s6OpenAI9ChatQueryV0C19CompletionToolParamV18FunctionDefinitionV0H10ParametersV
What are these?7E3S8
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
init(from decoder: any Decoder) throws
init(name: String, description: String? = nil, parameters: Self.FunctionParameters? = nil)
let description: String?
The description of what the function does.
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.
protocol Decodable
A type that can decode itself from an external representation.
protocol Encodable
A type that can encode itself to an external representation.
protocol Equatable
A type that can be compared for value equality.
init(from decoder: any Decoder) throws
init(type: Self.JSONType, properties: [String : Property]? = nil, required: [String]? = nil, pattern: String? = nil, const: String? = nil, enum: [String]? = nil, multipleOf: Int? = nil, minimum: Int? = nil, maximum: Int? = nil)
let const: String?
let `enum`: [String]?
let maximum: Int?
let minimum: Int?
let multipleOf: Int?
let pattern: String?
let properties: [String : Property]?
let required: [String]?
let type: Self.JSONType
enum JSONType
struct Property
static func != (lhs: Self, rhs: Self) -> Bool
Returns a Boolean value indicating whether two values are not equal.