Package com.azure.ai.openai.models
Class CompletionsLogProbabilityModel
java.lang.Object
com.azure.ai.openai.models.CompletionsLogProbabilityModel
- All Implemented Interfaces:
com.azure.json.JsonSerializable<CompletionsLogProbabilityModel>
public final class CompletionsLogProbabilityModel
extends Object
implements com.azure.json.JsonSerializable<CompletionsLogProbabilityModel>
Representation of a log probabilities model for a completions generation.
-
Method Summary
Modifier and TypeMethodDescriptionfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of CompletionsLogProbabilityModel from the JsonReader.Get the textOffsets property: The text offsets associated with tokens in this completions data.Get the tokenLogProbabilities property: A collection of log probability values for the tokens in this completions data.Get the tokens property: The textual forms of tokens evaluated in this probability model.Get the topLogProbabilities property: A mapping of tokens to maximum log probability values in this completions data.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter)
-
Method Details
-
getTokens
Get the tokens property: The textual forms of tokens evaluated in this probability model.- Returns:
- the tokens value.
-
getTokenLogProbabilities
Get the tokenLogProbabilities property: A collection of log probability values for the tokens in this completions data.- Returns:
- the tokenLogProbabilities value.
-
getTopLogProbabilities
Get the topLogProbabilities property: A mapping of tokens to maximum log probability values in this completions data.- Returns:
- the topLogProbabilities value.
-
getTextOffsets
Get the textOffsets property: The text offsets associated with tokens in this completions data.- Returns:
- the textOffsets value.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<CompletionsLogProbabilityModel>- Throws:
IOException
-
fromJson
public static CompletionsLogProbabilityModel fromJson(com.azure.json.JsonReader jsonReader) throws IOException 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:
IllegalStateException- If the deserialized JSON object was missing any required properties.IOException- If an error occurs while reading the CompletionsLogProbabilityModel.
-