CodingKeys
ChatResult.swift:59enum CodingKeys
enum CodingKeys
import OpenAI
struct Message
struct ChatResult
struct Choice
case content
case refusal
case role
case annotations
case audio
case toolCalls
case reasoning
case reasoningContent
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
struct Audio
protocol CodingKey : CustomDebugStringConvertible, CustomStringConvertible, Sendable
A type that can be used as a key for encoding and decoding.
protocol CustomDebugStringConvertible
A type with a customized textual representation suitable for debugging purposes.
protocol CustomStringConvertible
A type with a customized textual representation.
protocol Equatable
A type that can be compared for value equality.
protocol Hashable : Equatable
A type that can be hashed into a Hasher
to produce an integer hash value.
protocol RawRepresentable<RawValue>
A type that can be converted to and from an associated raw value.
protocol Sendable
init?(intValue: Int)
init?(rawValue: String)
init?(stringValue: String)
var debugDescription: String { get }
A textual representation of this key, suitable for debugging.
var description: String { get }
A textual representation of this key.
var hashValue: Int { get }
static func != (lhs: Self, rhs: Self) -> Bool
Returns a Boolean value indicating whether two values are not equal.
func hash(into hasher: inout Hasher)