Interface CountTokensInput.Builder
-
- All Superinterfaces:
Buildable,CopyableBuilder<CountTokensInput.Builder,CountTokensInput>,SdkBuilder<CountTokensInput.Builder,CountTokensInput>,SdkPojo
- Enclosing class:
- CountTokensInput
@Mutable @NotThreadSafe public static interface CountTokensInput.Builder extends SdkPojo, CopyableBuilder<CountTokensInput.Builder,CountTokensInput>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default CountTokensInput.Builderconverse(Consumer<ConverseTokensRequest.Builder> converse)AConverserequest for which to count tokens.CountTokensInput.Builderconverse(ConverseTokensRequest converse)AConverserequest for which to count tokens.default CountTokensInput.BuilderinvokeModel(Consumer<InvokeModelTokensRequest.Builder> invokeModel)AnInvokeModelrequest for which to count tokens.CountTokensInput.BuilderinvokeModel(InvokeModelTokensRequest invokeModel)AnInvokeModelrequest 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 Detail
-
invokeModel
CountTokensInput.Builder invokeModel(InvokeModelTokensRequest invokeModel)
An
InvokeModelrequest for which to count tokens. Use this field when you want to count tokens for a raw text input that would be sent to theInvokeModeloperation.- Parameters:
invokeModel- AnInvokeModelrequest for which to count tokens. Use this field when you want to count tokens for a raw text input that would be sent to theInvokeModeloperation.- 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 theInvokeModelrequest for which to count tokens. Use this field when you want to count tokens for a raw text input that would be sent to theInvokeModeloperation.InvokeModelTokensRequest.Builderavoiding the need to create one manually viaInvokeModelTokensRequest.builder().When the
Consumercompletes,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:
invokeModel(InvokeModelTokensRequest)
-
converse
CountTokensInput.Builder converse(ConverseTokensRequest converse)
A
Converserequest for which to count tokens. Use this field when you want to count tokens for a conversation-based input that would be sent to theConverseoperation.- Parameters:
converse- AConverserequest for which to count tokens. Use this field when you want to count tokens for a conversation-based input that would be sent to theConverseoperation.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
converse
default CountTokensInput.Builder converse(Consumer<ConverseTokensRequest.Builder> converse)
A
This is a convenience method that creates an instance of theConverserequest for which to count tokens. Use this field when you want to count tokens for a conversation-based input that would be sent to theConverseoperation.ConverseTokensRequest.Builderavoiding the need to create one manually viaConverseTokensRequest.builder().When the
Consumercompletes,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:
converse(ConverseTokensRequest)
-
-