3 ms·
Is it a replacement for Jinja2 templates? I use them a lot in LLM pipelines (e.g., to fill in the system prompt and provide more context).
by behnamoh 2y ago
Is it a replacement for Jinja2 templates? I use them a lot in LLM pipelines (e.g., to fill in the system prompt and provide more context).
- netghost 2y agoIf you just need value replacement yes. But you could also already do that with str.format. I think this gives you slightly more control before interpolating. If you want control flow inside a template, jinja and friends are probably still useful.
- nhumrich 2y agoNo. Not really intended to be a replacement for jinja. But it also depends on how you use jinja. If you use only very basic functionality of jinja, maybe.
- jt_b 2y agodon't see any looping expression functionality in the PEP