Class CfnFlow.KnowledgeBaseFlowNodeConfigurationProperty.Builder
java.lang.Object
software.amazon.awscdk.services.bedrock.CfnFlow.KnowledgeBaseFlowNodeConfigurationProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnFlow.KnowledgeBaseFlowNodeConfigurationProperty>
- Enclosing interface:
CfnFlow.KnowledgeBaseFlowNodeConfigurationProperty
@Stability(Stable)
public static final class CfnFlow.KnowledgeBaseFlowNodeConfigurationProperty.Builder
extends Object
implements software.amazon.jsii.Builder<CfnFlow.KnowledgeBaseFlowNodeConfigurationProperty>
A builder for
CfnFlow.KnowledgeBaseFlowNodeConfigurationProperty
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.guardrailConfiguration
(IResolvable guardrailConfiguration) guardrailConfiguration
(CfnFlow.GuardrailConfigurationProperty guardrailConfiguration) inferenceConfiguration
(IResolvable inferenceConfiguration) inferenceConfiguration
(CfnFlow.PromptInferenceConfigurationProperty inferenceConfiguration) knowledgeBaseId
(String knowledgeBaseId) Sets the value ofCfnFlow.KnowledgeBaseFlowNodeConfigurationProperty.getKnowledgeBaseId()
Sets the value ofCfnFlow.KnowledgeBaseFlowNodeConfigurationProperty.getModelId()
numberOfResults
(Number numberOfResults) Sets the value ofCfnFlow.KnowledgeBaseFlowNodeConfigurationProperty.getNumberOfResults()
orchestrationConfiguration
(IResolvable orchestrationConfiguration) orchestrationConfiguration
(CfnFlow.KnowledgeBaseOrchestrationConfigurationProperty orchestrationConfiguration) promptTemplate
(IResolvable promptTemplate) Sets the value ofCfnFlow.KnowledgeBaseFlowNodeConfigurationProperty.getPromptTemplate()
promptTemplate
(CfnFlow.KnowledgeBasePromptTemplateProperty promptTemplate) Sets the value ofCfnFlow.KnowledgeBaseFlowNodeConfigurationProperty.getPromptTemplate()
rerankingConfiguration
(IResolvable rerankingConfiguration) rerankingConfiguration
(CfnFlow.VectorSearchRerankingConfigurationProperty rerankingConfiguration)
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
knowledgeBaseId
@Stability(Stable) public CfnFlow.KnowledgeBaseFlowNodeConfigurationProperty.Builder knowledgeBaseId(String knowledgeBaseId) Sets the value ofCfnFlow.KnowledgeBaseFlowNodeConfigurationProperty.getKnowledgeBaseId()
- Parameters:
knowledgeBaseId
- The unique identifier of the knowledge base to query. This parameter is required.- Returns:
this
-
guardrailConfiguration
@Stability(Stable) public CfnFlow.KnowledgeBaseFlowNodeConfigurationProperty.Builder guardrailConfiguration(IResolvable guardrailConfiguration) - Parameters:
guardrailConfiguration
- Contains configurations for a guardrail to apply during query and response generation for the knowledge base in this configuration.- Returns:
this
-
guardrailConfiguration
@Stability(Stable) public CfnFlow.KnowledgeBaseFlowNodeConfigurationProperty.Builder guardrailConfiguration(CfnFlow.GuardrailConfigurationProperty guardrailConfiguration) - Parameters:
guardrailConfiguration
- Contains configurations for a guardrail to apply during query and response generation for the knowledge base in this configuration.- Returns:
this
-
inferenceConfiguration
@Stability(Stable) public CfnFlow.KnowledgeBaseFlowNodeConfigurationProperty.Builder inferenceConfiguration(IResolvable inferenceConfiguration) - Parameters:
inferenceConfiguration
- Contains inference configurations for the prompt.- Returns:
this
-
inferenceConfiguration
@Stability(Stable) public CfnFlow.KnowledgeBaseFlowNodeConfigurationProperty.Builder inferenceConfiguration(CfnFlow.PromptInferenceConfigurationProperty inferenceConfiguration) - Parameters:
inferenceConfiguration
- Contains inference configurations for the prompt.- Returns:
this
-
modelId
@Stability(Stable) public CfnFlow.KnowledgeBaseFlowNodeConfigurationProperty.Builder modelId(String modelId) Sets the value ofCfnFlow.KnowledgeBaseFlowNodeConfigurationProperty.getModelId()
- 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:
this
-
numberOfResults
@Stability(Stable) public CfnFlow.KnowledgeBaseFlowNodeConfigurationProperty.Builder numberOfResults(Number numberOfResults) Sets the value ofCfnFlow.KnowledgeBaseFlowNodeConfigurationProperty.getNumberOfResults()
- Parameters:
numberOfResults
- The number of results to retrieve from the knowledge base.- Returns:
this
-
orchestrationConfiguration
@Stability(Stable) public CfnFlow.KnowledgeBaseFlowNodeConfigurationProperty.Builder orchestrationConfiguration(IResolvable orchestrationConfiguration) Sets the value ofCfnFlow.KnowledgeBaseFlowNodeConfigurationProperty.getOrchestrationConfiguration()
- Parameters:
orchestrationConfiguration
- The configuration for orchestrating the retrieval and generation process in the knowledge base node.- Returns:
this
-
orchestrationConfiguration
@Stability(Stable) public CfnFlow.KnowledgeBaseFlowNodeConfigurationProperty.Builder orchestrationConfiguration(CfnFlow.KnowledgeBaseOrchestrationConfigurationProperty orchestrationConfiguration) Sets the value ofCfnFlow.KnowledgeBaseFlowNodeConfigurationProperty.getOrchestrationConfiguration()
- Parameters:
orchestrationConfiguration
- The configuration for orchestrating the retrieval and generation process in the knowledge base node.- Returns:
this
-
promptTemplate
@Stability(Stable) public CfnFlow.KnowledgeBaseFlowNodeConfigurationProperty.Builder promptTemplate(IResolvable promptTemplate) Sets the value ofCfnFlow.KnowledgeBaseFlowNodeConfigurationProperty.getPromptTemplate()
- Parameters:
promptTemplate
- A custom prompt template to use with the knowledge base for generating responses.- Returns:
this
-
promptTemplate
@Stability(Stable) public CfnFlow.KnowledgeBaseFlowNodeConfigurationProperty.Builder promptTemplate(CfnFlow.KnowledgeBasePromptTemplateProperty promptTemplate) Sets the value ofCfnFlow.KnowledgeBaseFlowNodeConfigurationProperty.getPromptTemplate()
- Parameters:
promptTemplate
- A custom prompt template to use with the knowledge base for generating responses.- Returns:
this
-
rerankingConfiguration
@Stability(Stable) public CfnFlow.KnowledgeBaseFlowNodeConfigurationProperty.Builder rerankingConfiguration(IResolvable rerankingConfiguration) - Parameters:
rerankingConfiguration
- The configuration for reranking the retrieved results from the knowledge base to improve relevance.- Returns:
this
-
rerankingConfiguration
@Stability(Stable) public CfnFlow.KnowledgeBaseFlowNodeConfigurationProperty.Builder rerankingConfiguration(CfnFlow.VectorSearchRerankingConfigurationProperty rerankingConfiguration) - Parameters:
rerankingConfiguration
- The configuration for reranking the retrieved results from the knowledge base to improve relevance.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnFlow.KnowledgeBaseFlowNodeConfigurationProperty>
- Returns:
- a new instance of
CfnFlow.KnowledgeBaseFlowNodeConfigurationProperty
- Throws:
NullPointerException
- if any required attribute was not provided
-