Logprobs

@Serializable
data class Logprobs(val tokens: List<String>, val tokenLogprobs: List<Double>, val topLogprobs: List<Map<String, Double>>, val textOffset: List<Int>)

Log probabilities of different token options? Returned if CompletionRequest.logprobs is greater than zero.

documentation

Constructors

Link copied to clipboard
constructor(tokens: List<String>, tokenLogprobs: List<Double>, topLogprobs: List<Map<String, Double>>, textOffset: List<Int>)

Properties

Link copied to clipboard
@SerialName(value = "text_offset")
val textOffset: List<Int>

The character offset from the start of the returned text for each of the chosen tokens.

Link copied to clipboard
@SerialName(value = "token_logprobs")
val tokenLogprobs: List<Double>

The log probability of each token in tokens

Link copied to clipboard
@SerialName(value = "tokens")
val tokens: List<String>

The tokens chosen by the completion api

Link copied to clipboard
@SerialName(value = "top_logprobs")
val topLogprobs: List<Map<String, Double>>

A map for each index in the completion result. The map contains the top CompletionRequest.logprobs tokens and their probabilities