dify
dify copied to clipboard
Enhancing Workflow with Loop and Sleep Nodes for Repeated Execution and Interval Control
Self Checks
- [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.
1. Is this request related to a challenge you're experiencing? Tell me about your story.
We would like to have the capability to repeatedly request an HTTP interface or make multiple calls to an LLM within a workflow (or any other process that requires repeated execution to achieve a result). The loop should continue until the returned information meets specific formats or conditions. Additionally, it should be possible to add appropriate intervals between requests.
2. Additional context or comments
To achieve this, we developed Loop
and Sleep
nodes. The Loop node's logic combines iteration and if-else nodes, allowing it to use internal nodes' output variables to determine whether to exit the loop. Additionally, a maximum iteration limit can be set. The Sleep node pauses execution for a specified duration until the sleep period ends. We seek the official and community stance and suggestions on this new feature. If it receives support from the official team and the community, we will organize this part of the code and submit it to the Dify community.
3. Can you help us with this feature?
- [X] I am interested in contributing to this feature.