Interface KnowledgeBaseFlowNodeConfiguration.Builder
- All Superinterfaces:
Buildable
,CopyableBuilder<KnowledgeBaseFlowNodeConfiguration.Builder,
,KnowledgeBaseFlowNodeConfiguration> SdkBuilder<KnowledgeBaseFlowNodeConfiguration.Builder,
,KnowledgeBaseFlowNodeConfiguration> SdkPojo
- Enclosing class:
KnowledgeBaseFlowNodeConfiguration
-
Method Summary
Modifier and TypeMethodDescriptionguardrailConfiguration
(Consumer<GuardrailConfiguration.Builder> guardrailConfiguration) Contains configurations for a guardrail to apply during query and response generation for the knowledge base in this configuration.guardrailConfiguration
(GuardrailConfiguration guardrailConfiguration) Contains configurations for a guardrail to apply during query and response generation for the knowledge base in this configuration.inferenceConfiguration
(Consumer<PromptInferenceConfiguration.Builder> inferenceConfiguration) Contains inference configurations for the prompt.inferenceConfiguration
(PromptInferenceConfiguration inferenceConfiguration) Contains inference configurations for the prompt.knowledgeBaseId
(String knowledgeBaseId) The unique identifier of the knowledge base to query.The unique identifier of the model or inference profile to use to generate a response from the query results.numberOfResults
(Integer numberOfResults) The number of results to retrieve from the knowledge base.orchestrationConfiguration
(Consumer<KnowledgeBaseOrchestrationConfiguration.Builder> orchestrationConfiguration) The configuration for orchestrating the retrieval and generation process in the knowledge base node.orchestrationConfiguration
(KnowledgeBaseOrchestrationConfiguration orchestrationConfiguration) The configuration for orchestrating the retrieval and generation process in the knowledge base node.promptTemplate
(Consumer<KnowledgeBasePromptTemplate.Builder> promptTemplate) A custom prompt template to use with the knowledge base for generating responses.promptTemplate
(KnowledgeBasePromptTemplate promptTemplate) A custom prompt template to use with the knowledge base for generating responses.rerankingConfiguration
(Consumer<VectorSearchRerankingConfiguration.Builder> rerankingConfiguration) The configuration for reranking the retrieved results from the knowledge base to improve relevance.rerankingConfiguration
(VectorSearchRerankingConfiguration rerankingConfiguration) The configuration for reranking the retrieved results from the knowledge base to improve relevance.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
-
Method Details
-
guardrailConfiguration
KnowledgeBaseFlowNodeConfiguration.Builder guardrailConfiguration(GuardrailConfiguration guardrailConfiguration) Contains configurations for a guardrail to apply during query and response generation for the knowledge base in this configuration.
- Parameters:
guardrailConfiguration
- Contains configurations for a guardrail to apply during query and response generation for the knowledge base in this configuration.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
guardrailConfiguration
default KnowledgeBaseFlowNodeConfiguration.Builder guardrailConfiguration(Consumer<GuardrailConfiguration.Builder> guardrailConfiguration) Contains configurations for a guardrail to apply during query and response generation for the knowledge base in this configuration.
This is a convenience method that creates an instance of theGuardrailConfiguration.Builder
avoiding the need to create one manually viaGuardrailConfiguration.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed toguardrailConfiguration(GuardrailConfiguration)
.- Parameters:
guardrailConfiguration
- a consumer that will call methods onGuardrailConfiguration.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
inferenceConfiguration
KnowledgeBaseFlowNodeConfiguration.Builder inferenceConfiguration(PromptInferenceConfiguration inferenceConfiguration) Contains inference configurations for the prompt.
- Parameters:
inferenceConfiguration
- Contains inference configurations for the prompt.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
inferenceConfiguration
default KnowledgeBaseFlowNodeConfiguration.Builder inferenceConfiguration(Consumer<PromptInferenceConfiguration.Builder> inferenceConfiguration) Contains inference configurations for the prompt.
This is a convenience method that creates an instance of thePromptInferenceConfiguration.Builder
avoiding the need to create one manually viaPromptInferenceConfiguration.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed toinferenceConfiguration(PromptInferenceConfiguration)
.- Parameters:
inferenceConfiguration
- a consumer that will call methods onPromptInferenceConfiguration.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
knowledgeBaseId
The unique identifier of the knowledge base to query.
- Parameters:
knowledgeBaseId
- The unique identifier of the knowledge base to query.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
modelId
The unique identifier of the model or inference profile to use to generate a response from the query results. Omit this field if you want to return the retrieved results as an array.
- Parameters:
modelId
- The unique identifier of the model or inference profile to use to generate a response from the query results. Omit this field if you want to return the retrieved results as an array.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
numberOfResults
The number of results to retrieve from the knowledge base.
- Parameters:
numberOfResults
- The number of results to retrieve from the knowledge base.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
orchestrationConfiguration
KnowledgeBaseFlowNodeConfiguration.Builder orchestrationConfiguration(KnowledgeBaseOrchestrationConfiguration orchestrationConfiguration) The configuration for orchestrating the retrieval and generation process in the knowledge base node.
- Parameters:
orchestrationConfiguration
- The configuration for orchestrating the retrieval and generation process in the knowledge base node.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
orchestrationConfiguration
default KnowledgeBaseFlowNodeConfiguration.Builder orchestrationConfiguration(Consumer<KnowledgeBaseOrchestrationConfiguration.Builder> orchestrationConfiguration) The configuration for orchestrating the retrieval and generation process in the knowledge base node.
This is a convenience method that creates an instance of theKnowledgeBaseOrchestrationConfiguration.Builder
avoiding the need to create one manually viaKnowledgeBaseOrchestrationConfiguration.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed toorchestrationConfiguration(KnowledgeBaseOrchestrationConfiguration)
.- Parameters:
orchestrationConfiguration
- a consumer that will call methods onKnowledgeBaseOrchestrationConfiguration.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
promptTemplate
KnowledgeBaseFlowNodeConfiguration.Builder promptTemplate(KnowledgeBasePromptTemplate promptTemplate) A custom prompt template to use with the knowledge base for generating responses.
- Parameters:
promptTemplate
- A custom prompt template to use with the knowledge base for generating responses.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
promptTemplate
default KnowledgeBaseFlowNodeConfiguration.Builder promptTemplate(Consumer<KnowledgeBasePromptTemplate.Builder> promptTemplate) A custom prompt template to use with the knowledge base for generating responses.
This is a convenience method that creates an instance of theKnowledgeBasePromptTemplate.Builder
avoiding the need to create one manually viaKnowledgeBasePromptTemplate.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed topromptTemplate(KnowledgeBasePromptTemplate)
.- Parameters:
promptTemplate
- a consumer that will call methods onKnowledgeBasePromptTemplate.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
rerankingConfiguration
KnowledgeBaseFlowNodeConfiguration.Builder rerankingConfiguration(VectorSearchRerankingConfiguration rerankingConfiguration) The configuration for reranking the retrieved results from the knowledge base to improve relevance.
- Parameters:
rerankingConfiguration
- The configuration for reranking the retrieved results from the knowledge base to improve relevance.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
rerankingConfiguration
default KnowledgeBaseFlowNodeConfiguration.Builder rerankingConfiguration(Consumer<VectorSearchRerankingConfiguration.Builder> rerankingConfiguration) The configuration for reranking the retrieved results from the knowledge base to improve relevance.
This is a convenience method that creates an instance of theVectorSearchRerankingConfiguration.Builder
avoiding the need to create one manually viaVectorSearchRerankingConfiguration.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed torerankingConfiguration(VectorSearchRerankingConfiguration)
.- Parameters:
rerankingConfiguration
- a consumer that will call methods onVectorSearchRerankingConfiguration.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-