CfnPromptVersionPropsMixin

class aws_cdk.mixins_preview.aws_bedrock.mixins.CfnPromptVersionPropsMixin(props, *, strategy=None)

Bases: Mixin

Creates a static snapshot of your prompt that can be deployed to production.

For more information, see Deploy prompts using Prompt management by creating versions in the Amazon Bedrock User Guide.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-bedrock-promptversion.html

CloudformationResource:

AWS::Bedrock::PromptVersion

Mixin:

true

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview import mixins
from aws_cdk.mixins_preview.aws_bedrock import mixins as bedrock_mixins

cfn_prompt_version_props_mixin = bedrock_mixins.CfnPromptVersionPropsMixin(bedrock_mixins.CfnPromptVersionMixinProps(
    description="description",
    prompt_arn="promptArn",
    tags={
        "tags_key": "tags"
    }
),
    strategy=mixins.PropertyMergeStrategy.OVERRIDE
)

Create a mixin to apply properties to AWS::Bedrock::PromptVersion.

Parameters:

Methods

apply_to(construct)

Apply the mixin properties to the construct.

Parameters:

construct (IConstruct)

Return type:

IConstruct

supports(construct)

Check if this mixin supports the given construct.

Parameters:

construct (IConstruct)

Return type:

bool

Attributes

CFN_PROPERTY_KEYS = ['description', 'promptArn', 'tags']

Static Methods

classmethod is_mixin(x)

(experimental) Checks if x is a Mixin.

Parameters:

x (Any) – Any object.

Return type:

bool

Returns:

true if x is an object created from a class which extends Mixin.

Stability:

experimental

CachePointBlockProperty

class CfnPromptVersionPropsMixin.CachePointBlockProperty(*, type=None)

Bases: object

Defines a section of content to be cached for reuse in subsequent API calls.

Parameters:

type (Optional[str]) – Specifies the type of cache point within the CachePointBlock.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-promptversion-cachepointblock.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_bedrock import mixins as bedrock_mixins

cache_point_block_property = bedrock_mixins.CfnPromptVersionPropsMixin.CachePointBlockProperty(
    type="type"
)

Attributes

type

Specifies the type of cache point within the CachePointBlock.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-promptversion-cachepointblock.html#cfn-bedrock-promptversion-cachepointblock-type

ChatPromptTemplateConfigurationProperty

class CfnPromptVersionPropsMixin.ChatPromptTemplateConfigurationProperty(*, input_variables=None, messages=None, system=None, tool_configuration=None)

Bases: object

Contains configurations to use a prompt in a conversational format.

For more information, see Create a prompt using Prompt management .

Parameters:
See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-promptversion-chatprompttemplateconfiguration.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_bedrock import mixins as bedrock_mixins

# any: Any
# auto: Any
# json: Any

chat_prompt_template_configuration_property = bedrock_mixins.CfnPromptVersionPropsMixin.ChatPromptTemplateConfigurationProperty(
    input_variables=[bedrock_mixins.CfnPromptVersionPropsMixin.PromptInputVariableProperty(
        name="name"
    )],
    messages=[bedrock_mixins.CfnPromptVersionPropsMixin.MessageProperty(
        content=[bedrock_mixins.CfnPromptVersionPropsMixin.ContentBlockProperty(
            cache_point=bedrock_mixins.CfnPromptVersionPropsMixin.CachePointBlockProperty(
                type="type"
            ),
            text="text"
        )],
        role="role"
    )],
    system=[bedrock_mixins.CfnPromptVersionPropsMixin.SystemContentBlockProperty(
        cache_point=bedrock_mixins.CfnPromptVersionPropsMixin.CachePointBlockProperty(
            type="type"
        ),
        text="text"
    )],
    tool_configuration=bedrock_mixins.CfnPromptVersionPropsMixin.ToolConfigurationProperty(
        tool_choice=bedrock_mixins.CfnPromptVersionPropsMixin.ToolChoiceProperty(
            any=any,
            auto=auto,
            tool=bedrock_mixins.CfnPromptVersionPropsMixin.SpecificToolChoiceProperty(
                name="name"
            )
        ),
        tools=[bedrock_mixins.CfnPromptVersionPropsMixin.ToolProperty(
            cache_point=bedrock_mixins.CfnPromptVersionPropsMixin.CachePointBlockProperty(
                type="type"
            ),
            tool_spec=bedrock_mixins.CfnPromptVersionPropsMixin.ToolSpecificationProperty(
                description="description",
                input_schema=bedrock_mixins.CfnPromptVersionPropsMixin.ToolInputSchemaProperty(
                    json=json
                ),
                name="name"
            )
        )]
    )
)

