Class CfnPromptVersionPropsMixin.PromptVariantProperty
Contains details about a variant of the prompt.
Implements
Inherited Members
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
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 |
| 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
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
Remarks
To see model-specific inference parameters, see Inference request parameters and response fields for foundation models .
GenAiResource
Specifies a generative AI resource with which to use the prompt.
public object? GenAiResource { get; set; }
Property Value
Remarks
InferenceConfiguration
Contains inference configurations for the prompt variant.
public object? InferenceConfiguration { get; set; }
Property Value
Remarks
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
Remarks
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
Remarks
Name
The name of the prompt variant.
public string? Name { get; set; }
Property Value
Remarks
TemplateConfiguration
Contains configurations for the prompt template.
public object? TemplateConfiguration { get; set; }
Property Value
Remarks
TemplateType
The type of prompt template to use.
public string? TemplateType { get; set; }