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

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

Link copied to clipboard

The log probability of each token in tokens

Link copied to clipboard

The tokens chosen by the completion api

Link copied to clipboard

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