Skip to main content

Module prompt_template

Module prompt_template 

Source
Expand description

Jinja-lite template engine for prompt construction.

Supports {{ variable }} substitution with filters, {% if/elif/else/endif %} blocks, {% for item in list %}...{% endfor %} loops, and {# comment #} removal.

Structs§

Template
A pre-parsed template that can be rendered repeatedly with different contexts.
TemplateContext
A variable binding context passed to Template::render.
TemplateLibrary
A named collection of pre-parsed templates.

Enums§

TemplateError
Errors that can occur during template parsing or rendering.
TemplateVar
A dynamically-typed value that can be stored in a TemplateContext.