Class BetaMessageTokensCount.Builder
-
- All Implemented Interfaces:
public final class BetaMessageTokensCount.BuilderA builder for BetaMessageTokensCount.
-
-
Method Summary
-
-
Method Detail
-
contextManagement
final BetaMessageTokensCount.Builder contextManagement(BetaCountTokensContextManagementResponse contextManagement)
Information about context management applied to the message.
-
contextManagement
final BetaMessageTokensCount.Builder contextManagement(Optional<BetaCountTokensContextManagementResponse> contextManagement)
Alias for calling Builder.contextManagement with
contextManagement.orElse(null).
-
contextManagement
final BetaMessageTokensCount.Builder contextManagement(JsonField<BetaCountTokensContextManagementResponse> contextManagement)
Sets Builder.contextManagement to an arbitrary JSON value.
You should usually call Builder.contextManagement with a well-typed BetaCountTokensContextManagementResponse value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
inputTokens
final BetaMessageTokensCount.Builder inputTokens(Long inputTokens)
The total number of tokens across the provided list of messages, system prompt, and tools.
-
inputTokens
final BetaMessageTokensCount.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.
-
additionalProperties
final BetaMessageTokensCount.Builder additionalProperties(Map<String, JsonValue> additionalProperties)
-
putAdditionalProperty
final BetaMessageTokensCount.Builder putAdditionalProperty(String key, JsonValue value)
-
putAllAdditionalProperties
final BetaMessageTokensCount.Builder putAllAdditionalProperties(Map<String, JsonValue> additionalProperties)
-
removeAdditionalProperty
final BetaMessageTokensCount.Builder removeAdditionalProperty(String key)
-
removeAllAdditionalProperties
final BetaMessageTokensCount.Builder removeAllAdditionalProperties(Set<String> keys)
-
build
final BetaMessageTokensCount build()
Returns an immutable instance of BetaMessageTokensCount.
Further updates to this Builder will not mutate the returned instance.
The following fields are required:
.contextManagement() .inputTokens()
-
-
-
-