Structuremacpaw.openai 0.3.2OpenAI
Property
ChatQuery.swift:1025struct Property
struct Property
s6OpenAI9ChatQueryV0C19CompletionToolParamV18FunctionDefinitionV0H10ParametersV8PropertyV
What are these?2KHUO
import OpenAI
struct FunctionParameters
See the guide for examples, and the JSON Schema reference for documentation about the format.
struct ChatQuery
Creates a model response for the given chat conversation https://platform.openai.com/docs/guides/text-generation
struct ChatCompletionToolParam
struct FunctionDefinition
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
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, description: String? = nil, format: String? = nil, items: Self.Items? = nil, required: [String]? = nil, pattern: String? = nil, const: String? = nil, enum: [String]? = nil, multipleOf: Int? = nil, minimum: Double? = nil, maximum: Double? = nil, minItems: Int? = nil, maxItems: Int? = nil, uniqueItems: Bool? = nil)
let const: String?
let description: String?
let `enum`: [String]?
let format: String?
let items: Self.Items?
let maxItems: Int?
let maximum: Double?
let minItems: Int?
let minimum: Double?
let multipleOf: Int?
let pattern: String?
let required: [String]?
let type: Self.JSONType
let uniqueItems: Bool?
struct Items
typealias JSONType = ChatQuery.ChatCompletionToolParam.FunctionDefinition.FunctionParameters.JSONType
static func != (lhs: Self, rhs: Self) -> Bool
Returns a Boolean value indicating whether two values are not equal.