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