Initializermacpaw.openai 0.3.6OpenAI
init(from:)
init(from decoder: any Decoder) throws
init(from decoder: any Decoder) throws
s6OpenAI9ChatQueryV13StreamOptionsV4fromAEs7Decoder_p_tKcfc
What are these?82WK9
import OpenAI
struct StreamOptions
struct ChatQuery
Creates a model response for the given chat conversation https://platform.openai.com/docs/guides/text-generation
protocol Decoder
A type that can decode values from a native format into in-memory representations.
init(includeUsage: Bool)
let includeUsage: Bool
If set, an additional chunk will be streamed before the data: [DONE] message. The usage field on this chunk shows the token usage statistics for the entire request, and the choices field will always be an empty array. All other chunks will also include a usage field, but with a null value.
enum CodingKeys