Class BetaResponseUsage.InputTokensDetails
-
- All Implemented Interfaces:
public final class BetaResponseUsage.InputTokensDetailsA detailed breakdown of the input tokens.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classBetaResponseUsage.InputTokensDetails.BuilderA builder for InputTokensDetails.
-
Method Summary
Modifier and Type Method Description final LongcacheWriteTokens()The number of input tokens that were written to the cache. final LongcachedTokens()The number of tokens that were retrieved from the cache. final JsonField<Long>_cacheWriteTokens()Returns the raw JSON value of cacheWriteTokens. final JsonField<Long>_cachedTokens()Returns the raw JSON value of cachedTokens. final Map<String, JsonValue>_additionalProperties()final BetaResponseUsage.InputTokensDetails.BuildertoBuilder()final BetaResponseUsage.InputTokensDetailsvalidate()Validates that the types of all values in this object match their expected types recursively. final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static BetaResponseUsage.InputTokensDetails.Builderbuilder()Returns a mutable builder for constructing an instance of InputTokensDetails. -
-
Method Detail
-
cacheWriteTokens
final Long cacheWriteTokens()
The number of input tokens that were written to the cache.
-
cachedTokens
final Long cachedTokens()
The number of tokens that were retrieved from the cache. More on prompt caching.
-
_cacheWriteTokens
final JsonField<Long> _cacheWriteTokens()
Returns the raw JSON value of cacheWriteTokens.
Unlike cacheWriteTokens, 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 BetaResponseUsage.InputTokensDetails.Builder toBuilder()
-
validate
final BetaResponseUsage.InputTokensDetails 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 BetaResponseUsage.InputTokensDetails.Builder builder()
Returns a mutable builder for constructing an instance of InputTokensDetails.
The following fields are required:
.cacheWriteTokens() .cachedTokens()
-
-
-
-