Compartir a través de


CompletionsUsagePromptTokensDetails Class

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

Implements

public final class CompletionsUsagePromptTokensDetails
implements JsonSerializable<CompletionsUsagePromptTokensDetails>

The CompletionsUsagePromptTokensDetails model.

Method Summary

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

Reads an instance of CompletionsUsagePromptTokensDetails from the JsonReader.

Integer getCachedTokens()

Get the cachedTokens property: The number of cached prompt tokens.

JsonWriter toJson(JsonWriter jsonWriter)

Methods inherited from java.lang.Object

Method Details

fromJson

public static CompletionsUsagePromptTokensDetails fromJson(JsonReader jsonReader)

Reads an instance of CompletionsUsagePromptTokensDetails from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

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

Throws:

IOException

- If an error occurs while reading the CompletionsUsagePromptTokensDetails.

getCachedTokens

public Integer getCachedTokens()

Get the cachedTokens property: The number of cached prompt tokens.

Returns:

the cachedTokens value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

Applies to