Interface RetrieveAndGenerateResponse.Builder
- All Superinterfaces:
AwsResponse.Builder
,BedrockAgentRuntimeResponse.Builder
,Buildable
,CopyableBuilder<RetrieveAndGenerateResponse.Builder,
,RetrieveAndGenerateResponse> SdkBuilder<RetrieveAndGenerateResponse.Builder,
,RetrieveAndGenerateResponse> SdkPojo
,SdkResponse.Builder
- Enclosing class:
RetrieveAndGenerateResponse
-
Method Summary
Modifier and TypeMethodDescriptioncitations
(Collection<Citation> citations) A list of segments of the generated response that are based on sources in the knowledge base, alongside information about the sources.citations
(Consumer<Citation.Builder>... citations) A list of segments of the generated response that are based on sources in the knowledge base, alongside information about the sources.A list of segments of the generated response that are based on sources in the knowledge base, alongside information about the sources.Contains the response generated from querying the knowledge base.output
(RetrieveAndGenerateOutput output) Contains the response generated from querying the knowledge base.The unique identifier of the session.Methods inherited from interface software.amazon.awssdk.services.bedrockagentruntime.model.BedrockAgentRuntimeResponse.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, sdkFields
Methods inherited from interface software.amazon.awssdk.core.SdkResponse.Builder
sdkHttpResponse, sdkHttpResponse
-
Method Details
-
citations
A list of segments of the generated response that are based on sources in the knowledge base, alongside information about the sources.
- Parameters:
citations
- A list of segments of the generated response that are based on sources in the knowledge base, alongside information about the sources.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
citations
A list of segments of the generated response that are based on sources in the knowledge base, alongside information about the sources.
- Parameters:
citations
- A list of segments of the generated response that are based on sources in the knowledge base, alongside information about the sources.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
citations
A list of segments of the generated response that are based on sources in the knowledge base, alongside information about the sources.
This is a convenience method that creates an instance of theCitation.Builder
avoiding the need to create one manually viaCitation.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed tocitations(List<Citation>)
.- Parameters:
citations
- a consumer that will call methods onCitation.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
output
Contains the response generated from querying the knowledge base.
- Parameters:
output
- Contains the response generated from querying the knowledge base.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
output
default RetrieveAndGenerateResponse.Builder output(Consumer<RetrieveAndGenerateOutput.Builder> output) Contains the response generated from querying the knowledge base.
This is a convenience method that creates an instance of theRetrieveAndGenerateOutput.Builder
avoiding the need to create one manually viaRetrieveAndGenerateOutput.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed tooutput(RetrieveAndGenerateOutput)
.- Parameters:
output
- a consumer that will call methods onRetrieveAndGenerateOutput.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
sessionId
The unique identifier of the session. Reuse the same value to continue the same session with the knowledge base.
- Parameters:
sessionId
- The unique identifier of the session. Reuse the same value to continue the same session with the knowledge base.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-