generative-ai-cdk-constructs

@cdklabs/generative-ai-cdk-constructsDocs


@cdklabs/generative-ai-cdk-constructs / bedrock / PromptVariant

Class: abstract PromptVariant

Variants are specific sets of inputs that guide FMs on Amazon Bedrock to generate an appropriate response or output for a given task or instruction. You can optimize the prompt for specific use cases and models.

Constructors

new PromptVariant()

protected new PromptVariant(): PromptVariant

Returns

PromptVariant

Properties

inferenceConfiguration?

abstract optional inferenceConfiguration: PromptInferenceConfigurationProperty

The inference configuration.


modelId?

abstract optional modelId: string

The unique identifier of the model with which to run inference on the prompt.


name

abstract name: string

The name of the prompt variant.


templateConfiguration

abstract templateConfiguration: PromptTemplateConfigurationProperty

The template configuration.


templateType

abstract templateType: TEXT

The type of prompt template.

Methods

text()

static text(props): PromptVariant

Static method to create a text template

Parameters

props: TextPromptVariantProps

Returns

PromptVariant