Class RealtimeResponseUsage.Builder
-
- All Implemented Interfaces:
public final class RealtimeResponseUsage.Builder
A builder for RealtimeResponseUsage.
-
-
Method Summary
-
-
Method Detail
-
inputTokenDetails
final RealtimeResponseUsage.Builder inputTokenDetails(RealtimeResponseUsageInputTokenDetails inputTokenDetails)
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.
-
inputTokenDetails
final RealtimeResponseUsage.Builder inputTokenDetails(JsonField<RealtimeResponseUsageInputTokenDetails> inputTokenDetails)
Sets Builder.inputTokenDetails to an arbitrary JSON value.
You should usually call Builder.inputTokenDetails with a well-typed RealtimeResponseUsageInputTokenDetails value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
inputTokens
final RealtimeResponseUsage.Builder inputTokens(Long inputTokens)
The number of input tokens used in the Response, including text and audio tokens.
-
inputTokens
final RealtimeResponseUsage.Builder inputTokens(JsonField<Long> inputTokens)
Sets Builder.inputTokens to an arbitrary JSON value.
You should usually call Builder.inputTokens with a well-typed Long value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
outputTokenDetails
final RealtimeResponseUsage.Builder outputTokenDetails(RealtimeResponseUsageOutputTokenDetails outputTokenDetails)
Details about the output tokens used in the Response.
-
outputTokenDetails
final RealtimeResponseUsage.Builder outputTokenDetails(JsonField<RealtimeResponseUsageOutputTokenDetails> outputTokenDetails)
Sets Builder.outputTokenDetails to an arbitrary JSON value.
You should usually call Builder.outputTokenDetails with a well-typed RealtimeResponseUsageOutputTokenDetails value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
outputTokens
final RealtimeResponseUsage.Builder outputTokens(Long outputTokens)
The number of output tokens sent in the Response, including text and audio tokens.
-
outputTokens
final RealtimeResponseUsage.Builder outputTokens(JsonField<Long> outputTokens)
Sets Builder.outputTokens to an arbitrary JSON value.
You should usually call Builder.outputTokens with a well-typed Long value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
totalTokens
final RealtimeResponseUsage.Builder totalTokens(Long totalTokens)
The total number of tokens in the Response including input and output text and audio tokens.
-
totalTokens
final RealtimeResponseUsage.Builder totalTokens(JsonField<Long> totalTokens)
Sets Builder.totalTokens to an arbitrary JSON value.
You should usually call Builder.totalTokens with a well-typed Long value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
additionalProperties
final RealtimeResponseUsage.Builder additionalProperties(Map<String, JsonValue> additionalProperties)
-
putAdditionalProperty
final RealtimeResponseUsage.Builder putAdditionalProperty(String key, JsonValue value)
-
putAllAdditionalProperties
final RealtimeResponseUsage.Builder putAllAdditionalProperties(Map<String, JsonValue> additionalProperties)
-
removeAdditionalProperty
final RealtimeResponseUsage.Builder removeAdditionalProperty(String key)
-
removeAllAdditionalProperties
final RealtimeResponseUsage.Builder removeAllAdditionalProperties(Set<String> keys)
-
build
final RealtimeResponseUsage build()
Returns an immutable instance of RealtimeResponseUsage.
Further updates to this Builder will not mutate the returned instance.
-
-
-
-