Interface AgenticRetrieveResponse.Builder
- All Superinterfaces:
AwsResponse.Builder,Buildable,ContextResponse.Builder,CopyableBuilder<AgenticRetrieveResponse.Builder,,AgenticRetrieveResponse> SdkBuilder<AgenticRetrieveResponse.Builder,,AgenticRetrieveResponse> SdkPojo,SdkResponse.Builder
- Enclosing class:
AgenticRetrieveResponse
-
Method Summary
Modifier and TypeMethodDescriptionThe synthesized natural-language answer, when one was generated.default AgenticRetrieveResponse.BuilderauthorizationRequired(Consumer<AuthorizationRequired.Builder> authorizationRequired) Present when you must authorize access to a third-party resource.authorizationRequired(AuthorizationRequired authorizationRequired) Present when you must authorize access to a third-party resource.citations(Collection<Citation> citations) Maps spans of answer to the supporting entities, when an answer was generated.citations(Consumer<Citation.Builder>... citations) Maps spans of answer to the supporting entities, when an answer was generated.Maps spans of answer to the supporting entities, when an answer was generated.retrievedContext(Collection<RetrievedContext> retrievedContext) The ranked, structured context that the agent assembled across all iterations, without duplicates.retrievedContext(Consumer<RetrievedContext.Builder>... retrievedContext) The ranked, structured context that the agent assembled across all iterations, without duplicates.retrievedContext(RetrievedContext... retrievedContext) The ranked, structured context that the agent assembled across all iterations, without duplicates.Methods inherited from interface software.amazon.awssdk.services.context.model.ContextResponse.Builder
build, responseMetadata, responseMetadataMethods inherited from interface software.amazon.awssdk.utils.builder.CopyableBuilder
copyMethods inherited from interface software.amazon.awssdk.utils.builder.SdkBuilder
applyMutation, buildMethods inherited from interface software.amazon.awssdk.core.SdkPojo
equalsBySdkFields, sdkFieldNameToField, sdkFieldsMethods inherited from interface software.amazon.awssdk.core.SdkResponse.Builder
sdkHttpResponse, sdkHttpResponse
-
Method Details
-
retrievedContext
The ranked, structured context that the agent assembled across all iterations, without duplicates. Always present. Each entry is a graph node, a graph edge, or a document.
- Parameters:
retrievedContext- The ranked, structured context that the agent assembled across all iterations, without duplicates. Always present. Each entry is a graph node, a graph edge, or a document.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
retrievedContext
The ranked, structured context that the agent assembled across all iterations, without duplicates. Always present. Each entry is a graph node, a graph edge, or a document.
- Parameters:
retrievedContext- The ranked, structured context that the agent assembled across all iterations, without duplicates. Always present. Each entry is a graph node, a graph edge, or a document.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
retrievedContext
AgenticRetrieveResponse.Builder retrievedContext(Consumer<RetrievedContext.Builder>... retrievedContext) The ranked, structured context that the agent assembled across all iterations, without duplicates. Always present. Each entry is a graph node, a graph edge, or a document.
This is a convenience method that creates an instance of theRetrievedContext.Builderavoiding the need to create one manually viaRetrievedContext.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed toretrievedContext(List<RetrievedContext>).- Parameters:
retrievedContext- a consumer that will call methods onRetrievedContext.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
answer
The synthesized natural-language answer, when one was generated.
- Parameters:
answer- The synthesized natural-language answer, when one was generated.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
citations
Maps spans of answer to the supporting entities, when an answer was generated.
- Parameters:
citations- Maps spans of answer to the supporting entities, when an answer was generated.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
citations
Maps spans of answer to the supporting entities, when an answer was generated.
- Parameters:
citations- Maps spans of answer to the supporting entities, when an answer was generated.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
citations
Maps spans of answer to the supporting entities, when an answer was generated.
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 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:
-
authorizationRequired
Present when you must authorize access to a third-party resource. If
retrievedContextis empty, no result was retrieved. Otherwise, the result leaves out one or more resources that you have not authorized. ShowauthorizationUrlto the user and retry after they consent.- Parameters:
authorizationRequired- Present when you must authorize access to a third-party resource. IfretrievedContextis empty, no result was retrieved. Otherwise, the result leaves out one or more resources that you have not authorized. ShowauthorizationUrlto the user and retry after they consent.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
authorizationRequired
default AgenticRetrieveResponse.Builder authorizationRequired(Consumer<AuthorizationRequired.Builder> authorizationRequired) Present when you must authorize access to a third-party resource. If
This is a convenience method that creates an instance of theretrievedContextis empty, no result was retrieved. Otherwise, the result leaves out one or more resources that you have not authorized. ShowauthorizationUrlto the user and retry after they consent.AuthorizationRequired.Builderavoiding the need to create one manually viaAuthorizationRequired.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed toauthorizationRequired(AuthorizationRequired).- Parameters:
authorizationRequired- a consumer that will call methods onAuthorizationRequired.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-