Structuremacpaw.openai 0.3.8OpenAI
Annotation
ChatResult.swift:63struct Annotation
struct Annotation
import OpenAI
struct Message
struct ChatResult
struct Choice
init(from decoder: any Decoder) throws
let annotations: [Annotation]?
Annotations for the message, when applicable, as when using the web search tool. Web search tool: https://platform.openai.com/docs/guides/tools-web-search?api-mode=chat
let audio: Audio?
If the audio output modality is requested, this object contains data about the audio response from the model. Learn more: https://platform.openai.com/docs/guides/audio
let content: String?
The contents of the message.
let refusal: String?
The refusal message generated by the model.
let role: String
The role of the author of this message.
let toolCalls: [ChatQuery.ChatCompletionMessageParam.AssistantMessageParam.ToolCallParam]?
The tool calls generated by the model, such as function calls.
struct Audio
enum CodingKeys
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.
protocol Sendable
init(from decoder: any Decoder) throws
enum CodingKeys
struct URLCitation
static func != (lhs: Self, rhs: Self) -> Bool
Returns a Boolean value indicating whether two values are not equal.