Interface CountTokensInput.Builder
- All Superinterfaces:
Buildable,CopyableBuilder<CountTokensInput.Builder,,CountTokensInput> SdkBuilder<CountTokensInput.Builder,,CountTokensInput> SdkPojo
- Enclosing class:
CountTokensInput
-
Method Summary
Modifier and TypeMethodDescriptiondefault CountTokensInput.Builderconverse(Consumer<ConverseTokensRequest.Builder> converse) AConverserequest for which to count tokens.converse(ConverseTokensRequest converse) AConverserequest for which to count tokens.default CountTokensInput.BuilderinvokeModel(Consumer<InvokeModelTokensRequest.Builder> invokeModel) AnInvokeModelrequest for which to count tokens.invokeModel(InvokeModelTokensRequest invokeModel) AnInvokeModelrequest for which to count tokens.Methods inherited from interface software.amazon.awssdk.utils.builder.CopyableBuilder
copyMethods inherited from interface software.amazon.awssdk.utils.builder.SdkBuilder
applyMutation, buildMethods inherited from interface software.amazon.awssdk.core.SdkPojo
equalsBySdkFields, sdkFieldNameToField, sdkFields
-
Method Details
-
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:
-
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
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:
-