The streaming ouput blocked after multiple nodes merged into one
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
v1.1.3
Cloud or Self Hosted
Self Hosted (Docker)
Steps to reproduce
As the first node in red frame can streaming output the llm answer, but the last red node is blocked due to the mid line merging two nodes into one.
✔️ Expected Behavior
The last answer node outputing the llm result should be in streaming mode, even the mid line merges two there is no way to block the streaming answer.
❌ Actual Behavior
Actually, the final red node answer is in blocking mode.
I found a relevant discussion that might be related to your issue: Non-Streaming Output from LLM Model in Dify Usage, which is currently unsolved [1].
Regarding your issue, Dify handles node merging in workflows, and specific configurations can lead to blocking of streaming outputs. This can occur when using 'if else' nodes in combination with answer nodes. However, this issue has been addressed in a recent update through PR #12105. To resolve this, ensure you are using the latest version of Dify that includes this fix [2][3].
To continue talking to Dosu, mention @dosu.
Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other
I found a relevant discussion that might be related to your issue: Non-Streaming Output from LLM Model in Dify Usage, which is currently unsolved [1].
Regarding your issue, Dify handles node merging in workflows, and specific configurations can lead to blocking of streaming outputs. This can occur when using 'if else' nodes in combination with answer nodes. However, this issue has been addressed in a recent update through PR #12105. To resolve this, ensure you are using the latest version of Dify that includes this fix [2][3].
To continue talking to Dosu, mention @dosu.
Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other
I've seen the related issues #12362, the pr you mentioned #12105 just address the problem encountered in the situation of one if-else with two answer nodes. Multi if-else branches blocking the streaming answer is still not fixed like #13264. But these are both not the same as the situation I encountered.
me too ~
我找到一个解决方法,把流输出有问题的节点,套在一个循环组件里面,只循环1次,在里面放入llm和回复组件,即可恢复正常的流输出~~~
哈哈,折腾了两天,试出来的~套到一个循环里面,完美解决不能流输出的问题
哈哈,折腾了两天,试出来的~套到一个循环里面,完美解决不能流输出的问题
Oh, thanks!! That works for me.
不然试试不要合并,保持一棵树。
I encounter the same problem. LLM stream output need node in self.rest_node_ids, and node is actually removed after common prerequisite branch node is executed. Should change answer_stream_processor.py code to solve this