dify
dify copied to clipboard
When another workflow B encapsulated as a tool is invoked in workflow A, another error is triggered when B returns to A
Self Checks
- [x] This is only for bug report, if you would like to ask a question, please head to Discussions.
- [x] I have searched for existing issues search for existing issues, including closed ones.
- [x] I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
- [x] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
- [x] Please do not modify this template :) and fill in all the required fields.
Dify version
1.0.0
Cloud or Self Hosted
Self Hosted (Docker)
Steps to reproduce
Using a workflow for tool encapsulation, when core/workflow/nodes/llm/node.py LLMNode._run is called before the result_text is initialized, it causes the last output dict to reference an uninitialized variable
✔️ Expected Behavior
Exception information for workflow B can be returned correctly
❌ Actual Behavior
At the same time as the error is thrown, an "Failed to invoke tool: cannot access local variable 'result_text' where it is not associated with a value" error is also thrown