Class PromptProps.Builder
java.lang.Object
software.amazon.awscdk.services.bedrock.alpha.PromptProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<PromptProps>
- Enclosing interface:
PromptProps
@Stability(Experimental)
public static final class PromptProps.Builder
extends Object
implements software.amazon.jsii.Builder<PromptProps>
A builder for
PromptProps
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.defaultVariant
(IPromptVariant defaultVariant) Sets the value ofPromptProps.getDefaultVariant()
description
(String description) Sets the value ofPromptProps.getDescription()
Sets the value ofPromptProps.getKmsKey()
promptName
(String promptName) Sets the value ofPromptProps.getPromptName()
Sets the value ofPromptProps.getTags()
variants
(List<? extends IPromptVariant> variants) Sets the value ofPromptProps.getVariants()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
promptName
Sets the value ofPromptProps.getPromptName()
- Parameters:
promptName
- The name of the prompt. This parameter is required. This will be used as the physical name of the prompt. Allowed Pattern: ^([0-9a-zA-Z][_-]?){1,100}$- Returns:
this
-
defaultVariant
Sets the value ofPromptProps.getDefaultVariant()
- Parameters:
defaultVariant
- The Prompt Variant that will be used by default.- Returns:
this
-
description
Sets the value ofPromptProps.getDescription()
- Parameters:
description
- A description of what the prompt does.- Returns:
this
-
kmsKey
Sets the value ofPromptProps.getKmsKey()
- Parameters:
kmsKey
- The KMS key that the prompt is encrypted with.- Returns:
this
-
tags
Sets the value ofPromptProps.getTags()
- Parameters:
tags
- Tags to apply to the prompt.- Returns:
this
-
variants
@Stability(Experimental) public PromptProps.Builder variants(List<? extends IPromptVariant> variants) Sets the value ofPromptProps.getVariants()
- Parameters:
variants
- The variants of your prompt. Variants can use different messages, models, or configurations so that you can compare their outputs to decide the best variant for your use case. Maximum of 1 variants.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<PromptProps>
- Returns:
- a new instance of
PromptProps
- Throws:
NullPointerException
- if any required attribute was not provided
-