Interface ConverseResponse.Builder
-
- All Superinterfaces:
AwsResponse.Builder,BedrockRuntimeResponse.Builder,Buildable,CopyableBuilder<ConverseResponse.Builder,ConverseResponse>,SdkBuilder<ConverseResponse.Builder,ConverseResponse>,SdkPojo,SdkResponse.Builder
- Enclosing class:
- ConverseResponse
@Mutable @NotThreadSafe public static interface ConverseResponse.Builder extends BedrockRuntimeResponse.Builder, SdkPojo, CopyableBuilder<ConverseResponse.Builder,ConverseResponse>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description ConverseResponse.BuilderadditionalModelResponseFields(Document additionalModelResponseFields)Additional fields in the response that are unique to the model.default ConverseResponse.Buildermetrics(Consumer<ConverseMetrics.Builder> metrics)Metrics for the call toConverse.ConverseResponse.Buildermetrics(ConverseMetrics metrics)Metrics for the call toConverse.default ConverseResponse.Builderoutput(Consumer<ConverseOutput.Builder> output)The result from the call toConverse.ConverseResponse.Builderoutput(ConverseOutput output)The result from the call toConverse.default ConverseResponse.BuilderperformanceConfig(Consumer<PerformanceConfiguration.Builder> performanceConfig)Model performance settings for the request.ConverseResponse.BuilderperformanceConfig(PerformanceConfiguration performanceConfig)Model performance settings for the request.ConverseResponse.BuilderstopReason(String stopReason)The reason why the model stopped generating output.ConverseResponse.BuilderstopReason(StopReason stopReason)The reason why the model stopped generating output.default ConverseResponse.Buildertrace(Consumer<ConverseTrace.Builder> trace)A trace object that contains information about the Guardrail behavior.ConverseResponse.Buildertrace(ConverseTrace trace)A trace object that contains information about the Guardrail behavior.default ConverseResponse.Builderusage(Consumer<TokenUsage.Builder> usage)The total number of tokens used in the call toConverse.ConverseResponse.Builderusage(TokenUsage usage)The total number of tokens used in the call toConverse.-
Methods inherited from interface software.amazon.awssdk.services.bedrockruntime.model.BedrockRuntimeResponse.Builder
build, responseMetadata, responseMetadata
-
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
-
Methods inherited from interface software.amazon.awssdk.core.SdkResponse.Builder
sdkHttpResponse, sdkHttpResponse
-
-
-
-
Method Detail
-
output
ConverseResponse.Builder output(ConverseOutput output)
The result from the call to
Converse.- Parameters:
output- The result from the call toConverse.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
output
default ConverseResponse.Builder output(Consumer<ConverseOutput.Builder> output)
The result from the call to
This is a convenience method that creates an instance of theConverse.ConverseOutput.Builderavoiding the need to create one manually viaConverseOutput.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed tooutput(ConverseOutput).- Parameters:
output- a consumer that will call methods onConverseOutput.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
output(ConverseOutput)
-
stopReason
ConverseResponse.Builder stopReason(String stopReason)
The reason why the model stopped generating output.
- Parameters:
stopReason- The reason why the model stopped generating output.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
StopReason,StopReason
-
stopReason
ConverseResponse.Builder stopReason(StopReason stopReason)
The reason why the model stopped generating output.
- Parameters:
stopReason- The reason why the model stopped generating output.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
StopReason,StopReason
-
usage
ConverseResponse.Builder usage(TokenUsage usage)
The total number of tokens used in the call to
Converse. The total includes the tokens input to the model and the tokens generated by the model.- Parameters:
usage- The total number of tokens used in the call toConverse. The total includes the tokens input to the model and the tokens generated by the model.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
usage
default ConverseResponse.Builder usage(Consumer<TokenUsage.Builder> usage)
The total number of tokens used in the call to
This is a convenience method that creates an instance of theConverse. The total includes the tokens input to the model and the tokens generated by the model.TokenUsage.Builderavoiding the need to create one manually viaTokenUsage.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed tousage(TokenUsage).- Parameters:
usage- a consumer that will call methods onTokenUsage.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
usage(TokenUsage)
-
metrics
ConverseResponse.Builder metrics(ConverseMetrics metrics)
Metrics for the call to
Converse.- Parameters:
metrics- Metrics for the call toConverse.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
metrics
default ConverseResponse.Builder metrics(Consumer<ConverseMetrics.Builder> metrics)
Metrics for the call to
This is a convenience method that creates an instance of theConverse.ConverseMetrics.Builderavoiding the need to create one manually viaConverseMetrics.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed tometrics(ConverseMetrics).- Parameters:
metrics- a consumer that will call methods onConverseMetrics.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
metrics(ConverseMetrics)
-
additionalModelResponseFields
ConverseResponse.Builder additionalModelResponseFields(Document additionalModelResponseFields)
Additional fields in the response that are unique to the model.
- Parameters:
additionalModelResponseFields- Additional fields in the response that are unique to the model.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
trace
ConverseResponse.Builder trace(ConverseTrace trace)
A trace object that contains information about the Guardrail behavior.
- Parameters:
trace- A trace object that contains information about the Guardrail behavior.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
trace
default ConverseResponse.Builder trace(Consumer<ConverseTrace.Builder> trace)
A trace object that contains information about the Guardrail behavior.
This is a convenience method that creates an instance of theConverseTrace.Builderavoiding the need to create one manually viaConverseTrace.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed totrace(ConverseTrace).- Parameters:
trace- a consumer that will call methods onConverseTrace.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
trace(ConverseTrace)
-
performanceConfig
ConverseResponse.Builder performanceConfig(PerformanceConfiguration performanceConfig)
Model performance settings for the request.
- Parameters:
performanceConfig- Model performance settings for the request.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
performanceConfig
default ConverseResponse.Builder performanceConfig(Consumer<PerformanceConfiguration.Builder> performanceConfig)
Model performance settings for the request.
This is a convenience method that creates an instance of thePerformanceConfiguration.Builderavoiding the need to create one manually viaPerformanceConfiguration.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed toperformanceConfig(PerformanceConfiguration).- Parameters:
performanceConfig- a consumer that will call methods onPerformanceConfiguration.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
performanceConfig(PerformanceConfiguration)
-
-