Class CfnAgent.PromptConfigurationProperty.Builder
java.lang.Object
software.amazon.awscdk.services.bedrock.CfnAgent.PromptConfigurationProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnAgent.PromptConfigurationProperty>
- Enclosing interface:
CfnAgent.PromptConfigurationProperty
@Stability(Stable)
public static final class CfnAgent.PromptConfigurationProperty.Builder
extends Object
implements software.amazon.jsii.Builder<CfnAgent.PromptConfigurationProperty>
A builder for
CfnAgent.PromptConfigurationProperty
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbasePromptTemplate
(String basePromptTemplate) Sets the value ofCfnAgent.PromptConfigurationProperty.getBasePromptTemplate()
build()
Builds the configured instance.inferenceConfiguration
(IResolvable inferenceConfiguration) Sets the value ofCfnAgent.PromptConfigurationProperty.getInferenceConfiguration()
inferenceConfiguration
(CfnAgent.InferenceConfigurationProperty inferenceConfiguration) Sets the value ofCfnAgent.PromptConfigurationProperty.getInferenceConfiguration()
parserMode
(String parserMode) Sets the value ofCfnAgent.PromptConfigurationProperty.getParserMode()
promptCreationMode
(String promptCreationMode) Sets the value ofCfnAgent.PromptConfigurationProperty.getPromptCreationMode()
promptState
(String promptState) Sets the value ofCfnAgent.PromptConfigurationProperty.getPromptState()
promptType
(String promptType) Sets the value ofCfnAgent.PromptConfigurationProperty.getPromptType()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
basePromptTemplate
@Stability(Stable) public CfnAgent.PromptConfigurationProperty.Builder basePromptTemplate(String basePromptTemplate) Sets the value ofCfnAgent.PromptConfigurationProperty.getBasePromptTemplate()
- Parameters:
basePromptTemplate
- Defines the prompt template with which to replace the default prompt template. You can use placeholder variables in the base prompt template to customize the prompt. For more information, see Prompt template placeholder variables . For more information, see Configure the prompt templates .- Returns:
this
-
inferenceConfiguration
@Stability(Stable) public CfnAgent.PromptConfigurationProperty.Builder inferenceConfiguration(IResolvable inferenceConfiguration) Sets the value ofCfnAgent.PromptConfigurationProperty.getInferenceConfiguration()
- Parameters:
inferenceConfiguration
- Contains inference parameters to use when the agent invokes a foundation model in the part of the agent sequence defined by thepromptType
. For more information, see Inference parameters for foundation models .- Returns:
this
-
inferenceConfiguration
@Stability(Stable) public CfnAgent.PromptConfigurationProperty.Builder inferenceConfiguration(CfnAgent.InferenceConfigurationProperty inferenceConfiguration) Sets the value ofCfnAgent.PromptConfigurationProperty.getInferenceConfiguration()
- Parameters:
inferenceConfiguration
- Contains inference parameters to use when the agent invokes a foundation model in the part of the agent sequence defined by thepromptType
. For more information, see Inference parameters for foundation models .- Returns:
this
-
parserMode
@Stability(Stable) public CfnAgent.PromptConfigurationProperty.Builder parserMode(String parserMode) Sets the value ofCfnAgent.PromptConfigurationProperty.getParserMode()
- Parameters:
parserMode
- Specifies whether to override the default parser Lambda function when parsing the raw foundation model output in the part of the agent sequence defined by thepromptType
. If you set the field asOVERRIDEN
, theoverrideLambda
field in the PromptOverrideConfiguration must be specified with the ARN of a Lambda function.- Returns:
this
-
promptCreationMode
@Stability(Stable) public CfnAgent.PromptConfigurationProperty.Builder promptCreationMode(String promptCreationMode) Sets the value ofCfnAgent.PromptConfigurationProperty.getPromptCreationMode()
- Parameters:
promptCreationMode
- Specifies whether to override the default prompt template for thispromptType
. Set this value toOVERRIDDEN
to use the prompt that you provide in thebasePromptTemplate
. If you leave it asDEFAULT
, the agent uses a default prompt template.- Returns:
this
-
promptState
@Stability(Stable) public CfnAgent.PromptConfigurationProperty.Builder promptState(String promptState) Sets the value ofCfnAgent.PromptConfigurationProperty.getPromptState()
- Parameters:
promptState
- Specifies whether to allow the agent to carry out the step specified in thepromptType
. If you set this value toDISABLED
, the agent skips that step. The default state for eachpromptType
is as follows.PRE_PROCESSING
–ENABLED
ORCHESTRATION
–ENABLED
KNOWLEDGE_BASE_RESPONSE_GENERATION
–ENABLED
POST_PROCESSING
–DISABLED
- Returns:
this
-
promptType
@Stability(Stable) public CfnAgent.PromptConfigurationProperty.Builder promptType(String promptType) Sets the value ofCfnAgent.PromptConfigurationProperty.getPromptType()
- Parameters:
promptType
- The step in the agent sequence that this prompt configuration applies to.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnAgent.PromptConfigurationProperty>
- Returns:
- a new instance of
CfnAgent.PromptConfigurationProperty
- Throws:
NullPointerException
- if any required attribute was not provided
-