-
Notifications
You must be signed in to change notification settings - Fork 7.7k
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
fix: The LLM node setting with stream set to False. #9098
Conversation
In COT, there's no handling for the return values of non-stream modes. However, in fc, the stream mode is determined using |
Sorry for the late reply. I agree that |
@laipz8200 Why was it closed? We mean that fixing it under |
Oops! Sorry for the misunderstanding. |
Thank you! |
Our CI configuration has been updated, could you sync your code with the main branch to pass the CI? |
Sorry, I just saw it, I've synced now. |
Hi @Hisir0909 @CXwudi , I haven't see this PR before, and already remove the
This PR seems to address the issue that the Gemini model's stream mode responds five times slower than when the stream mode is not enabled. The proposed solution is to let the user decide whether to activate the stream mode. However, I don't believe this is the right approach. The core issue is understanding why the Gemini model's stream mode is so slow. Stream mode should enhance UX, but currently, it detracts from it. This fundamental performance issue should be resolved by Google, not us. |
If that's so, then I believe this PR is not needed.
Uhhh, I think there is a misunderstanding here. We are not addressing performance issues, nor have we experienced any slowness from Gemini. This PR is mainly addressing #8998, which is a regression from #8678, as I mentioned in #8678 (comment). |
the performance issue is #8652 which seems #8678 to resolved. |
I see, sorry that I wasn't aware of the root issue. |
I'd like to mention that I originally raised the performance issue #8652, and I'm willing to fix it. However, I didn't have time at that point, and someone else submitted PR #8678. Their approach simply added the stream flag in the YAML file without modifying the code. In DIFY, all LLMs are designed to handle both stream and non-stream processing, but the stream parameter is rarely used. This PR now adapts to the stream flag in the YAML file. If you think this is unnecessary or the approach is problematic, I will close the PR. |
Thank you for explaining the whole story from beginning to end. And the stream flag was already removed from all the YAML file, so this PR seems not so mush necessary, what do you think about this? @laipz8200 |
Thank you all for providing the context. If the performance issues with Gemini have been resolved, we won't need this PR anymore. |
Clearly, no. Only version 002 of Gemini-flash is normal because version 002 defaults to having the review interface turned off (according to Google). Other flash versions, including version 8B, are very slow in stream mode. |
Since the steam option for the model has been removed, I think this PR is unnecessary. Let's wait for Gemini to fix this issue. |
Checklist:
Important
Please review the checklist below before submitting your pull request.
dev/reformat
(backend) andcd web && npx lint-staged
(frontend) to appease the lint godsDescription
Fixed the issue where the LLM node returned no results when the configured model did not use stream returns.
Fixes #8998
Type of Change
Testing Instructions
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration