Instance Propertymacpaw.openai 0.3.2OpenAI
token
The token.
let token: String
The token.
let token: String
s6OpenAI16ChatStreamResultV6ChoiceV0F8LogprobsV0C22CompletionTokenLogprobV5tokenSSvp
What are these?79SFA
import OpenAI
struct ChatCompletionTokenLogprob
struct ChatStreamResult
struct Choice
struct ChoiceLogprobs
@frozen struct String
A Unicode string value that is a collection of characters.
init(from decoder: any Decoder) throws
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 topLogprobs: [Self.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