Interface PromptVersionProps
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
PromptVersionProps.Jsii$Proxy
@Generated(value="jsii-pacmak/1.119.0 (build 1634eac)",
date="2025-11-20T13:52:15.635Z")
@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 classA builder forPromptVersionPropsstatic final classAn implementation forPromptVersionProps -
Method Summary
Modifier and TypeMethodDescriptionstatic PromptVersionProps.Builderbuilder()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.BuilderofPromptVersionProps
-