Fundamental Principles of Jinja
Basic Structure
Jinja works by combining static text with dynamic elements delimited by specific syntaxes:| Delimiter | Function | Example |
|---|---|---|
{{ ... }} | Variable Insertion | Hello {{ client.name }} |
{% ... %} | Logical Instructions | {% if hour > 18 %}Good evening{% else %}Hello{% endif %} |
{# ... #} | Comments (not rendered) | {# This text does not appear in the final prompt #} |
Types of Variables
Variables can contain different types of data:Conditions (if/elif/else)
Conditions allow for adapting the prompt according to different contexts:Additional Resources
Jinja Documentation
For complete documentation on Jinja syntax, please refer to the documentation.