Package com.azure.ai.openai.models
Class ChatChoiceLogProbabilityInfo
java.lang.Object
com.azure.ai.openai.models.ChatChoiceLogProbabilityInfo
- All Implemented Interfaces:
com.azure.json.JsonSerializable<ChatChoiceLogProbabilityInfo>
public final class ChatChoiceLogProbabilityInfo
extends Object
implements com.azure.json.JsonSerializable<ChatChoiceLogProbabilityInfo>
Log probability information for a choice, as requested via 'logprobs' and 'top_logprobs'.
-
Method Summary
Modifier and TypeMethodDescriptionstatic ChatChoiceLogProbabilityInfofromJson(com.azure.json.JsonReader jsonReader) Reads an instance of ChatChoiceLogProbabilityInfo from the JsonReader.Get the content property: The list of log probability information entries for the choice's message content tokens, as requested via the 'logprobs' option.Get the refusal property: The list of log probability information entries for the choice's message refusal message tokens, as requested via the 'logprobs' option.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Method Details
-
getContent
Get the content property: The list of log probability information entries for the choice's message content tokens, as requested via the 'logprobs' option.- Returns:
- the content value.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<ChatChoiceLogProbabilityInfo>- Throws:
IOException
-
fromJson
public static ChatChoiceLogProbabilityInfo fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of ChatChoiceLogProbabilityInfo from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of ChatChoiceLogProbabilityInfo 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 ChatChoiceLogProbabilityInfo.
-
getRefusal
Get the refusal property: The list of log probability information entries for the choice's message refusal message tokens, as requested via the 'logprobs' option.- Returns:
- the refusal value.
-