CodingKeys
ChatStreamResult.swift:134enum CodingKeys
enum CodingKeys
import OpenAI
struct ChatStreamResult
case id
case object
case created
case model
case choices
case systemFingerprint
init(from decoder: any Decoder) throws
let choices: [Choice]
A list of chat completion choices. Can be more than one if n
is greater than 1.
let created: TimeInterval
The Unix timestamp (in seconds) of when the chat completion was created. Each chunk has the same timestamp.
let id: String
A unique identifier for the chat completion. Each chunk has the same ID.
let model: String
The model to generate the completion.
let object: String
The object type, which is always chat.completion.chunk
.
let systemFingerprint: String?
This fingerprint represents the backend configuration that the model runs with. Can be used in conjunction with the seed
request parameter to understand when backend changes have been made that might impact determinism.
struct Choice
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)