Show / Hide Table of Contents

Class CfnPromptVersionPropsMixin.PromptVariantProperty

Contains details about a variant of the prompt.

Inheritance
object
CfnPromptVersionPropsMixin.PromptVariantProperty
Implements
CfnPromptVersionPropsMixin.IPromptVariantProperty
Inherited Members
object.GetType()
object.MemberwiseClone()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: Amazon.CDK.Mixins.Preview.AWS.Bedrock.Mixins
Assembly: Amazon.CDK.Mixins.Preview.dll
Syntax (csharp)
public class CfnPromptVersionPropsMixin.PromptVariantProperty : CfnPromptVersionPropsMixin.IPromptVariantProperty
Syntax (vb)
Public Class CfnPromptVersionPropsMixin.PromptVariantProperty Implements CfnPromptVersionPropsMixin.IPromptVariantProperty
Remarks

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-promptversion-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.Mixins.Preview.AWS.Bedrock.Mixins;

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

             var promptVariantProperty = new PromptVariantProperty {
                 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",
                 Name = "name",
                 TemplateConfiguration = new PromptTemplateConfigurationProperty {
                     Chat = new ChatPromptTemplateConfigurationProperty {
                         InputVariables = new [] { new PromptInputVariableProperty {
                             Name = "name"
                         } },
                         Messages = new [] { new MessageProperty {
                             Content = new [] { new ContentBlockProperty {
                                 CachePoint = new CachePointBlockProperty {
                                     Type = "type"
                                 },
                                 Text = "text"
                             } },
                             Role = "role"
                         } },
                         System = new [] { new SystemContentBlockProperty {
                             CachePoint = new CachePointBlockProperty {
                                 Type = "type"
                             },
                             Text = "text"
                         } },
                         ToolConfiguration = new ToolConfigurationProperty {
                             ToolChoice = new ToolChoiceProperty {
                                 Any = any,
                                 Auto = auto,
                                 Tool = new SpecificToolChoiceProperty {
                                     Name = "name"
                                 }
                             },
                             Tools = new [] { new ToolProperty {
                                 CachePoint = new CachePointBlockProperty {
                                     Type = "type"
                                 },
                                 ToolSpec = new ToolSpecificationProperty {
                                     Description = "description",
                                     InputSchema = new ToolInputSchemaProperty {
                                         Json = json
                                     },
                                     Name = "name"
                                 }
                             } }
                         }
                     },
                     Text = new TextPromptTemplateConfigurationProperty {
                         CachePoint = new CachePointBlockProperty {
                             Type = "type"
                         },
                         InputVariables = new [] { new PromptInputVariableProperty {
                             Name = "name"
                         } },
                         Text = "text"
                     }
                 },
                 TemplateType = "templateType"
             };

Synopsis

Constructors

PromptVariantProperty()

Contains details about a variant of the prompt.

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.

Constructors

PromptVariantProperty()

Contains details about a variant of the prompt.

public PromptVariantProperty()
Remarks

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-promptversion-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.Mixins.Preview.AWS.Bedrock.Mixins;

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

             var promptVariantProperty = new PromptVariantProperty {
                 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",
                 Name = "name",
                 TemplateConfiguration = new PromptTemplateConfigurationProperty {
                     Chat = new ChatPromptTemplateConfigurationProperty {
                         InputVariables = new [] { new PromptInputVariableProperty {
                             Name = "name"
                         } },
                         Messages = new [] { new MessageProperty {
                             Content = new [] { new ContentBlockProperty {
                                 CachePoint = new CachePointBlockProperty {
                                     Type = "type"
                                 },
                                 Text = "text"
                             } },
                             Role = "role"
                         } },
                         System = new [] { new SystemContentBlockProperty {
                             CachePoint = new CachePointBlockProperty {
                                 Type = "type"
                             },
                             Text = "text"
                         } },
                         ToolConfiguration = new ToolConfigurationProperty {
                             ToolChoice = new ToolChoiceProperty {
                                 Any = any,
                                 Auto = auto,
                                 Tool = new SpecificToolChoiceProperty {
                                     Name = "name"
                                 }
                             },
                             Tools = new [] { new ToolProperty {
                                 CachePoint = new CachePointBlockProperty {
                                     Type = "type"
                                 },
                                 ToolSpec = new ToolSpecificationProperty {
                                     Description = "description",
                                     InputSchema = new ToolInputSchemaProperty {
                                         Json = json
                                     },
                                     Name = "name"
                                 }
                             } }
                         }
                     },
                     Text = new TextPromptTemplateConfigurationProperty {
                         CachePoint = new CachePointBlockProperty {
                             Type = "type"
                         },
                         InputVariables = new [] { new PromptInputVariableProperty {
                             Name = "name"
                         } },
                         Text = "text"
                     }
                 },
                 TemplateType = "templateType"
             };

Properties

AdditionalModelRequestFields

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

public object? AdditionalModelRequestFields { get; set; }
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-promptversion-promptvariant.html#cfn-bedrock-promptversion-promptvariant-additionalmodelrequestfields

GenAiResource

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

public object? GenAiResource { get; set; }
Property Value

object

Remarks

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

Type union: either IResolvable or CfnPromptVersionPropsMixin.IPromptGenAiResourceProperty

InferenceConfiguration

Contains inference configurations for the prompt variant.

public object? InferenceConfiguration { get; set; }
Property Value

object

Remarks

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

Type union: either IResolvable or CfnPromptVersionPropsMixin.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.

public object? Metadata { get; set; }
Property Value

object

Remarks

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

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

ModelId

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

public string? ModelId { get; set; }
Property Value

string

Remarks

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

Name

The name of the prompt variant.

public string? Name { get; set; }
Property Value

string

Remarks

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

TemplateConfiguration

Contains configurations for the prompt template.

public object? TemplateConfiguration { get; set; }
Property Value

object

Remarks

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

Type union: either IResolvable or CfnPromptVersionPropsMixin.IPromptTemplateConfigurationProperty

TemplateType

The type of prompt template to use.

public string? TemplateType { get; set; }
Property Value

string

Remarks

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

Implements

CfnPromptVersionPropsMixin.IPromptVariantProperty
Back to top Generated by DocFX