Class TextPromptVariantProps.Builder
java.lang.Object
software.amazon.awscdk.services.bedrock.alpha.TextPromptVariantProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<TextPromptVariantProps>
- Enclosing interface:
TextPromptVariantProps
@Stability(Experimental)
public static final class TextPromptVariantProps.Builder
extends Object
implements software.amazon.jsii.Builder<TextPromptVariantProps>
A builder for
TextPromptVariantProps-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the configured instance.inferenceConfiguration(PromptInferenceConfiguration inferenceConfiguration) Sets the value ofTextPromptVariantProps.getInferenceConfiguration()model(IBedrockInvokable model) Sets the value ofCommonPromptVariantProps.getModel()promptText(String promptText) Sets the value ofTextPromptVariantProps.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
-
promptText
Sets the value ofTextPromptVariantProps.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
-
inferenceConfiguration
@Stability(Experimental) public TextPromptVariantProps.Builder inferenceConfiguration(PromptInferenceConfiguration inferenceConfiguration) Sets the value ofTextPromptVariantProps.getInferenceConfiguration()- Parameters:
inferenceConfiguration- Inference configuration for the Text Prompt.- 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 TextPromptVariantProps.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:
buildin interfacesoftware.amazon.jsii.Builder<TextPromptVariantProps>- Returns:
- a new instance of
TextPromptVariantProps - Throws:
NullPointerException- if any required attribute was not provided
-