Attributes

input_variables

An array of the variables in the prompt template.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-promptversion-chatprompttemplateconfiguration.html#cfn-bedrock-promptversion-chatprompttemplateconfiguration-inputvariables

messages

Contains messages in the chat for the prompt.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-promptversion-chatprompttemplateconfiguration.html#cfn-bedrock-promptversion-chatprompttemplateconfiguration-messages

system

Contains system prompts to provide context to the model or to describe how it should behave.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-promptversion-chatprompttemplateconfiguration.html#cfn-bedrock-promptversion-chatprompttemplateconfiguration-system

tool_configuration

Configuration information for the tools that the model can use when generating a response.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-promptversion-chatprompttemplateconfiguration.html#cfn-bedrock-promptversion-chatprompttemplateconfiguration-toolconfiguration

ContentBlockProperty

class CfnPromptVersionPropsMixin.ContentBlockProperty(*, cache_point=None, text=None)

Bases: object

A block of content for a message that you pass to, or receive from, a model with the Converse or ConverseStream API operations.

Parameters:
  • cache_point (Union[IResolvable, CachePointBlockProperty, Dict[str, Any], None]) – CachePoint to include in the message.

  • text (Optional[str]) – Text to include in the message.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-promptversion-contentblock.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_bedrock import mixins as bedrock_mixins

content_block_property = bedrock_mixins.CfnPromptVersionPropsMixin.ContentBlockProperty(
    cache_point=bedrock_mixins.CfnPromptVersionPropsMixin.CachePointBlockProperty(
        type="type"
    ),
    text="text"
)

Attributes

cache_point

CachePoint to include in the message.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-promptversion-contentblock.html#cfn-bedrock-promptversion-contentblock-cachepoint

text

Text to include in the message.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-promptversion-contentblock.html#cfn-bedrock-promptversion-contentblock-text

MessageProperty

class CfnPromptVersionPropsMixin.MessageProperty(*, content=None, role=None)

Bases: object

A message input, or returned from, a call to Converse or ConverseStream .

Parameters:
  • content (Union[IResolvable, Sequence[Union[IResolvable, ContentBlockProperty, Dict[str, Any]]], None]) – The message content. Note the following restrictions:. - You can include up to 20 images. Each image’s size, height, and width must be no more than 3.75 MB, 8000 px, and 8000 px, respectively. - You can include up to five documents. Each document’s size must be no more than 4.5 MB. - If you include a ContentBlock with a document field in the array, you must also include a ContentBlock with a text field. - You can only include images and documents if the role is user .

  • role (Optional[str]) – The role that the message plays in the message.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-promptversion-message.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_bedrock import mixins as bedrock_mixins

message_property = bedrock_mixins.CfnPromptVersionPropsMixin.MessageProperty(
    content=[bedrock_mixins.CfnPromptVersionPropsMixin.ContentBlockProperty(
        cache_point=bedrock_mixins.CfnPromptVersionPropsMixin.CachePointBlockProperty(
            type="type"
        ),
        text="text"
    )],
    role="role"
)

Attributes

content

.

  • You can include up to 20 images. Each image’s size, height, and width must be no more than 3.75 MB, 8000 px, and 8000 px, respectively.

  • You can include up to five documents. Each document’s size must be no more than 4.5 MB.

  • If you include a ContentBlock with a document field in the array, you must also include a ContentBlock with a text field.

  • You can only include images and documents if the role is user .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-promptversion-message.html#cfn-bedrock-promptversion-message-content

