ChatChoiceLogProbabilityInfo Class

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

Implements

public final class ChatChoiceLogProbabilityInfo
implements JsonSerializable<ChatChoiceLogProbabilityInfo>

Log probability information for a choice, as requested via 'logprobs' and 'top_logprobs'.

Method Summary

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

Reads an instance of ChatChoiceLogProbabilityInfo from the JsonReader.

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.

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

JsonWriter toJson(JsonWriter jsonWriter)

Methods inherited from java.lang.Object

Method Details

fromJson

public static ChatChoiceLogProbabilityInfo fromJson(JsonReader jsonReader)

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:

IOException

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

getContent

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

getRefusal

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

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

Applies to