CfnPromptProps Struct
Properties for defining a CfnPrompt.
Example
ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_bedrock as bedrock } from 'aws-cdk-lib';
declare const additionalModelRequestFields: any;
declare const any: any;
declare const auto: any;
declare const json: any;
const cfnPromptProps: bedrock.CfnPromptProps = {
name: 'name',
// the properties below are optional
customerEncryptionKeyArn: 'customerEncryptionKeyArn',
defaultVariant: 'defaultVariant',
description: 'description',
tags: {
tagsKey: 'tags',
},
variants: [{
name: 'name',
templateConfiguration: {
chat: {
messages: [{
content: [{
cachePoint: {
type: 'type',
},
text: 'text',
}],
role: 'role',
}],
// the properties below are optional
inputVariables: [{
name: 'name',
}],
system: [{
cachePoint: {
type: 'type',
},
text: 'text',
}],
toolConfiguration: {
tools: [{
cachePoint: {
type: 'type',
},
toolSpec: {
inputSchema: {
json: json,
},
name: 'name',
// the properties below are optional
description: 'description',
},
}],
// the properties below are optional
toolChoice: {
any: any,
auto: auto,
tool: {
name: 'name',
},
},
},
},
text: {
cachePoint: {
type: 'type',
},
inputVariables: [{
name: 'name',
}],
text: 'text',
textS3Location: {
bucket: 'bucket',
key: 'key',
// the properties below are optional
version: 'version',
},
},
},
templateType: 'templateType',
// the properties below are optional
additionalModelRequestFields: additionalModelRequestFields,
genAiResource: {
agent: {
agentIdentifier: 'agentIdentifier',
},
},
inferenceConfiguration: {
text: {
maxTokens: 123,
stopSequences: ['stopSequences'],
temperature: 123,
topP: 123,
},
},
metadata: [{
key: 'key',
value: 'value',
}],
modelId: 'modelId',
}],
};
Properties
customerEncryptionKeyArnoptionalstringcustomer_encryption_key_arnoptionalstrcustomerEncryptionKeyArnoptionalStringCustomerEncryptionKeyArnoptionalstringCustomerEncryptionKeyArnoptional*string#The Amazon Resource Name (ARN) of the KMS key that the prompt is encrypted with.
defaultVariantoptionalstringdefault_variantoptionalstrdefaultVariantoptionalStringDefaultVariantoptionalstringDefaultVariantoptional*string#The name of the default variant for the prompt.
This value must match the name field in the relevant PromptVariant object.
descriptionoptionalstringdescriptionoptionalstrdescriptionoptionalStringDescriptionoptionalstringDescriptionoptional*string#The description of the prompt.
The name of the prompt.
tagsoptional{ [key: string]: string }tagsoptionaltyping.Mapping[str, str]tagsoptionalMap<String, String>TagsoptionalIDictionary<string, string>Tagsoptional*map[string]*string#Metadata that you can assign to a resource as key-value pairs. For more information, see the following resources:.
variantsoptionalIResolvable | IResolvable | CfnPrompt.PromptVariantProperty[]variantsoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, PromptVariantProperty]]]variantsoptionalIResolvableVariantsoptionalIResolvableVariantsoptionalinterface{}#A list of objects, each containing details about a variant of the prompt.