Skip to content
v2.273.0

ChatPromptTemplateConfigurationProperty Struct ​

Contains configurations to use a prompt in a conversational format.

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

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 any: any;
declare const auto: any;
declare const json: any;
const chatPromptTemplateConfigurationProperty: bedrock.CfnPromptVersion.ChatPromptTemplateConfigurationProperty = {
  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',
      },
    },
  },
};

Properties ​

inputVariablesIResolvable | IResolvable | CfnPromptVersion.PromptInputVariableProperty[]input_variablestyping.Union[IResolvable, typing.List[typing.Union[IResolvable, PromptInputVariableProperty]]]inputVariablesIResolvableInputVariablesIResolvableInputVariablesinterface{}#
An array of the variables in the prompt template.
messagesIResolvable | IResolvable | CfnPromptVersion.MessageProperty[]messagestyping.Union[IResolvable, typing.List[typing.Union[IResolvable, MessageProperty]]]messagesIResolvableMessagesIResolvableMessagesinterface{}required#
Contains messages in the chat for the prompt.
systemIResolvable | IResolvable | CfnPromptVersion.SystemContentBlockProperty[]systemtyping.Union[IResolvable, typing.List[typing.Union[IResolvable, SystemContentBlockProperty]]]systemIResolvableSystemIResolvableSysteminterface{}#
Contains system prompts to provide context to the model or to describe how it should behave.
toolConfigurationIResolvable | CfnPromptVersion.ToolConfigurationPropertytool_configurationtyping.Union[IResolvable, ToolConfigurationProperty]toolConfigurationIResolvableToolConfigurationIResolvableToolConfigurationinterface{}#
Configuration information for the tools that the model can use when generating a response.