Package com.openai.models.completions
Class CompletionUsage.PromptTokensDetails
-
- All Implemented Interfaces:
public final class CompletionUsage.PromptTokensDetailsBreakdown of tokens used in the prompt.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classCompletionUsage.PromptTokensDetails.BuilderA builder for PromptTokensDetails.
-
Method Summary
Modifier and Type Method Description final Optional<Long>audioTokens()Audio input tokens present in the prompt. final Optional<Long>cachedTokens()Cached tokens present in the prompt. final JsonField<Long>_audioTokens()Returns the raw JSON value of audioTokens. final JsonField<Long>_cachedTokens()Returns the raw JSON value of cachedTokens. final Map<String, JsonValue>_additionalProperties()final CompletionUsage.PromptTokensDetails.BuildertoBuilder()final CompletionUsage.PromptTokensDetailsvalidate()Validates that the types of all values in this object match their expected types recursively. final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static CompletionUsage.PromptTokensDetails.Builderbuilder()Returns a mutable builder for constructing an instance of PromptTokensDetails. -
-
Method Detail
-
audioTokens
final Optional<Long> audioTokens()
Audio input tokens present in the prompt.
-
cachedTokens
final Optional<Long> cachedTokens()
Cached tokens present in the prompt.
-
_audioTokens
final JsonField<Long> _audioTokens()
Returns the raw JSON value of audioTokens.
Unlike audioTokens, this method doesn't throw if the JSON field has an unexpected type.
-
_cachedTokens
final JsonField<Long> _cachedTokens()
Returns the raw JSON value of cachedTokens.
Unlike cachedTokens, this method doesn't throw if the JSON field has an unexpected type.
-
_additionalProperties
final Map<String, JsonValue> _additionalProperties()
-
toBuilder
final CompletionUsage.PromptTokensDetails.Builder toBuilder()
-
validate
final CompletionUsage.PromptTokensDetails validate()
Validates that the types of all values in this object match their expected types recursively.
This method is not forwards compatible with new types from the API for existing fields.
-
builder
final static CompletionUsage.PromptTokensDetails.Builder builder()
Returns a mutable builder for constructing an instance of PromptTokensDetails.
-
-
-
-