Class AgentPromptVariantProps.Builder
java.lang.Object
software.amazon.awscdk.services.bedrock.alpha.AgentPromptVariantProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<AgentPromptVariantProps>
- Enclosing interface:
AgentPromptVariantProps
@Stability(Experimental)
public static final class AgentPromptVariantProps.Builder
extends Object
implements software.amazon.jsii.Builder<AgentPromptVariantProps>
A builder for
AgentPromptVariantProps
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionagentAlias
(IAgentAlias agentAlias) Sets the value ofAgentPromptVariantProps.getAgentAlias()
build()
Builds the configured instance.model
(IBedrockInvokable model) Sets the value ofCommonPromptVariantProps.getModel()
promptText
(String promptText) Sets the value ofAgentPromptVariantProps.getPromptText()
promptVariables
(List<String> promptVariables) Sets the value ofCommonPromptVariantProps.getPromptVariables()
variantName
(String variantName) Sets the value ofCommonPromptVariantProps.getVariantName()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
agentAlias
Sets the value ofAgentPromptVariantProps.getAgentAlias()
- Parameters:
agentAlias
- An alias pointing to the agent version to be used. This parameter is required.- Returns:
this
-
promptText
Sets the value ofAgentPromptVariantProps.getPromptText()
- Parameters:
promptText
- The text prompt. This parameter is required. Variables are used by enclosing its name with double curly braces as in{{variable_name}}
.- Returns:
this
-
model
Sets the value ofCommonPromptVariantProps.getModel()
- Parameters:
model
- The model which is used to run the prompt. This parameter is required. The model could be a foundation model, a custom model, or a provisioned model.- Returns:
this
-
variantName
Sets the value ofCommonPromptVariantProps.getVariantName()
- Parameters:
variantName
- The name of the prompt variant. This parameter is required.- Returns:
this
-
promptVariables
@Stability(Experimental) public AgentPromptVariantProps.Builder promptVariables(List<String> promptVariables) Sets the value ofCommonPromptVariantProps.getPromptVariables()
- Parameters:
promptVariables
- The variables in the prompt template that can be filled in at runtime.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<AgentPromptVariantProps>
- Returns:
- a new instance of
AgentPromptVariantProps
- Throws:
NullPointerException
- if any required attribute was not provided
-