Show / Hide Table of Contents

Interface CfnPrompt.IPromptVariantProperty

Contains details about a variant of the prompt.

Namespace: Amazon.CDK.AWS.Bedrock
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public interface CfnPrompt.IPromptVariantProperty
Syntax (vb)
Public Interface CfnPrompt.IPromptVariantProperty
Remarks

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-prompt-promptvariant.html

ExampleMetadata: fixture=_generated

Examples
// The code below shows an example of how to instantiate this type.
             // The values are placeholders you should change.
             using Amazon.CDK.AWS.Bedrock;

             var additionalModelRequestFields;
             var any;
             var auto;
             var json;

             var promptVariantProperty = new PromptVariantProperty {
                 Name = "name",
                 TemplateConfiguration = new PromptTemplateConfigurationProperty {
                     Chat = new ChatPromptTemplateConfigurationProperty {
                         Messages = new [] { new MessageProperty {
                             Content = new [] { new ContentBlockProperty {
                                 CachePoint = new CachePointBlockProperty {
                                     Type = "type"
                                 },
                                 Text = "text"
                             } },
                             Role = "role"
                         } },

                         // the properties below are optional
                         InputVariables = new [] { new PromptInputVariableProperty {
                             Name = "name"
                         } },
                         System = new [] { new SystemContentBlockProperty {
                             CachePoint = new CachePointBlockProperty {
                                 Type = "type"
                             },
                             Text = "text"
                         } },
                         ToolConfiguration = new ToolConfigurationProperty {
                             Tools = new [] { new ToolProperty {
                                 CachePoint = new CachePointBlockProperty {
                                     Type = "type"
                                 },
                                 ToolSpec = new ToolSpecificationProperty {
                                     InputSchema = new ToolInputSchemaProperty {
                                         Json = json
                                     },
                                     Name = "name",

                                     // the properties below are optional
                                     Description = "description"
                                 }
                             } },

                             // the properties below are optional
                             ToolChoice = new ToolChoiceProperty {
                                 Any = any,
                                 Auto = auto,
                                 Tool = new SpecificToolChoiceProperty {
                                     Name = "name"
                                 }
                             }
                         }
                     },
                     Text = new TextPromptTemplateConfigurationProperty {
                         CachePoint = new CachePointBlockProperty {
                             Type = "type"
                         },
                         InputVariables = new [] { new PromptInputVariableProperty {
                             Name = "name"
                         } },
                         Text = "text",
                         TextS3Location = new TextS3LocationProperty {
                             Bucket = "bucket",
                             Key = "key",

                             // the properties below are optional
                             Version = "version"
                         }
                     }
                 },
                 TemplateType = "templateType",

                 // the properties below are optional
                 AdditionalModelRequestFields = additionalModelRequestFields,
                 GenAiResource = new PromptGenAiResourceProperty {
                     Agent = new PromptAgentResourceProperty {
                         AgentIdentifier = "agentIdentifier"
                     }
                 },
                 InferenceConfiguration = new PromptInferenceConfigurationProperty {
                     Text = new PromptModelInferenceConfigurationProperty {
                         MaxTokens = 123,
                         StopSequences = new [] { "stopSequences" },
                         Temperature = 123,
                         TopP = 123
                     }
                 },
                 Metadata = new [] { new PromptMetadataEntryProperty {
                     Key = "key",
                     Value = "value"
                 } },
                 ModelId = "modelId"
             };

Synopsis

Properties

AdditionalModelRequestFields

Contains model-specific inference configurations that aren't in the inferenceConfiguration field.

GenAiResource

Specifies a generative AI resource with which to use the prompt.

InferenceConfiguration

Contains inference configurations for the prompt variant.

Metadata

An array of objects, each containing a key-value pair that defines a metadata tag and value to attach to a prompt variant.

ModelId

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

Name

The name of the prompt variant.

TemplateConfiguration

Contains configurations for the prompt template.

TemplateType

The type of prompt template to use.

Properties

AdditionalModelRequestFields

Contains model-specific inference configurations that aren't in the inferenceConfiguration field.

object? AdditionalModelRequestFields { get; }
Property Value

object

Remarks

To see model-specific inference parameters, see Inference request parameters and response fields for foundation models .

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-prompt-promptvariant.html#cfn-bedrock-prompt-promptvariant-additionalmodelrequestfields

GenAiResource

Specifies a generative AI resource with which to use the prompt.

object? GenAiResource { get; }
Property Value

object

Remarks

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-prompt-promptvariant.html#cfn-bedrock-prompt-promptvariant-genairesource

Type union: either IResolvable or CfnPrompt.IPromptGenAiResourceProperty

InferenceConfiguration

Contains inference configurations for the prompt variant.

object? InferenceConfiguration { get; }
Property Value

object

Remarks

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-prompt-promptvariant.html#cfn-bedrock-prompt-promptvariant-inferenceconfiguration

Type union: either IResolvable or CfnPrompt.IPromptInferenceConfigurationProperty

Metadata

An array of objects, each containing a key-value pair that defines a metadata tag and value to attach to a prompt variant.

object? Metadata { get; }
Property Value

object

Remarks

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-prompt-promptvariant.html#cfn-bedrock-prompt-promptvariant-metadata

Type union: either IResolvable or (either IResolvable or CfnPrompt.IPromptMetadataEntryProperty)[]

ModelId

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

string? ModelId { get; }
Property Value

string

Remarks

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-prompt-promptvariant.html#cfn-bedrock-prompt-promptvariant-modelid

Name

The name of the prompt variant.

string Name { get; }
Property Value

string

Remarks

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-prompt-promptvariant.html#cfn-bedrock-prompt-promptvariant-name

TemplateConfiguration

Contains configurations for the prompt template.

object TemplateConfiguration { get; }
Property Value

object

Remarks

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-prompt-promptvariant.html#cfn-bedrock-prompt-promptvariant-templateconfiguration

Type union: either IResolvable or CfnPrompt.IPromptTemplateConfigurationProperty

TemplateType

The type of prompt template to use.

string TemplateType { get; }
Property Value

string

Remarks

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-prompt-promptvariant.html#cfn-bedrock-prompt-promptvariant-templatetype

Back to top Generated by DocFX