Interface PromptVersionProps
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
PromptVersionProps.Jsii$Proxy
@Generated(value="jsii-pacmak/1.112.0 (build de1bc80)",
date="2025-07-29T17:51:11.514Z")
@Stability(Experimental)
public interface PromptVersionProps
extends software.amazon.jsii.JsiiSerializable
(experimental) Properties for creating a CDK managed Bedrock Prompt Version.
Example:
Key cmk = Key.Builder.create(this, "cmk").build(); BedrockFoundationModel claudeModel = BedrockFoundationModel.ANTHROPIC_CLAUDE_SONNET_V1_0; IPromptVariant variant1 = PromptVariant.text(TextPromptVariantProps.builder() .variantName("variant1") .model(claudeModel) .promptVariables(List.of("topic")) .promptText("This is my first text prompt. Please summarize our conversation on: {{topic}}.") .inferenceConfiguration(PromptInferenceConfiguration.text(PromptInferenceConfigurationProps.builder() .temperature(1) .topP(0.999) .maxTokens(2000) .build())) .build()); Prompt prompt1 = Prompt.Builder.create(this, "prompt1") .promptName("prompt1") .description("my first prompt") .defaultVariant(variant1) .variants(List.of(variant1)) .kmsKey(cmk) .build(); PromptVersion promptVersion = PromptVersion.Builder.create(this, "MyPromptVersion") .prompt(prompt1) .description("my first version") .build(); //or alternatively: // const promptVersion = prompt1.createVersion('my first version'); String versionString = promptVersion.getVersion();
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final class
A builder forPromptVersionProps
static final class
An implementation forPromptVersionProps
-
Method Summary
Modifier and TypeMethodDescriptionstatic PromptVersionProps.Builder
builder()
default String
(experimental) The description of the prompt version.(experimental) The prompt to use for this version.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getPrompt
(experimental) The prompt to use for this version. -
getDescription
(experimental) The description of the prompt version.Default: - No description provided. Maximum length: 200
-
builder
- Returns:
- a
PromptVersionProps.Builder
ofPromptVersionProps
-