Interface ConverseStreamRequest.Builder
-
- All Superinterfaces:
AwsRequest.Builder
,BedrockRuntimeRequest.Builder
,Buildable
,CopyableBuilder<ConverseStreamRequest.Builder,ConverseStreamRequest>
,SdkBuilder<ConverseStreamRequest.Builder,ConverseStreamRequest>
,SdkPojo
,SdkRequest.Builder
- Enclosing class:
- ConverseStreamRequest
public static interface ConverseStreamRequest.Builder extends BedrockRuntimeRequest.Builder, SdkPojo, CopyableBuilder<ConverseStreamRequest.Builder,ConverseStreamRequest>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description ConverseStreamRequest.Builder
additionalModelRequestFields(Document additionalModelRequestFields)
Additional inference parameters that the model supports, beyond the base set of inference parameters thatConverseStream
supports in theinferenceConfig
field.ConverseStreamRequest.Builder
additionalModelResponseFieldPaths(String... additionalModelResponseFieldPaths)
Additional model parameters field paths to return in the response.ConverseStreamRequest.Builder
additionalModelResponseFieldPaths(Collection<String> additionalModelResponseFieldPaths)
Additional model parameters field paths to return in the response.default ConverseStreamRequest.Builder
guardrailConfig(Consumer<GuardrailStreamConfiguration.Builder> guardrailConfig)
Configuration information for a guardrail that you want to use in the request.ConverseStreamRequest.Builder
guardrailConfig(GuardrailStreamConfiguration guardrailConfig)
Configuration information for a guardrail that you want to use in the request.default ConverseStreamRequest.Builder
inferenceConfig(Consumer<InferenceConfiguration.Builder> inferenceConfig)
Inference parameters to pass to the model.ConverseStreamRequest.Builder
inferenceConfig(InferenceConfiguration inferenceConfig)
Inference parameters to pass to the model.ConverseStreamRequest.Builder
messages(Collection<Message> messages)
The messages that you want to send to the model.ConverseStreamRequest.Builder
messages(Consumer<Message.Builder>... messages)
The messages that you want to send to the model.ConverseStreamRequest.Builder
messages(Message... messages)
The messages that you want to send to the model.ConverseStreamRequest.Builder
modelId(String modelId)
The ID for the model.ConverseStreamRequest.Builder
overrideConfiguration(Consumer<AwsRequestOverrideConfiguration.Builder> builderConsumer)
ConverseStreamRequest.Builder
overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration)
ConverseStreamRequest.Builder
system(Collection<SystemContentBlock> system)
A system prompt to send to the model.ConverseStreamRequest.Builder
system(Consumer<SystemContentBlock.Builder>... system)
A system prompt to send to the model.ConverseStreamRequest.Builder
system(SystemContentBlock... system)
A system prompt to send to the model.default ConverseStreamRequest.Builder
toolConfig(Consumer<ToolConfiguration.Builder> toolConfig)
Configuration information for the tools that the model can use when generating a response.ConverseStreamRequest.Builder
toolConfig(ToolConfiguration toolConfig)
Configuration information for the tools that the model can use when generating a response.-
Methods inherited from interface software.amazon.awssdk.awscore.AwsRequest.Builder
overrideConfiguration
-
Methods inherited from interface software.amazon.awssdk.services.bedrockruntime.model.BedrockRuntimeRequest.Builder
build
-
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, sdkFields
-
-
-
-
Method Detail
-
modelId
ConverseStreamRequest.Builder modelId(String modelId)
The ID for the model.
The
modelId
to provide depends on the type of model that you use:-
If you use a base model, specify the model ID or its ARN. For a list of model IDs for base models, see Amazon Bedrock base model IDs (on-demand throughput) in the Amazon Bedrock User Guide.
-
If you use a provisioned model, specify the ARN of the Provisioned Throughput. For more information, see Run inference using a Provisioned Throughput in the Amazon Bedrock User Guide.
-
If you use a custom model, first purchase Provisioned Throughput for it. Then specify the ARN of the resulting provisioned model. For more information, see Use a custom model in Amazon Bedrock in the Amazon Bedrock User Guide.
- Parameters:
modelId
- The ID for the model.The
modelId
to provide depends on the type of model that you use:-
If you use a base model, specify the model ID or its ARN. For a list of model IDs for base models, see Amazon Bedrock base model IDs (on-demand throughput) in the Amazon Bedrock User Guide.
-
If you use a provisioned model, specify the ARN of the Provisioned Throughput. For more information, see Run inference using a Provisioned Throughput in the Amazon Bedrock User Guide.
-
If you use a custom model, first purchase Provisioned Throughput for it. Then specify the ARN of the resulting provisioned model. For more information, see Use a custom model in Amazon Bedrock in the Amazon Bedrock User Guide.
-
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
-
messages
ConverseStreamRequest.Builder messages(Collection<Message> messages)
The messages that you want to send to the model.
- Parameters:
messages
- The messages that you want to send to the model.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
messages
ConverseStreamRequest.Builder messages(Message... messages)
The messages that you want to send to the model.
- Parameters:
messages
- The messages that you want to send to the model.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
messages
ConverseStreamRequest.Builder messages(Consumer<Message.Builder>... messages)
The messages that you want to send to the model.
This is a convenience method that creates an instance of theMessage.Builder
avoiding the need to create one manually viaMessage.builder()
.When the
Consumer
completes,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
ConverseStreamRequest.Builder system(Collection<SystemContentBlock> system)
A system prompt to send to the model.
- Parameters:
system
- A system prompt to send to the model.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
system
ConverseStreamRequest.Builder system(SystemContentBlock... system)
A system prompt to send to the model.
- Parameters:
system
- A system prompt to send to the model.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
system
ConverseStreamRequest.Builder system(Consumer<SystemContentBlock.Builder>... system)
A system prompt to send to the model.
This is a convenience method that creates an instance of theSystemContentBlock.Builder
avoiding the need to create one manually viaSystemContentBlock.builder()
.When the
Consumer
completes,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
)
-
inferenceConfig
ConverseStreamRequest.Builder inferenceConfig(InferenceConfiguration inferenceConfig)
Inference parameters to pass to the model.
ConverseStream
supports a base set of inference parameters. If you need to pass additional parameters that the model supports, use theadditionalModelRequestFields
request field.- Parameters:
inferenceConfig
- Inference parameters to pass to the model.ConverseStream
supports a base set of inference parameters. If you need to pass additional parameters that the model supports, use theadditionalModelRequestFields
request field.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
inferenceConfig
default ConverseStreamRequest.Builder inferenceConfig(Consumer<InferenceConfiguration.Builder> inferenceConfig)
Inference parameters to pass to the model.
This is a convenience method that creates an instance of theConverseStream
supports a base set of inference parameters. If you need to pass additional parameters that the model supports, use theadditionalModelRequestFields
request field.InferenceConfiguration.Builder
avoiding the need to create one manually viaInferenceConfiguration.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed toinferenceConfig(InferenceConfiguration)
.- Parameters:
inferenceConfig
- a consumer that will call methods onInferenceConfiguration.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
inferenceConfig(InferenceConfiguration)
-
toolConfig
ConverseStreamRequest.Builder toolConfig(ToolConfiguration toolConfig)
Configuration information for the tools that the model can use when generating a response.
This field is only supported by Anthropic Claude 3 models.
- Parameters:
toolConfig
- Configuration information for the tools that the model can use when generating a response.This field is only supported by Anthropic Claude 3 models.
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
toolConfig
default ConverseStreamRequest.Builder toolConfig(Consumer<ToolConfiguration.Builder> toolConfig)
Configuration information for the tools that the model can use when generating a response.
This field is only supported by Anthropic Claude 3 models.
ToolConfiguration.Builder
avoiding the need to create one manually viaToolConfiguration.builder()
.When the
Consumer
completes,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)
-
guardrailConfig
ConverseStreamRequest.Builder guardrailConfig(GuardrailStreamConfiguration guardrailConfig)
Configuration information for a guardrail that you want to use in the request.
- Parameters:
guardrailConfig
- Configuration information for a guardrail that you want to use in the request.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
guardrailConfig
default ConverseStreamRequest.Builder guardrailConfig(Consumer<GuardrailStreamConfiguration.Builder> guardrailConfig)
Configuration information for a guardrail that you want to use in the request.
This is a convenience method that creates an instance of theGuardrailStreamConfiguration.Builder
avoiding the need to create one manually viaGuardrailStreamConfiguration.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed toguardrailConfig(GuardrailStreamConfiguration)
.- Parameters:
guardrailConfig
- a consumer that will call methods onGuardrailStreamConfiguration.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
guardrailConfig(GuardrailStreamConfiguration)
-
additionalModelRequestFields
ConverseStreamRequest.Builder additionalModelRequestFields(Document additionalModelRequestFields)
Additional inference parameters that the model supports, beyond the base set of inference parameters that
ConverseStream
supports in theinferenceConfig
field.- Parameters:
additionalModelRequestFields
- Additional inference parameters that the model supports, beyond the base set of inference parameters thatConverseStream
supports in theinferenceConfig
field.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
additionalModelResponseFieldPaths
ConverseStreamRequest.Builder additionalModelResponseFieldPaths(Collection<String> additionalModelResponseFieldPaths)
Additional model parameters field paths to return in the response.
ConverseStream
returns the requested fields as a JSON Pointer object in theadditionalModelResponseFields
field. The following is example JSON foradditionalModelResponseFieldPaths
.[ "/stop_sequence" ]
For information about the JSON Pointer syntax, see the Internet Engineering Task Force (IETF) documentation.
ConverseStream
rejects an empty JSON Pointer or incorrectly structured JSON Pointer with a400
error code. if the JSON Pointer is valid, but the requested field is not in the model response, it is ignored byConverseStream
.- Parameters:
additionalModelResponseFieldPaths
- Additional model parameters field paths to return in the response.ConverseStream
returns the requested fields as a JSON Pointer object in theadditionalModelResponseFields
field. The following is example JSON foradditionalModelResponseFieldPaths
.[ "/stop_sequence" ]
For information about the JSON Pointer syntax, see the Internet Engineering Task Force (IETF) documentation.
ConverseStream
rejects an empty JSON Pointer or incorrectly structured JSON Pointer with a400
error code. if the JSON Pointer is valid, but the requested field is not in the model response, it is ignored byConverseStream
.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
additionalModelResponseFieldPaths
ConverseStreamRequest.Builder additionalModelResponseFieldPaths(String... additionalModelResponseFieldPaths)
Additional model parameters field paths to return in the response.
ConverseStream
returns the requested fields as a JSON Pointer object in theadditionalModelResponseFields
field. The following is example JSON foradditionalModelResponseFieldPaths
.[ "/stop_sequence" ]
For information about the JSON Pointer syntax, see the Internet Engineering Task Force (IETF) documentation.
ConverseStream
rejects an empty JSON Pointer or incorrectly structured JSON Pointer with a400
error code. if the JSON Pointer is valid, but the requested field is not in the model response, it is ignored byConverseStream
.- Parameters:
additionalModelResponseFieldPaths
- Additional model parameters field paths to return in the response.ConverseStream
returns the requested fields as a JSON Pointer object in theadditionalModelResponseFields
field. The following is example JSON foradditionalModelResponseFieldPaths
.[ "/stop_sequence" ]
For information about the JSON Pointer syntax, see the Internet Engineering Task Force (IETF) documentation.
ConverseStream
rejects an empty JSON Pointer or incorrectly structured JSON Pointer with a400
error code. if the JSON Pointer is valid, but the requested field is not in the model response, it is ignored byConverseStream
.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
overrideConfiguration
ConverseStreamRequest.Builder overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration)
- Specified by:
overrideConfiguration
in interfaceAwsRequest.Builder
-
overrideConfiguration
ConverseStreamRequest.Builder overrideConfiguration(Consumer<AwsRequestOverrideConfiguration.Builder> builderConsumer)
- Specified by:
overrideConfiguration
in interfaceAwsRequest.Builder
-
-