Add 'context' variable to iteration tools
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] 请务必使用英文提交 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.
I'm trying to process a complicated task which requires multiple steps inference.
When I implement it by splitting the execution plan into an array and deal each subtask with LLM in iteration tools, I found each iteration lost the context of the complete execution plan as well as the answers to previous iterations.
E.g: for execution plan with 3 questions [q1, q2, q3], iteration2 needs [(q1, a1), q2] in order to get answer a2.
And in the same way, iteration3 needs [(q1, a1), (q2, a2), q3] in order to get answer a3
Iteration tool currently only supports 'index' and 'item' variables. Please add 'context' to iteration tools, so that each interaction has full context of answered subtasks.
2. Additional context or comments
3. Can you help us with this feature?
- [X] I am interested in contributing to this feature.
While waiting for the Dify team to help, does anyone have an effective plan for this situation?
While waiting for the Dify team to help, does anyone have an effective plan for this situation?
You can try conversational variables now.