PromptVariant - Amazon Bedrock

PromptVariant

Contains details about a variant of the prompt.

Contents

name

The name of the prompt variant.

Type: String

Pattern: ^([0-9a-zA-Z][_-]?){1,100}$

Required: Yes

templateConfiguration

Contains configurations for the prompt template.

Type: PromptTemplateConfiguration object

Note: This object is a Union. Only one member of this object can be specified or returned.

Required: Yes

templateType

The type of prompt template to use.

Type: String

Valid Values: TEXT | CHAT

Required: Yes

additionalModelRequestFields

Contains model-specific inference configurations that aren't in the inferenceConfiguration field. To see model-specific inference parameters, see Inference request parameters and response fields for foundation models.

Type: JSON value

Required: No

genAiResource

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

Type: PromptGenAiResource object

Note: This object is a Union. Only one member of this object can be specified or returned.

Required: No

inferenceConfiguration

Contains inference configurations for the prompt variant.

Type: PromptInferenceConfiguration object

Note: This object is a Union. Only one member of this object can be specified or returned.

Required: No

metadata

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

Type: Array of PromptMetadataEntry objects

Array Members: Minimum number of 0 items. Maximum number of 50 items.

Required: No

modelId

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

Type: String

Length Constraints: Minimum length of 1. Maximum length of 2048.

Pattern: ^(arn:aws(-[^:]{1,12})?:(bedrock|sagemaker):[a-z0-9-]{1,20}:([0-9]{12})?:([a-z-]+/)?)?([a-zA-Z0-9.-]{1,63}){0,2}(([:][a-z0-9-]{1,63}){0,2})?(/[a-z0-9]{1,12})?$

Required: No

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: