Handlebars Helpers
Substitute
Do variable substitution on the enclosed text before returning it.
Overview
This helper does an extra round of variable substitution on the enclosed text before processing it, this allows you to treat some parts of your data as string templates and have them evaluated before being used in the ultimate text output.
Use this helper wherever you are referencing a variable that itself contains variable substitution.
Easy way to know when you see {{[data path]}}
output in your final text, it means you need to wrap that reference in the {{#substitute}}...{{/substitute}}
helper.
Wrap the lowest level reference first and work your way up if you still see expected result text in the final output.
Syntax
Examples
Prompt referencing other prompt "parts"
This helper can be used to reference other parts of the prompt that themselves contain variable substitution, by wrapping the variable in the {{#substitute}}
helper.
Example Data
Substitution