You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To ensure that variables used inside a string in LLM prompts are parsed as variables and not as strings when using Dify version 0.14.2, you should use the '{{}}' format for variable interpolation. For example, a variable like '/name' should be written as '{{name}}' to be properly recognized and processed as a variable reference [1].
Additionally, Dify supports the use of the Jinja-2 template language for more complex prompts, which allows for lightweight data transformation and logical processing. You can also call out the variable insertion menu by typing / or { to insert special variable blocks or upstream node variables into the prompt as context content [2].
Self Checks
Dify version
0.14.2
Cloud or Self Hosted
Cloud, Self Hosted (Docker), Self Hosted (Source)
Steps to reproduce
when assigning a converastion variable {{#conversation.var1#}} into antother variable,
the use of this variable into any LLM Node Prompte will consider the inner variables as string and not parsing them into variables.
✔️ Expected Behavior
when a variable is used inside a string, stored in another variable or passed within the workflow. it must be parsed as a variabe a not as a string
❌ Actual Behavior
variables in text {{#conversation.testVar#}} or /Context are considered as string, in node LLM prompts
The text was updated successfully, but these errors were encountered: