Class PromptInferenceConfiguration
java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.bedrock.alpha.PromptInferenceConfiguration
- All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable
@Generated(value="jsii-pacmak/1.112.0 (build de1bc80)",
date="2025-07-24T11:33:25.555Z")
@Stability(Experimental)
public abstract class PromptInferenceConfiguration
extends software.amazon.jsii.JsiiObject
(experimental) Abstract base class for prompt inference configurations.
This provides a high-level abstraction over the underlying CloudFormation inference configuration properties, offering a more developer-friendly interface while maintaining full compatibility with the underlying AWS Bedrock service.
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();
-
Nested Class Summary
Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
protected
PromptInferenceConfiguration
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
PromptInferenceConfiguration
(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescriptionstatic PromptInferenceConfiguration
(experimental) Creates a text inference configuration.Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Constructor Details
-
PromptInferenceConfiguration
protected PromptInferenceConfiguration(software.amazon.jsii.JsiiObjectRef objRef) -
PromptInferenceConfiguration
protected PromptInferenceConfiguration(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
PromptInferenceConfiguration
@Stability(Experimental) protected PromptInferenceConfiguration()
-
-
Method Details
-
text
@Stability(Experimental) @NotNull public static PromptInferenceConfiguration text(@NotNull PromptInferenceConfigurationProps props) (experimental) Creates a text inference configuration.- Parameters:
props
- This parameter is required.
-