Skip to content
v2.276.0

Experimental

@aws-cdk/aws-bedrock-alpha is an experimental (alpha) package: its API may change in any release, without a major version bump.

CommonPromptVariantProps Struct ​

Common properties for all prompt variants.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as bedrock_alpha from '@aws-cdk/aws-bedrock-alpha';

declare const bedrockInvokable: bedrock_alpha.IBedrockInvokable;
const commonPromptVariantProps: bedrock_alpha.CommonPromptVariantProps = {
  model: bedrockInvokable,
  variantName: 'variantName',

  // the properties below are optional
  promptVariables: ['promptVariables'],
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_bedrock_alpha as bedrock_alpha

# bedrock_invokable: bedrock_alpha.IBedrockInvokable

common_prompt_variant_props = bedrock_alpha.CommonPromptVariantProps(
    model=bedrock_invokable,
    variant_name="variantName",

    # the properties below are optional
    prompt_variables=["promptVariables"]
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.bedrock.alpha.*;

IBedrockInvokable bedrockInvokable;

CommonPromptVariantProps commonPromptVariantProps = CommonPromptVariantProps.builder()
        .model(bedrockInvokable)
        .variantName("variantName")

        // the properties below are optional
        .promptVariables(List.of("promptVariables"))
        .build();
csharp
// Install: dotnet add package Amazon.CDK.AWS.Bedrock.Alpha
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Bedrock.Alpha;

IBedrockInvokable bedrockInvokable;

var commonPromptVariantProps = new CommonPromptVariantProps {
    Model = bedrockInvokable,
    VariantName = "variantName",

    // the properties below are optional
    PromptVariables = new [] { "promptVariables" }
};
go
// Install: go get github.com/aws/aws-cdk-go/awsbedrockalpha/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import bedrock_alpha "github.com/aws/aws-cdk-go/awsbedrockalpha"

var bedrockInvokable IBedrockInvokable

commonPromptVariantProps := &CommonPromptVariantProps{
	Model: bedrockInvokable,
	VariantName: jsii.String("variantName"),

	// the properties below are optional
	PromptVariables: []*string{
		jsii.String("promptVariables"),
	},
}

Properties ​

The model which is used to run the prompt.

The model could be a foundation model, a custom model, or a provisioned model.

promptVariablesoptionalstring[]prompt_variablesoptionaltyping.List[str]promptVariablesoptionalList<String>PromptVariablesoptionalstring[]PromptVariablesoptional*[]*string#
The variables in the prompt template that can be filled in at runtime.

Default: No variables defined.

variantNamestringvariant_namestrvariantNameStringVariantNamestringVariantName*stringrequired#
The name of the prompt variant.