Can we add an optional feature to LLM nodes that only executes when a certain condition is met, otherwise it returns the default value
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.
Can we add an optional feature to LLM nodes that only executes when a certain condition is met, otherwise it returns the default value
2. Additional context or comments
No response
3. Can you help us with this feature?
- [ ] I am interested in contributing to this feature.
Can you share the use case and describe why you need this? I don't see the differences by add a if/else before the llm node, and it is more flexible. By add this duplicated feature into llm self seems unnecessary to me.
In this situation, the node executing SQL needs to use the SQL generated earlier. Although this can be solved by adding session variables, session variables will cause the final reply stage to only reply in full at once, and there is no way to respond in a streaming manner
Hi, @yg2024. I'm Dosu, and I'm helping the Dify team manage their backlog. I'm marking this issue as stale.
Issue Summary:
- You requested a feature for LLM nodes to execute conditionally, returning a default value otherwise.
- Crazywoola suggested using an if/else condition for flexibility.
- You provided a use case involving SQL execution, noting that session variables could work but limit streaming responses.
Next Steps:
- Please let us know if this issue is still relevant to the latest version of the Dify repository by commenting here.
- If there is no further activity, this issue will be automatically closed in 15 days.
Thank you for your understanding and contribution!