Open huangyafei opened 2 hours ago
I found a similar issue and discussion that might be relevant to your problem:
The issue you're encountering with the parallel workflow run failing in Dify version 0.8.3 is likely due to the query
variable not being properly initialized or passed to the nodes that require it. Specifically, the nodes tt
and tt-2
use the query
variable in their template
, but there is no evidence that this variable is being set or passed correctly during the test execution.
Here is the relevant part of the code where the query
variable is expected:
{
"data": {
"template": "{{ arg1 }} 123",
"title": "template transform",
"type": "template-transform",
"variables": [{"value_selector": ["sys", "query"], "variable": "arg1"}],
},
"id": "tt",
},
{
"data": {
"template": "{{ arg1 }} 321",
"title": "template transform",
"type": "template-transform",
"variables": [{"value_selector": ["sys", "query"], "variable": "arg1"}],
},
"id": "tt-2",
}
To fix this issue, ensure that the query
variable is properly initialized in the VariablePool
when the GraphEngine
is instantiated. For example:
variable_pool = VariablePool(
system_variables={
SystemVariableKey.QUERY: "your query here",
SystemVariableKey.FILES: [],
SystemVariableKey.CONVERSATION_ID: "abababa",
SystemVariableKey.USER_ID: "aaa",
},
user_inputs={"query": "your query here"},
)
Make sure to replace "your query here"
with the actual query you want to test with. This should ensure that the query
variable is available to all nodes that require it, preventing the variable not found error [1][2].
To continue talking to Dosu, mention @dosu.
Self Checks
Dify version
0.8.3
Cloud or Self Hosted
Cloud, Self Hosted (Docker)
Steps to reproduce
I have found a similar Issue https://github.com/langgenius/dify/issues/8355# and a related PR https://github.com/langgenius/dify/pull/8378. But, this PR only fixed the problem within if/else nodes.
Currently, I'm encountering a new issue:
Case 1
DSL:
Case 2
DSL:
✔️ Expected Behavior
No response
❌ Actual Behavior
No response