Initializermacpaw.openai 0.3.6OpenAI
init(includeUsage:)
ChatQuery.swift:1165init(includeUsage: Bool)
init(includeUsage: Bool)
s6OpenAI9ChatQueryV13StreamOptionsV12includeUsageAESb_tcfc
What are these?19QH1
import OpenAI
struct StreamOptions
struct ChatQuery
Creates a model response for the given chat conversation https://platform.openai.com/docs/guides/text-generation
@frozen struct Bool
A value type whose instances are either true
or false
.
init(from decoder: any Decoder) throws
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