Type:

The message content. Note the following restrictions

role

The role that the message plays in the message.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-promptversion-message.html#cfn-bedrock-promptversion-message-role

PromptAgentResourceProperty

class CfnPromptVersionPropsMixin.PromptAgentResourceProperty(*, agent_identifier=None)

Bases: object

Contains specifications for an Amazon Bedrock agent with which to use the prompt.

For more information, see Create a prompt using Prompt management and Automate tasks in your application using conversational agents .

Parameters:

agent_identifier (Optional[str]) – The ARN of the agent with which to use the prompt.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-promptversion-promptagentresource.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_bedrock import mixins as bedrock_mixins

prompt_agent_resource_property = bedrock_mixins.CfnPromptVersionPropsMixin.PromptAgentResourceProperty(
    agent_identifier="agentIdentifier"
)

Attributes

agent_identifier

The ARN of the agent with which to use the prompt.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-promptversion-promptagentresource.html#cfn-bedrock-promptversion-promptagentresource-agentidentifier

PromptGenAiResourceProperty

class CfnPromptVersionPropsMixin.PromptGenAiResourceProperty(*, agent=None)

Bases: object

Contains specifications for a generative AI resource with which to use the prompt.

For more information, see Create a prompt using Prompt management .

Parameters:

agent (Union[IResolvable, PromptAgentResourceProperty, Dict[str, Any], None]) – Specifies an Amazon Bedrock agent with which to use the prompt.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-promptversion-promptgenairesource.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_bedrock import mixins as bedrock_mixins

prompt_gen_ai_resource_property = bedrock_mixins.CfnPromptVersionPropsMixin.PromptGenAiResourceProperty(
    agent=bedrock_mixins.CfnPromptVersionPropsMixin.PromptAgentResourceProperty(
        agent_identifier="agentIdentifier"
    )
)

Attributes

agent

Specifies an Amazon Bedrock agent with which to use the prompt.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-promptversion-promptgenairesource.html#cfn-bedrock-promptversion-promptgenairesource-agent

PromptInferenceConfigurationProperty

class CfnPromptVersionPropsMixin.PromptInferenceConfigurationProperty(*, text=None)

Bases: object

Contains inference configurations for the prompt.

Parameters:

text (Union[IResolvable, PromptModelInferenceConfigurationProperty, Dict[str, Any], None]) – Contains inference configurations for a text prompt.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-promptversion-promptinferenceconfiguration.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_bedrock import mixins as bedrock_mixins

prompt_inference_configuration_property = bedrock_mixins.CfnPromptVersionPropsMixin.PromptInferenceConfigurationProperty(
    text=bedrock_mixins.CfnPromptVersionPropsMixin.PromptModelInferenceConfigurationProperty(
        max_tokens=123,
        stop_sequences=["stopSequences"],
        temperature=123,
        top_p=123
    )
)

Attributes

text

Contains inference configurations for a text prompt.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-promptversion-promptinferenceconfiguration.html#cfn-bedrock-promptversion-promptinferenceconfiguration-text

PromptInputVariableProperty

class CfnPromptVersionPropsMixin.PromptInputVariableProperty(*, name=None)

Bases: object

Contains information about a variable in the prompt.

Parameters:

name (Optional[str]) – The name of the variable.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-promptversion-promptinputvariable.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_bedrock import mixins as bedrock_mixins

prompt_input_variable_property = bedrock_mixins.CfnPromptVersionPropsMixin.PromptInputVariableProperty(
    name="name"
)

Attributes

name

The name of the variable.

See:

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

PromptMetadataEntryProperty

class CfnPromptVersionPropsMixin.PromptMetadataEntryProperty(*, key=None, value=None)

Bases: object

Contains a key-value pair that defines a metadata tag and value to attach to a prompt variant.

For more information, see Create a prompt using Prompt management .

Parameters:
  • key (Optional[str]) – The key of a metadata tag for a prompt variant.

  • value (Optional[str]) – The value of a metadata tag for a prompt variant.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-promptversion-promptmetadataentry.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_bedrock import mixins as bedrock_mixins

prompt_metadata_entry_property = bedrock_mixins.CfnPromptVersionPropsMixin.PromptMetadataEntryProperty(
    key="key",
    value="value"
)

Attributes

key

The key of a metadata tag for a prompt variant.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-promptversion-promptmetadataentry.html#cfn-bedrock-promptversion-promptmetadataentry-key

value

The value of a metadata tag for a prompt variant.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-promptversion-promptmetadataentry.html#cfn-bedrock-promptversion-promptmetadataentry-value

PromptModelInferenceConfigurationProperty

class CfnPromptVersionPropsMixin.PromptModelInferenceConfigurationProperty(*, max_tokens=None, stop_sequences=None, temperature=None, top_p=None)

Bases: object

Contains inference configurations related to model inference for a prompt.

For more information, see Inference parameters .

Parameters:
  • max_tokens (Union[int, float, None]) – The maximum number of tokens to return in the response.

  • stop_sequences (Optional[Sequence[str]]) – A list of strings that define sequences after which the model will stop generating.

  • temperature (Union[int, float, None]) – Controls the randomness of the response. Choose a lower value for more predictable outputs and a higher value for more surprising outputs.

  • top_p (Union[int, float, None]) – The percentage of most-likely candidates that the model considers for the next token.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-promptversion-promptmodelinferenceconfiguration.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_bedrock import mixins as bedrock_mixins

prompt_model_inference_configuration_property = bedrock_mixins.CfnPromptVersionPropsMixin.PromptModelInferenceConfigurationProperty(
    max_tokens=123,
    stop_sequences=["stopSequences"],
    temperature=123,
    top_p=123
)

Attributes

max_tokens

The maximum number of tokens to return in the response.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-promptversion-promptmodelinferenceconfiguration.html#cfn-bedrock-promptversion-promptmodelinferenceconfiguration-maxtokens

stop_sequences

A list of strings that define sequences after which the model will stop generating.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-promptversion-promptmodelinferenceconfiguration.html#cfn-bedrock-promptversion-promptmodelinferenceconfiguration-stopsequences

temperature

Controls the randomness of the response.

Choose a lower value for more predictable outputs and a higher value for more surprising outputs.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-promptversion-promptmodelinferenceconfiguration.html#cfn-bedrock-promptversion-promptmodelinferenceconfiguration-temperature

top_p

The percentage of most-likely candidates that the model considers for the next token.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-promptversion-promptmodelinferenceconfiguration.html#cfn-bedrock-promptversion-promptmodelinferenceconfiguration-topp

PromptTemplateConfigurationProperty

class CfnPromptVersionPropsMixin.PromptTemplateConfigurationProperty(*, chat=None, text=None)

Bases: object

Contains the message for a prompt.

For more information, see Construct and store reusable prompts with Prompt management in Amazon Bedrock .

Parameters:
See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-promptversion-prompttemplateconfiguration.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_bedrock import mixins as bedrock_mixins

# any: Any
# auto: Any
# json: Any

