Initializermacpaw.openai 0.3.3OpenAI
init(from:)
init(from decoder: any Decoder) throws
init(from decoder: any Decoder) throws
s6OpenAI10ChatResultV6ChoiceV0E8LogprobsV0C22CompletionTokenLogprobV4fromAIs7Decoder_p_tKcfc
What are these?9X9OO
import OpenAI
struct ChatCompletionTokenLogprob
struct ChatResult
struct Choice
struct ChoiceLogprobs
protocol Decoder
A type that can decode values from a native format into in-memory representations.
let bytes: [Int]?
A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be null
if there is no bytes representation for the token.
let logprob: Double
The log probability of this token.
let token: String
The token.
let topLogprobs: [TopLogprob]
List of the most likely tokens and their log probability, at this token position. In rare cases, there may be fewer than the number of requested top_logprobs
returned.
enum CodingKeys
struct TopLogprob