CompletionsLogProbabilityModel Class

  • java.lang.Object
    • com.azure.ai.openai.models.CompletionsLogProbabilityModel

Implements

public final class CompletionsLogProbabilityModel
implements JsonSerializable<CompletionsLogProbabilityModel>

Representation of a log probabilities model for a completions generation.

Method Summary

Modifier and Type Method and Description
static CompletionsLogProbabilityModel fromJson(JsonReader jsonReader)

Reads an instance of CompletionsLogProbabilityModel from the JsonReader.

List<Integer> getTextOffsets()

Get the textOffsets property: The text offsets associated with tokens in this completions data.

List<Double> getTokenLogProbabilities()

Get the tokenLogProbabilities property: A collection of log probability values for the tokens in this completions data.

List<String> getTokens()

Get the tokens property: The textual forms of tokens evaluated in this probability model.

List<Map<String,Double>> getTopLogProbabilities()

Get the topLogProbabilities property: A mapping of tokens to maximum log probability values in this completions data.

JsonWriter toJson(JsonWriter jsonWriter)

Methods inherited from java.lang.Object

Method Details

fromJson

public static CompletionsLogProbabilityModel fromJson(JsonReader jsonReader)

Reads an instance of CompletionsLogProbabilityModel from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of CompletionsLogProbabilityModel if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.

Throws:

IOException

- If the deserialized JSON object was missing any required properties.

getTextOffsets

public List getTextOffsets()

Get the textOffsets property: The text offsets associated with tokens in this completions data.

Returns:

the textOffsets value.

getTokenLogProbabilities

public List getTokenLogProbabilities()

Get the tokenLogProbabilities property: A collection of log probability values for the tokens in this completions data.

Returns:

the tokenLogProbabilities value.

getTokens

public List getTokens()

Get the tokens property: The textual forms of tokens evaluated in this probability model.

Returns:

the tokens value.

getTopLogProbabilities

public List<>> getTopLogProbabilities()

Get the topLogProbabilities property: A mapping of tokens to maximum log probability values in this completions data.

Returns:

the topLogProbabilities value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

Applies to