prompt_template_configuration_property = bedrock_mixins.CfnPromptVersionPropsMixin.PromptTemplateConfigurationProperty(
    chat=bedrock_mixins.CfnPromptVersionPropsMixin.ChatPromptTemplateConfigurationProperty(
        input_variables=[bedrock_mixins.CfnPromptVersionPropsMixin.PromptInputVariableProperty(
            name="name"
        )],
        messages=[bedrock_mixins.CfnPromptVersionPropsMixin.MessageProperty(
            content=[bedrock_mixins.CfnPromptVersionPropsMixin.ContentBlockProperty(
                cache_point=bedrock_mixins.CfnPromptVersionPropsMixin.CachePointBlockProperty(
                    type="type"
                ),
                text="text"
            )],
            role="role"
        )],
        system=[bedrock_mixins.CfnPromptVersionPropsMixin.SystemContentBlockProperty(
            cache_point=bedrock_mixins.CfnPromptVersionPropsMixin.CachePointBlockProperty(
                type="type"
            ),
            text="text"
        )],
        tool_configuration=bedrock_mixins.CfnPromptVersionPropsMixin.ToolConfigurationProperty(
            tool_choice=bedrock_mixins.CfnPromptVersionPropsMixin.ToolChoiceProperty(
                any=any,
                auto=auto,
                tool=bedrock_mixins.CfnPromptVersionPropsMixin.SpecificToolChoiceProperty(
                    name="name"
                )
            ),
            tools=[bedrock_mixins.CfnPromptVersionPropsMixin.ToolProperty(
                cache_point=bedrock_mixins.CfnPromptVersionPropsMixin.CachePointBlockProperty(
                    type="type"
                ),
                tool_spec=bedrock_mixins.CfnPromptVersionPropsMixin.ToolSpecificationProperty(
                    description="description",
                    input_schema=bedrock_mixins.CfnPromptVersionPropsMixin.ToolInputSchemaProperty(
                        json=json
                    ),
                    name="name"
                )
            )]
        )
    ),
    text=bedrock_mixins.CfnPromptVersionPropsMixin.TextPromptTemplateConfigurationProperty(
        cache_point=bedrock_mixins.CfnPromptVersionPropsMixin.CachePointBlockProperty(
            type="type"
        ),
        input_variables=[bedrock_mixins.CfnPromptVersionPropsMixin.PromptInputVariableProperty(
            name="name"
        )],
        text="text"
    )
)

Attributes

chat

Contains configurations to use the prompt in a conversational format.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-promptversion-prompttemplateconfiguration.html#cfn-bedrock-promptversion-prompttemplateconfiguration-chat

text

Contains configurations for the text in a message for a prompt.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-promptversion-prompttemplateconfiguration.html#cfn-bedrock-promptversion-prompttemplateconfiguration-text

PromptVariantProperty

class CfnPromptVersionPropsMixin.PromptVariantProperty(*, additional_model_request_fields=None, gen_ai_resource=None, inference_configuration=None, metadata=None, model_id=None, name=None, template_configuration=None, template_type=None)

Bases: object

Contains details about a variant of the prompt.

Parameters:
See:

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

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_bedrock import mixins as bedrock_mixins

# additional_model_request_fields: Any
# any: Any
# auto: Any
# json: Any

prompt_variant_property = bedrock_mixins.CfnPromptVersionPropsMixin.PromptVariantProperty(
    additional_model_request_fields=additional_model_request_fields,
    gen_ai_resource=bedrock_mixins.CfnPromptVersionPropsMixin.PromptGenAiResourceProperty(
        agent=bedrock_mixins.CfnPromptVersionPropsMixin.PromptAgentResourceProperty(
            agent_identifier="agentIdentifier"
        )
    ),
    inference_configuration=bedrock_mixins.CfnPromptVersionPropsMixin.PromptInferenceConfigurationProperty(
        text=bedrock_mixins.CfnPromptVersionPropsMixin.PromptModelInferenceConfigurationProperty(
            max_tokens=123,
            stop_sequences=["stopSequences"],
            temperature=123,
            top_p=123
        )
    ),
    metadata=[bedrock_mixins.CfnPromptVersionPropsMixin.PromptMetadataEntryProperty(
        key="key",
        value="value"
    )],
    model_id="modelId",
    name="name",
    template_configuration=bedrock_mixins.CfnPromptVersionPropsMixin.PromptTemplateConfigurationProperty(
        chat=bedrock_mixins.CfnPromptVersionPropsMixin.ChatPromptTemplateConfigurationProperty(
            input_variables=[bedrock_mixins.CfnPromptVersionPropsMixin.PromptInputVariableProperty(
                name="name"
            )],
            messages=[bedrock_mixins.CfnPromptVersionPropsMixin.MessageProperty(
                content=[bedrock_mixins.CfnPromptVersionPropsMixin.ContentBlockProperty(
                    cache_point=bedrock_mixins.CfnPromptVersionPropsMixin.CachePointBlockProperty(
                        type="type"
                    ),
                    text="text"
                )],
                role="role"
            )],
            system=[bedrock_mixins.CfnPromptVersionPropsMixin.SystemContentBlockProperty(
                cache_point=bedrock_mixins.CfnPromptVersionPropsMixin.CachePointBlockProperty(
                    type="type"
                ),
                text="text"
            )],
            tool_configuration=bedrock_mixins.CfnPromptVersionPropsMixin.ToolConfigurationProperty(
                tool_choice=bedrock_mixins.CfnPromptVersionPropsMixin.ToolChoiceProperty(
                    any=any,
                    auto=auto,
                    tool=bedrock_mixins.CfnPromptVersionPropsMixin.SpecificToolChoiceProperty(
                        name="name"
                    )
                ),
                tools=[bedrock_mixins.CfnPromptVersionPropsMixin.ToolProperty(
                    cache_point=bedrock_mixins.CfnPromptVersionPropsMixin.CachePointBlockProperty(
                        type="type"
                    ),
                    tool_spec=bedrock_mixins.CfnPromptVersionPropsMixin.ToolSpecificationProperty(
                        description="description",
                        input_schema=bedrock_mixins.CfnPromptVersionPropsMixin.ToolInputSchemaProperty(
                            json=json
                        ),
                        name="name"
                    )
                )]
            )
        ),
        text=bedrock_mixins.CfnPromptVersionPropsMixin.TextPromptTemplateConfigurationProperty(
            cache_point=bedrock_mixins.CfnPromptVersionPropsMixin.CachePointBlockProperty(
                type="type"
            ),
            input_variables=[bedrock_mixins.CfnPromptVersionPropsMixin.PromptInputVariableProperty(
                name="name"
            )],
            text="text"
        )
    ),
    template_type="templateType"
)

Attributes

additional_model_request_fields

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 .

See:

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

gen_ai_resource

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

See:

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

inference_configuration

Contains inference configurations for the prompt variant.

See:

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

metadata

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

See:

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

model_id

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

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.

See:

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

template_configuration

Contains configurations for the prompt template.

See:

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

template_type

The type of prompt template to use.

See:

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

SpecificToolChoiceProperty

class CfnPromptVersionPropsMixin.SpecificToolChoiceProperty(*, name=None)

Bases: object

The model must request a specific tool.

For example, {"tool" : {"name" : "Your tool name"}} . For more information, see Call a tool with the Converse API in the Amazon Bedrock User Guide .. epigraph:

This field is only supported by Anthropic Claude 3 models.
Parameters:

name (Optional[str]) – The name of the tool that the model must request.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-promptversion-specifictoolchoice.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_bedrock import mixins as bedrock_mixins

specific_tool_choice_property = bedrock_mixins.CfnPromptVersionPropsMixin.SpecificToolChoiceProperty(
    name="name"
)

Attributes

name

The name of the tool that the model must request.

See:

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

SystemContentBlockProperty

class CfnPromptVersionPropsMixin.SystemContentBlockProperty(*, cache_point=None, text=None)

Bases: object

Contains configurations for instructions to provide the model for how to handle input.

To learn more, see Using the Converse API .

Parameters:
  • cache_point (Union[IResolvable, CachePointBlockProperty, Dict[str, Any], None]) – CachePoint to include in the system prompt.

  • text (Optional[str]) – A system prompt for the model.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-promptversion-systemcontentblock.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_bedrock import mixins as bedrock_mixins

system_content_block_property = bedrock_mixins.CfnPromptVersionPropsMixin.SystemContentBlockProperty(
    cache_point=bedrock_mixins.CfnPromptVersionPropsMixin.CachePointBlockProperty(
        type="type"
    ),
    text="text"
)

Attributes

cache_point

CachePoint to include in the system prompt.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-promptversion-systemcontentblock.html#cfn-bedrock-promptversion-systemcontentblock-cachepoint

text

A system prompt for the model.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-promptversion-systemcontentblock.html#cfn-bedrock-promptversion-systemcontentblock-text

TextPromptTemplateConfigurationProperty

class CfnPromptVersionPropsMixin.TextPromptTemplateConfigurationProperty(*, cache_point=None, input_variables=None, text=None)

Bases: object

Contains configurations for a text prompt template.

To include a variable, enclose a word in double curly braces as in {{variable}} .

Parameters:
See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-promptversion-textprompttemplateconfiguration.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_bedrock import mixins as bedrock_mixins

text_prompt_template_configuration_property = bedrock_mixins.CfnPromptVersionPropsMixin.TextPromptTemplateConfigurationProperty(
    cache_point=bedrock_mixins.CfnPromptVersionPropsMixin.CachePointBlockProperty(
        type="type"
    ),
    input_variables=[bedrock_mixins.CfnPromptVersionPropsMixin.PromptInputVariableProperty(
        name="name"
    )],
    text="text"
)

Attributes

cache_point

A cache checkpoint within a template configuration.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-promptversion-textprompttemplateconfiguration.html#cfn-bedrock-promptversion-textprompttemplateconfiguration-cachepoint

input_variables

An array of the variables in the prompt template.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-promptversion-textprompttemplateconfiguration.html#cfn-bedrock-promptversion-textprompttemplateconfiguration-inputvariables

text

The message for the prompt.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-promptversion-textprompttemplateconfiguration.html#cfn-bedrock-promptversion-textprompttemplateconfiguration-text

ToolChoiceProperty

class CfnPromptVersionPropsMixin.ToolChoiceProperty(*, any=None, auto=None, tool=None)

Bases: object

Determines which tools the model should request in a call to Converse or ConverseStream .

For more information, see Call a tool with the Converse API in the Amazon Bedrock User Guide.

Parameters:
  • any (Any) – The model must request at least one tool (no text is generated).

  • auto (Any) – (Default). The Model automatically decides if a tool should be called or whether to generate text instead.

  • tool (Union[IResolvable, SpecificToolChoiceProperty, Dict[str, Any], None]) – The Model must request the specified tool. Only supported by Anthropic Claude 3 and Amazon Nova models.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-promptversion-toolchoice.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_bedrock import mixins as bedrock_mixins

# any: Any
# auto: Any

tool_choice_property = bedrock_mixins.CfnPromptVersionPropsMixin.ToolChoiceProperty(
    any=any,
    auto=auto,
    tool=bedrock_mixins.CfnPromptVersionPropsMixin.SpecificToolChoiceProperty(
        name="name"
    )
)

Attributes

any

The model must request at least one tool (no text is generated).

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-promptversion-toolchoice.html#cfn-bedrock-promptversion-toolchoice-any

auto

(Default).

The Model automatically decides if a tool should be called or whether to generate text instead.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-promptversion-toolchoice.html#cfn-bedrock-promptversion-toolchoice-auto

tool

The Model must request the specified tool.

Only supported by Anthropic Claude 3 and Amazon Nova models.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-promptversion-toolchoice.html#cfn-bedrock-promptversion-toolchoice-tool

ToolConfigurationProperty

class CfnPromptVersionPropsMixin.ToolConfigurationProperty(*, tool_choice=None, tools=None)

Bases: object

Configuration information for the tools that you pass to a model.

For more information, see Tool use (function calling) in the Amazon Bedrock User Guide.

Parameters:
See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-promptversion-toolconfiguration.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_bedrock import mixins as bedrock_mixins

# any: Any
# auto: Any
# json: Any

tool_configuration_property = bedrock_mixins.CfnPromptVersionPropsMixin.ToolConfigurationProperty(
    tool_choice=bedrock_mixins.CfnPromptVersionPropsMixin.ToolChoiceProperty(
        any=any,
        auto=auto,
        tool=bedrock_mixins.CfnPromptVersionPropsMixin.SpecificToolChoiceProperty(
            name="name"
        )
    ),
    tools=[bedrock_mixins.CfnPromptVersionPropsMixin.ToolProperty(
        cache_point=bedrock_mixins.CfnPromptVersionPropsMixin.CachePointBlockProperty(
            type="type"
        ),
        tool_spec=bedrock_mixins.CfnPromptVersionPropsMixin.ToolSpecificationProperty(
            description="description",
            input_schema=bedrock_mixins.CfnPromptVersionPropsMixin.ToolInputSchemaProperty(
                json=json
            ),
            name="name"
        )
    )]
)

Attributes

tool_choice

If supported by model, forces the model to request a tool.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-promptversion-toolconfiguration.html#cfn-bedrock-promptversion-toolconfiguration-toolchoice

tools

An array of tools that you want to pass to a model.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-promptversion-toolconfiguration.html#cfn-bedrock-promptversion-toolconfiguration-tools

ToolInputSchemaProperty

class CfnPromptVersionPropsMixin.ToolInputSchemaProperty(*, json=None)

Bases: object

The schema for the tool.

The top level schema type must be object . For more information, see Call a tool with the Converse API in the Amazon Bedrock User Guide.

Parameters:

json (Any) – The JSON schema for the tool. For more information, see JSON Schema Reference .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-promptversion-toolinputschema.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_bedrock import mixins as bedrock_mixins

# json: Any

tool_input_schema_property = bedrock_mixins.CfnPromptVersionPropsMixin.ToolInputSchemaProperty(
    json=json
)

Attributes

json

The JSON schema for the tool.

For more information, see JSON Schema Reference .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-promptversion-toolinputschema.html#cfn-bedrock-promptversion-toolinputschema-json

ToolProperty

class CfnPromptVersionPropsMixin.ToolProperty(*, cache_point=None, tool_spec=None)

Bases: object

Information about a tool that you can use with the Converse API.

For more information, see Call a tool with the Converse API in the Amazon Bedrock User Guide.

Parameters:
See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-promptversion-tool.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_bedrock import mixins as bedrock_mixins

# json: Any

tool_property = bedrock_mixins.CfnPromptVersionPropsMixin.ToolProperty(
    cache_point=bedrock_mixins.CfnPromptVersionPropsMixin.CachePointBlockProperty(
        type="type"
    ),
    tool_spec=bedrock_mixins.CfnPromptVersionPropsMixin.ToolSpecificationProperty(
        description="description",
        input_schema=bedrock_mixins.CfnPromptVersionPropsMixin.ToolInputSchemaProperty(
            json=json
        ),
        name="name"
    )
)

Attributes

cache_point

CachePoint to include in the tool configuration.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-promptversion-tool.html#cfn-bedrock-promptversion-tool-cachepoint

tool_spec

The specfication for the tool.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-promptversion-tool.html#cfn-bedrock-promptversion-tool-toolspec

ToolSpecificationProperty

class CfnPromptVersionPropsMixin.ToolSpecificationProperty(*, description=None, input_schema=None, name=None)

Bases: object

The specification for the tool.

For more information, see Call a tool with the Converse API in the Amazon Bedrock User Guide.

Parameters:
  • description (Optional[str]) – The description for the tool.

  • input_schema (Union[IResolvable, ToolInputSchemaProperty, Dict[str, Any], None]) – The input schema for the tool in JSON format.

  • name (Optional[str]) – The name for the tool.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-promptversion-toolspecification.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_bedrock import mixins as bedrock_mixins

# json: Any

tool_specification_property = bedrock_mixins.CfnPromptVersionPropsMixin.ToolSpecificationProperty(
    description="description",
    input_schema=bedrock_mixins.CfnPromptVersionPropsMixin.ToolInputSchemaProperty(
        json=json
    ),
    name="name"
)

Attributes

description

The description for the tool.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-promptversion-toolspecification.html#cfn-bedrock-promptversion-toolspecification-description

input_schema

The input schema for the tool in JSON format.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-promptversion-toolspecification.html#cfn-bedrock-promptversion-toolspecification-inputschema

name

The name for the tool.

See:

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