Prompt ($)
The $
is a JavaScript tagged template that expands the string into the final prompt.
👤 user
Inline expressions
You can weave expressions in the template using ${...}
. Expression can be promises and will be awaited when rendering the final prompt.
👤 user
String templating
The output of the $
can be further processed by running popular jinja or mustache template engines.
Inline prompts
When running an inline prompt, you can use the $
to generate the prompt dynamically but you need to call it on the generation context.