Class RealtimeResponseUsageInputTokenDetails
-
- All Implemented Interfaces:
public final class RealtimeResponseUsageInputTokenDetails
Details about the input tokens used in the Response. Cached tokens are tokens from previous turns in the conversation that are included as context for the current response. Cached tokens here are counted as a subset of input tokens, meaning input tokens will include cached and uncached tokens.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final class
RealtimeResponseUsageInputTokenDetails.Builder
A builder for RealtimeResponseUsageInputTokenDetails.
public final class
RealtimeResponseUsageInputTokenDetails.CachedTokensDetails
Details about the cached tokens used as input for the Response.
-
Method Summary
Modifier and Type Method Description final Optional<Long>
audioTokens()
The number of audio tokens used as input for the Response. final Optional<Long>
cachedTokens()
The number of cached tokens used as input for the Response. final Optional<RealtimeResponseUsageInputTokenDetails.CachedTokensDetails>
cachedTokensDetails()
Details about the cached tokens used as input for the Response. final Optional<Long>
imageTokens()
The number of image tokens used as input for the Response. final Optional<Long>
textTokens()
The number of text tokens used as input for the Response. final JsonField<Long>
_audioTokens()
Returns the raw JSON value of audioTokens. final JsonField<Long>
_cachedTokens()
Returns the raw JSON value of cachedTokens. final JsonField<RealtimeResponseUsageInputTokenDetails.CachedTokensDetails>
_cachedTokensDetails()
Returns the raw JSON value of cachedTokensDetails. final JsonField<Long>
_imageTokens()
Returns the raw JSON value of imageTokens. final JsonField<Long>
_textTokens()
Returns the raw JSON value of textTokens. final Map<String, JsonValue>
_additionalProperties()
final RealtimeResponseUsageInputTokenDetails.Builder
toBuilder()
final RealtimeResponseUsageInputTokenDetails
validate()
final Boolean
isValid()
Boolean
equals(Object other)
Integer
hashCode()
String
toString()
final static RealtimeResponseUsageInputTokenDetails.Builder
builder()
Returns a mutable builder for constructing an instance of RealtimeResponseUsageInputTokenDetails. -
-
Method Detail
-
audioTokens
final Optional<Long> audioTokens()
The number of audio tokens used as input for the Response.
-
cachedTokens
final Optional<Long> cachedTokens()
The number of cached tokens used as input for the Response.
-
cachedTokensDetails
final Optional<RealtimeResponseUsageInputTokenDetails.CachedTokensDetails> cachedTokensDetails()
Details about the cached tokens used as input for the Response.
-
imageTokens
final Optional<Long> imageTokens()
The number of image tokens used as input for the Response.
-
textTokens
final Optional<Long> textTokens()
The number of text tokens used as input for the Response.
-
_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.
-
_cachedTokensDetails
final JsonField<RealtimeResponseUsageInputTokenDetails.CachedTokensDetails> _cachedTokensDetails()
Returns the raw JSON value of cachedTokensDetails.
Unlike cachedTokensDetails, this method doesn't throw if the JSON field has an unexpected type.
-
_imageTokens
final JsonField<Long> _imageTokens()
Returns the raw JSON value of imageTokens.
Unlike imageTokens, this method doesn't throw if the JSON field has an unexpected type.
-
_textTokens
final JsonField<Long> _textTokens()
Returns the raw JSON value of textTokens.
Unlike textTokens, this method doesn't throw if the JSON field has an unexpected type.
-
_additionalProperties
final Map<String, JsonValue> _additionalProperties()
-
toBuilder
final RealtimeResponseUsageInputTokenDetails.Builder toBuilder()
-
validate
final RealtimeResponseUsageInputTokenDetails validate()
-
builder
final static RealtimeResponseUsageInputTokenDetails.Builder builder()
Returns a mutable builder for constructing an instance of RealtimeResponseUsageInputTokenDetails.
-
-
-
-