Package com.openai.models.responses
Class ResponseUsage.InputTokensDetails.Builder
-
- All Implemented Interfaces:
public final class ResponseUsage.InputTokensDetails.Builder
A builder for InputTokensDetails.
-
-
Method Summary
Modifier and Type Method Description final ResponseUsage.InputTokensDetails.Builder
cachedTokens(Long cachedTokens)
The number of tokens that were retrieved from the cache. final ResponseUsage.InputTokensDetails.Builder
cachedTokens(JsonField<Long> cachedTokens)
Sets Builder.cachedTokens to an arbitrary JSON value. final ResponseUsage.InputTokensDetails.Builder
additionalProperties(Map<String, JsonValue> additionalProperties)
final ResponseUsage.InputTokensDetails.Builder
putAdditionalProperty(String key, JsonValue value)
final ResponseUsage.InputTokensDetails.Builder
putAllAdditionalProperties(Map<String, JsonValue> additionalProperties)
final ResponseUsage.InputTokensDetails.Builder
removeAdditionalProperty(String key)
final ResponseUsage.InputTokensDetails.Builder
removeAllAdditionalProperties(Set<String> keys)
final ResponseUsage.InputTokensDetails
build()
Returns an immutable instance of InputTokensDetails. -
-
Method Detail
-
cachedTokens
final ResponseUsage.InputTokensDetails.Builder cachedTokens(Long cachedTokens)
The number of tokens that were retrieved from the cache. More on prompt caching.
-
cachedTokens
final ResponseUsage.InputTokensDetails.Builder cachedTokens(JsonField<Long> cachedTokens)
Sets Builder.cachedTokens to an arbitrary JSON value.
You should usually call Builder.cachedTokens 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 ResponseUsage.InputTokensDetails.Builder additionalProperties(Map<String, JsonValue> additionalProperties)
-
putAdditionalProperty
final ResponseUsage.InputTokensDetails.Builder putAdditionalProperty(String key, JsonValue value)
-
putAllAdditionalProperties
final ResponseUsage.InputTokensDetails.Builder putAllAdditionalProperties(Map<String, JsonValue> additionalProperties)
-
removeAdditionalProperty
final ResponseUsage.InputTokensDetails.Builder removeAdditionalProperty(String key)
-
removeAllAdditionalProperties
final ResponseUsage.InputTokensDetails.Builder removeAllAdditionalProperties(Set<String> keys)
-
build
final ResponseUsage.InputTokensDetails build()
Returns an immutable instance of InputTokensDetails.
Further updates to this Builder will not mutate the returned instance.
The following fields are required:
.cachedTokens()
-
-
-
-