Class CfnAgentPropsMixin.PromptConfigurationProperty.Builder
java.lang.Object
software.amazon.awscdk.cfnpropertymixins.services.bedrock.CfnAgentPropsMixin.PromptConfigurationProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnAgentPropsMixin.PromptConfigurationProperty>
- Enclosing interface:
CfnAgentPropsMixin.PromptConfigurationProperty
@Stability(Stable)
public static final class CfnAgentPropsMixin.PromptConfigurationProperty.Builder
extends Object
implements software.amazon.jsii.Builder<CfnAgentPropsMixin.PromptConfigurationProperty>
A builder for
CfnAgentPropsMixin.PromptConfigurationProperty-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionadditionalModelRequestFields(Object additionalModelRequestFields) basePromptTemplate(String basePromptTemplate) Sets the value ofCfnAgentPropsMixin.PromptConfigurationProperty.getBasePromptTemplate()build()Builds the configured instance.foundationModel(String foundationModel) Sets the value ofCfnAgentPropsMixin.PromptConfigurationProperty.getFoundationModel()inferenceConfiguration(CfnAgentPropsMixin.InferenceConfigurationProperty inferenceConfiguration) inferenceConfiguration(IResolvable inferenceConfiguration) parserMode(String parserMode) Sets the value ofCfnAgentPropsMixin.PromptConfigurationProperty.getParserMode()promptCreationMode(String promptCreationMode) Sets the value ofCfnAgentPropsMixin.PromptConfigurationProperty.getPromptCreationMode()promptState(String promptState) Sets the value ofCfnAgentPropsMixin.PromptConfigurationProperty.getPromptState()promptType(String promptType) Sets the value ofCfnAgentPropsMixin.PromptConfigurationProperty.getPromptType()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
additionalModelRequestFields
@Stability(Stable) public CfnAgentPropsMixin.PromptConfigurationProperty.Builder additionalModelRequestFields(Object additionalModelRequestFields) - Parameters:
additionalModelRequestFields- If the Converse or ConverseStream operations support the model,additionalModelRequestFieldscontains additional inference parameters, beyond the base set of inference parameters in theinferenceConfigurationfield. For more information, see Inference request parameters and response fields for foundation models .- Returns:
this
-
basePromptTemplate
@Stability(Stable) public CfnAgentPropsMixin.PromptConfigurationProperty.Builder basePromptTemplate(String basePromptTemplate) Sets the value ofCfnAgentPropsMixin.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
-
foundationModel
@Stability(Stable) public CfnAgentPropsMixin.PromptConfigurationProperty.Builder foundationModel(String foundationModel) Sets the value ofCfnAgentPropsMixin.PromptConfigurationProperty.getFoundationModel()- Parameters:
foundationModel- The agent's foundation model.- Returns:
this
-
inferenceConfiguration
@Stability(Stable) public CfnAgentPropsMixin.PromptConfigurationProperty.Builder inferenceConfiguration(IResolvable inferenceConfiguration) - 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 CfnAgentPropsMixin.PromptConfigurationProperty.Builder inferenceConfiguration(CfnAgentPropsMixin.InferenceConfigurationProperty inferenceConfiguration) - 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 CfnAgentPropsMixin.PromptConfigurationProperty.Builder parserMode(String parserMode) Sets the value ofCfnAgentPropsMixin.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 asOVERRIDDEN, theoverrideLambdafield in the PromptOverrideConfiguration must be specified with the ARN of a Lambda function.- Returns:
this
-
promptCreationMode
@Stability(Stable) public CfnAgentPropsMixin.PromptConfigurationProperty.Builder promptCreationMode(String promptCreationMode) Sets the value ofCfnAgentPropsMixin.PromptConfigurationProperty.getPromptCreationMode()- Parameters:
promptCreationMode- Specifies whether to override the default prompt template for thispromptType. Set this value toOVERRIDDENto 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 CfnAgentPropsMixin.PromptConfigurationProperty.Builder promptState(String promptState) Sets the value ofCfnAgentPropsMixin.PromptConfigurationProperty.getPromptState()- Parameters:
promptState- Specifies whether to allow the inline agent to carry out the step specified in thepromptType. If you set this value toDISABLED, the agent skips that step. The default state for eachpromptTypeis as follows.PRE_PROCESSING–ENABLEDORCHESTRATION–ENABLEDKNOWLEDGE_BASE_RESPONSE_GENERATION–ENABLEDPOST_PROCESSING–DISABLED
- Returns:
this
-
promptType
@Stability(Stable) public CfnAgentPropsMixin.PromptConfigurationProperty.Builder promptType(String promptType) Sets the value ofCfnAgentPropsMixin.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:
buildin interfacesoftware.amazon.jsii.Builder<CfnAgentPropsMixin.PromptConfigurationProperty>- Returns:
- a new instance of
CfnAgentPropsMixin.PromptConfigurationProperty - Throws:
NullPointerException- if any required attribute was not provided
-