-
-
Notifications
You must be signed in to change notification settings - Fork 10.8k
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
[Bug] Gemini 没有实时流式输出,响应很慢 #5161
Comments
📦 Deployment environmentDocker 📌 Software version1.39.0 💻 System environmentAndroid 🌐 BrowserChrome 🐛 Problem descriptionAs title. Lobe's backend requests the Gemini interface to get streaming results. The backend waits until all chunks are output before pushing them to the frontend at once. After arriving at the front end, you still have to wait for the animation to be loaded. Because you cannot read during the animation, the overall waiting time is very long. 📷 Steps to reproduceTurning on DEBUG_GOOGLE_CHAT_COMPLETION can easily be observed Screen recording: Screenrecorder-2024-12-24-06-54-19-620.mp4🚦 Expected resultsWould love to get live streaming output 📝 Supplementary informationNo response |
👀 @hjkcai Thank you for raising an issue. We will investigate into the matter and get back to you as soon as possible. |
@hjkcai 你好!我是Dosu,一个可以帮你解决 bug、回答问题和成为贡献者的机器人。我会在这里帮助你,等待人类维护者的到来。加油!🤖 The issue you're experiencing with the Gemini interface not providing real-time streaming output is due to the fact that the Gemini 1.5 Pro model does not support streaming capabilities. This results in slower response times as the model processes and returns data in chunks rather than a continuous stream [1]. Additionally, the Lobe Chat frontend uses a typewriter effect to display responses, which can further delay the ability to read the output as it waits for all chunks to be processed before displaying them [2][3]. Unfortunately, there are no configuration options or flags in the Lobe Chat codebase that can enable or simulate real-time streaming for models that do not natively support it [4]. To continue talking to Dosu, mention @dosu. Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other |
📦 部署环境
Docker
📌 软件版本
1.39.0
💻 系统环境
Android
🌐 浏览器
Chrome
🐛 问题描述
如题。Lobe 的后端请求 Gemini 接口得到流式结果,后端要等到所有 chunk 全部输出完毕后才会一次性推送到前端。到了前端以后还要等待动画加载完成,因为动画过程中无法阅读,所以整体等待时间非常长。
📷 复现步骤
打开 DEBUG_GOOGLE_CHAT_COMPLETION 很容易可以观察到
录屏:
Screenrecorder-2024-12-24-06-54-19-620.mp4
🚦 期望结果
希望可以获得实时流式输出
📝 补充信息
No response
The text was updated successfully, but these errors were encountered: