class PromptTemplateConfiguration
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.Bedrock.Alpha.PromptTemplateConfiguration |
Go | github.com/aws/aws-cdk-go/awsbedrockalpha/v2#PromptTemplateConfiguration |
Java | software.amazon.awscdk.services.bedrock.alpha.PromptTemplateConfiguration |
Python | aws_cdk.aws_bedrock_alpha.PromptTemplateConfiguration |
TypeScript (source) | @aws-cdk/aws-bedrock-alpha » PromptTemplateConfiguration |
Abstract base class for prompt template configurations.
This provides a high-level abstraction over the underlying CloudFormation template configuration properties, offering a more developer-friendly interface while maintaining full compatibility with the underlying AWS Bedrock service.
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as bedrock_alpha from '@aws-cdk/aws-bedrock-alpha';
declare const chatMessage: bedrock_alpha.ChatMessage;
declare const tool: bedrock_alpha.Tool;
declare const toolChoice: bedrock_alpha.ToolChoice;
const promptTemplateConfiguration = bedrock_alpha.PromptTemplateConfiguration.chat({
messages: [chatMessage],
// the properties below are optional
inputVariables: ['inputVariables'],
system: 'system',
toolConfiguration: {
toolChoice: toolChoice,
tools: [tool],
},
});
Initializer
new PromptTemplateConfiguration()
Methods
| Name | Description |
|---|---|
| static chat(props) | Creates a chat template configuration. |
| static text(props) | Creates a text template configuration. |
static chat(props)
public static chat(props: ChatTemplateConfigurationProps): PromptTemplateConfiguration
Parameters
Returns
Creates a chat template configuration.
static text(props)
public static text(props: TextTemplateConfigurationProps): PromptTemplateConfiguration
Parameters
Returns
Creates a text template configuration.

.NET
Go
Java
Python
TypeScript (