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
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 |
| 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
Remarks
GenAiResource
Specifies a generative AI resource with which to use the prompt.
object? GenAiResource { get; }
Property Value
Remarks
InferenceConfiguration
Contains inference configurations for the prompt variant.
object? InferenceConfiguration { get; }
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.
object? Metadata { get; }
Property Value
Remarks
ModelId
The unique identifier of the model or inference profile with which to run inference on the prompt.
string? ModelId { get; }
Property Value
Remarks
Name
The name of the prompt variant.
string Name { get; }
Property Value
Remarks
TemplateConfiguration
Contains configurations for the prompt template.
object TemplateConfiguration { get; }
Property Value
Remarks
TemplateType
The type of prompt template to use.
string TemplateType { get; }