Interface CountTokensInput.Builder
- All Superinterfaces:
Buildable
,CopyableBuilder<CountTokensInput.Builder,
,CountTokensInput> SdkBuilder<CountTokensInput.Builder,
,CountTokensInput> SdkPojo
- Enclosing class:
CountTokensInput
-
Method Summary
Modifier and TypeMethodDescriptiondefault CountTokensInput.Builder
converse
(Consumer<ConverseTokensRequest.Builder> converse) AConverse
request for which to count tokens.converse
(ConverseTokensRequest converse) AConverse
request for which to count tokens.default CountTokensInput.Builder
invokeModel
(Consumer<InvokeModelTokensRequest.Builder> invokeModel) AnInvokeModel
request for which to count tokens.invokeModel
(InvokeModelTokensRequest invokeModel) AnInvokeModel
request for which to count tokens.Methods inherited from interface software.amazon.awssdk.utils.builder.CopyableBuilder
copy
Methods inherited from interface software.amazon.awssdk.utils.builder.SdkBuilder
applyMutation, build
Methods inherited from interface software.amazon.awssdk.core.SdkPojo
equalsBySdkFields, sdkFieldNameToField, sdkFields
-
Method Details
-
invokeModel
An
InvokeModel
request for which to count tokens. Use this field when you want to count tokens for a raw text input that would be sent to theInvokeModel
operation.- Parameters:
invokeModel
- AnInvokeModel
request for which to count tokens. Use this field when you want to count tokens for a raw text input that would be sent to theInvokeModel
operation.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
invokeModel
default CountTokensInput.Builder invokeModel(Consumer<InvokeModelTokensRequest.Builder> invokeModel) An
This is a convenience method that creates an instance of theInvokeModel
request for which to count tokens. Use this field when you want to count tokens for a raw text input that would be sent to theInvokeModel
operation.InvokeModelTokensRequest.Builder
avoiding the need to create one manually viaInvokeModelTokensRequest.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed toinvokeModel(InvokeModelTokensRequest)
.- Parameters:
invokeModel
- a consumer that will call methods onInvokeModelTokensRequest.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
converse
A
Converse
request for which to count tokens. Use this field when you want to count tokens for a conversation-based input that would be sent to theConverse
operation.- Parameters:
converse
- AConverse
request for which to count tokens. Use this field when you want to count tokens for a conversation-based input that would be sent to theConverse
operation.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
converse
A
This is a convenience method that creates an instance of theConverse
request for which to count tokens. Use this field when you want to count tokens for a conversation-based input that would be sent to theConverse
operation.ConverseTokensRequest.Builder
avoiding the need to create one manually viaConverseTokensRequest.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed toconverse(ConverseTokensRequest)
.- Parameters:
converse
- a consumer that will call methods onConverseTokensRequest.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-