Audio
ChatResult.swift:91struct Audio
struct Audio
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 Annotation
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
let data: String
Base64 encoded audio bytes generated by the model, in the format specified in the request.
let expiresAt: Int
The Unix timestamp (in seconds) for when this audio response will no longer be accessible on the server for use in multi-turn conversations.
let id: String
Unique identifier for this audio response.
let transcript: String
Transcript of the audio generated by the model.
enum CodingKeys
static func != (lhs: Self, rhs: Self) -> Bool
Returns a Boolean value indicating whether two values are not equal.