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 Details

    • getContent

      public List<ChatTokenLogProbabilityResult> 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

      public com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Specified by:
      toJson in interface com.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.