Prompt Registry
Placeholder Messages
Placeholder Messages are a powerful feature that allows you to injected messages into a prompt template. By using the placeholder
message role, you can define placeholders within your prompt template that can be replaced with full messages at runtime.
This is useful to inject conversation context.
Creating Placeholder Messages
You can create Placeholder Messages either through the PromptLayer dashboard or programmatically using the templates.publish
method.
In the dashboard, simply create a new message with the role placeholder
and provide the desired placeholder content.
Running a Template with Placeholders
Programmatically, you can include Placeholder Messages when publishing a prompt template:
Passed in messages must confirm to our prompt blueprint format.
Was this page helpful?