Interface RetrieveAndGenerateResponse.Builder
-
- All Superinterfaces:
AwsResponse.Builder,BedrockAgentRuntimeResponse.Builder,Buildable,CopyableBuilder<RetrieveAndGenerateResponse.Builder,RetrieveAndGenerateResponse>,SdkBuilder<RetrieveAndGenerateResponse.Builder,RetrieveAndGenerateResponse>,SdkPojo,SdkResponse.Builder
- Enclosing class:
- RetrieveAndGenerateResponse
public static interface RetrieveAndGenerateResponse.Builder extends BedrockAgentRuntimeResponse.Builder, SdkPojo, CopyableBuilder<RetrieveAndGenerateResponse.Builder,RetrieveAndGenerateResponse>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description RetrieveAndGenerateResponse.Buildercitations(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.RetrieveAndGenerateResponse.Buildercitations(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.RetrieveAndGenerateResponse.Buildercitations(Citation... citations)A list of segments of the generated response that are based on sources in the knowledge base, alongside information about the sources.default RetrieveAndGenerateResponse.Builderoutput(Consumer<RetrieveAndGenerateOutput.Builder> output)Contains the response generated from querying the knowledge base.RetrieveAndGenerateResponse.Builderoutput(RetrieveAndGenerateOutput output)Contains the response generated from querying the knowledge base.RetrieveAndGenerateResponse.BuildersessionId(String sessionId)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 Detail
-
citations
RetrieveAndGenerateResponse.Builder citations(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.
- 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
RetrieveAndGenerateResponse.Builder citations(Citation... 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
RetrieveAndGenerateResponse.Builder 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.
This is a convenience method that creates an instance of theCitation.Builderavoiding the need to create one manually viaCitation.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed to#citations(List.) - 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:
#citations(java.util.Collection)
-
output
RetrieveAndGenerateResponse.Builder output(RetrieveAndGenerateOutput 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.Builderavoiding the need to create one manually viaRetrieveAndGenerateOutput.builder().When the
Consumercompletes,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:
output(RetrieveAndGenerateOutput)
-
sessionId
RetrieveAndGenerateResponse.Builder sessionId(String 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.
-
-