Closed dempfi closed 1 week ago
Hi @dempfi! I'm here to help you with any bugs, questions, or contributions you have for the Dify project. Let's work together to solve this issue!
LLM nodes in Dify version 0.8.0 do not support complex variables in inputs when using Jinja templates because the _fetch_jinja_inputs
method in the LLMNode
class is designed to handle only simple data types. This method converts complex structures like dictionaries and lists into strings, which limits the ability to use complex variables directly in Jinja templates [1][2].
For handling complex variables, you can use Jinja-2 templates for lightweight data transformation and logic processing. However, the current implementation ensures that all variables are converted to strings, simplifying the handling of inputs but restricting the use of complex variable structures [1][2].
To continue talking to Dosu, mention @dosu.
Self Checks
Dify version
0.8.0
Cloud or Self Hosted
Cloud
Steps to reproduce
✔️ Expected Behavior
To be able to set any input variable
❌ Actual Behavior
Can only set input variables to primitives like String or Number