Interface ConverseTokensRequest.Builder
-
- All Superinterfaces:
Buildable,CopyableBuilder<ConverseTokensRequest.Builder,ConverseTokensRequest>,SdkBuilder<ConverseTokensRequest.Builder,ConverseTokensRequest>,SdkPojo
- Enclosing class:
- ConverseTokensRequest
@Mutable @NotThreadSafe public static interface ConverseTokensRequest.Builder extends SdkPojo, CopyableBuilder<ConverseTokensRequest.Builder,ConverseTokensRequest>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description ConverseTokensRequest.BuilderadditionalModelRequestFields(Document additionalModelRequestFields)The additionalModelRequestFields of Converse input request to count tokens for.ConverseTokensRequest.Buildermessages(Collection<Message> messages)An array of messages to count tokens for.ConverseTokensRequest.Buildermessages(Consumer<Message.Builder>... messages)An array of messages to count tokens for.ConverseTokensRequest.Buildermessages(Message... messages)An array of messages to count tokens for.ConverseTokensRequest.Buildersystem(Collection<SystemContentBlock> system)The system content blocks to count tokens for.ConverseTokensRequest.Buildersystem(Consumer<SystemContentBlock.Builder>... system)The system content blocks to count tokens for.ConverseTokensRequest.Buildersystem(SystemContentBlock... system)The system content blocks to count tokens for.default ConverseTokensRequest.BuildertoolConfig(Consumer<ToolConfiguration.Builder> toolConfig)The toolConfig of Converse input request to count tokens for.ConverseTokensRequest.BuildertoolConfig(ToolConfiguration toolConfig)The toolConfig of Converse input request to count tokens for.-
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
-
messages
ConverseTokensRequest.Builder messages(Collection<Message> messages)
An array of messages to count tokens for.
- Parameters:
messages- An array of messages to count tokens for.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
messages
ConverseTokensRequest.Builder messages(Message... messages)
An array of messages to count tokens for.
- Parameters:
messages- An array of messages to count tokens for.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
messages
ConverseTokensRequest.Builder messages(Consumer<Message.Builder>... messages)
An array of messages to count tokens for.
This is a convenience method that creates an instance of theMessage.Builderavoiding the need to create one manually viaMessage.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed to#messages(List.) - Parameters:
messages- a consumer that will call methods onMessage.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
#messages(java.util.Collection)
-
system
ConverseTokensRequest.Builder system(Collection<SystemContentBlock> system)
The system content blocks to count tokens for. System content provides instructions or context to the model about how it should behave or respond. The token count will include any system content provided.
- Parameters:
system- The system content blocks to count tokens for. System content provides instructions or context to the model about how it should behave or respond. The token count will include any system content provided.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
system
ConverseTokensRequest.Builder system(SystemContentBlock... system)
The system content blocks to count tokens for. System content provides instructions or context to the model about how it should behave or respond. The token count will include any system content provided.
- Parameters:
system- The system content blocks to count tokens for. System content provides instructions or context to the model about how it should behave or respond. The token count will include any system content provided.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
system
ConverseTokensRequest.Builder system(Consumer<SystemContentBlock.Builder>... system)
The system content blocks to count tokens for. System content provides instructions or context to the model about how it should behave or respond. The token count will include any system content provided.
This is a convenience method that creates an instance of theSystemContentBlock.Builderavoiding the need to create one manually viaSystemContentBlock.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed to#system(List.) - Parameters:
system- a consumer that will call methods onSystemContentBlock.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
#system(java.util.Collection)
-
toolConfig
ConverseTokensRequest.Builder toolConfig(ToolConfiguration toolConfig)
The toolConfig of Converse input request to count tokens for. Configuration information for the tools that the model can use when generating a response.
- Parameters:
toolConfig- The toolConfig of Converse input request to count tokens for. Configuration information for the tools that the model can use when generating a response.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
toolConfig
default ConverseTokensRequest.Builder toolConfig(Consumer<ToolConfiguration.Builder> toolConfig)
The toolConfig of Converse input request to count tokens for. Configuration information for the tools that the model can use when generating a response.
This is a convenience method that creates an instance of theToolConfiguration.Builderavoiding the need to create one manually viaToolConfiguration.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed totoolConfig(ToolConfiguration).- Parameters:
toolConfig- a consumer that will call methods onToolConfiguration.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
toolConfig(ToolConfiguration)
-
additionalModelRequestFields
ConverseTokensRequest.Builder additionalModelRequestFields(Document additionalModelRequestFields)
The additionalModelRequestFields of Converse input request to count tokens for. Use this field when you want to pass additional parameters that the model supports.
- Parameters:
additionalModelRequestFields- The additionalModelRequestFields of Converse input request to count tokens for. Use this field when you want to pass additional parameters that the model supports.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
-