Can I use include syntax in Jinja2 template? #1566
joechiu-uipath
started this conversation in
General
Replies: 1 comment
-
I'm afraid promptflow not support that for now, as you mentioned that jinja2 template needs to be initialized with some specific parameters. For your case, is it possible to extract the common part to a prompt node? the prompt node has content like:
And this prompt node links to llm node. the llm node prompt looks like:
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have 2 prompts that have some overlapping text and instead of duplicating them, I would like to use jinja's include syntax.
But it seems to fail with the error message below, and online search seems to point to the Jinja2 template engine needs to be initialize with some loader parameter to be able to support include.
Any suggestion on how to manage multiple prompts sharing block of verbatim? Can promptflow's jinja2 engine support include?
Flow test failed with UserErrorException: Exception: Failed to render jinja template: TypeError: no loader for this environment specified. Please modify your prompt to fix the issue.
Beta Was this translation helpful? Give feedback.
All reactions