-
Notifications
You must be signed in to change notification settings - Fork 14k
Enhancing Workflow with Loop and Sleep Nodes for Repeated Execution and Interval Control #12354
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Link similar feature requests here.
Please feel free to open a PR for this. |
Hi, @Woo0ood. I'm Dosu, and I'm helping the Dify team manage their backlog. I'm marking this issue as stale. Issue Summary:
Next Steps:
Thank you for your understanding and contribution! |
I would love this kind of nodes especially when you have to interact with APIs that have paginated results. Simple actions executed in the Code node takes a huge amount of time due to the Sandbox and native nodes would outperform that. |
@crazywoola, the user @DavideDelbianco has indicated that the addition of |
@Woo0ood I guess you are not going to open a PR for this feature ? |
@DavideDelbianco, #13058 PR is currently being worked on by the Dify team and will be available in an upcoming release.🥸 Although the PR was closed (due to an incorrect operation), we’ve communicated with the Dify team and confirmed that the PR will be merged. |
@Woo0ood I subscribed to this issue, please update this issue after the merge, thanks! |
|
all done😁 |
Hi, I tried git clone main branch code but I don't see the loop node in workflow, am I missing something in the configuration? |
Could you please let me know how you are running the project? |
Yes, I deployed via docker and it was git clone main branch, not release v1.0.0. |
If you are using the official Docker image, the |
Wow, thanks for the reply! |
@Woo0ood Hi, I tested the loop node and he's pretty awesome. But when I try to use the loop node to query the result of some asynchronous task, there are two small problems:
I don't know how you feel about my problem, I think the first one is very critical. |
Thank you for testing and sharing your feedback. Actually, both points you mentioned were initially considered during our early design discussions but were later removed after discussions with the Dify official team: Interval between loops: Loop node output: |
Self Checks
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
andSleep
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?
The text was updated successfully, but these errors were encountered: