PromptTemplateConfiguration
- class aws_cdk.aws_bedrock_alpha.PromptTemplateConfiguration
Bases:
object
(experimental) 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.
- Stability:
experimental
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. import aws_cdk.aws_bedrock_alpha as bedrock_alpha # chat_message: bedrock_alpha.ChatMessage # tool: bedrock_alpha.Tool # tool_choice: bedrock_alpha.ToolChoice prompt_template_configuration = bedrock_alpha.PromptTemplateConfiguration.chat( messages=[chat_message], # the properties below are optional input_variables=["inputVariables"], system="system", tool_configuration=bedrock_alpha.ToolConfiguration( tool_choice=tool_choice, tools=[tool] ) )
- Stability:
experimental
Static Methods
- classmethod chat(*, messages, input_variables=None, system=None, tool_configuration=None)
(experimental) Creates a chat template configuration.
- Parameters:
messages (
Sequence
[ChatMessage
]) – (experimental) The messages in the chat template.input_variables (
Optional
[Sequence
[str
]]) – (experimental) The input variables for the template. Default: - No input variablessystem (
Optional
[str
]) – (experimental) The system message for the chat template. Default: - No system messagetool_configuration (
Union
[ToolConfiguration
,Dict
[str
,Any
],None
]) – (experimental) The tool configuration for the chat template. Default: - No tool configuration
- Stability:
experimental
- Return type:
- classmethod text(*, text, input_variables=None)
(experimental) Creates a text template configuration.
- Parameters:
text (
str
) – (experimental) The text content of the template.input_variables (
Optional
[Sequence
[str
]]) – (experimental) The input variables for the template. Default: - No input variables
- Stability:
experimental
- Return type: