-
Notifications
You must be signed in to change notification settings - Fork 59.9k
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] vercel 部署后,无法使用流式传输。 #3848
Comments
Title: [Bug] After vercel is deployed, streaming cannot be used. |
经过排查,发现是使用的 IIS 的反向代理不支持流式传输。。。 |
After investigation, it was found that the reverse proxy of IIS used does not support streaming. . . |
Update: |
Update: |
This may be due to the recent instability of the Google Gemini Pro model, so you can wait until the evening in APAC to try to confirm the issue. I can't reproduce it on my side at the moment, and the latest commit deployed with Vercel still streams the output normally |
No, it's not Gemini, it's the back end of chatgpt. The nextchat client of this machine requests the back end of the server, which supports streaming. The nextchat deployed in vercel requests the same back end and does not support streaming. I suspect it is a proxy forwarding problem in the back-end part of nextjs. BTW, the backend is deployed using copilot-gpt4-service. |
I think it's related to vercel/next.js#9965 |
In // The latest version of the OpenAI API forced the content-encoding to be "br" in json response
// So if the streaming is disabled, we need to remove the content-encoding header
// Because Vercel uses gzip to compress the response, if we don't remove the content-encoding header
// The browser will try to decode the response with brotli and fail
newHeaders.delete("content-encoding"); But it doesn't seem to be work. |
Describe the bug
vercel 部署后,无法使用流式传输。
同样的 api base 和 key,直接在设置界面填写,通过浏览器端发起是可以流式传输的。
通过 vercel 部署后,貌似是后端发起的,无法流式传输。
To Reproduce
vercel 部署即可复现。采用环境变量内置的 api_base 和 key。
Expected behavior
能够流式传输。
Screenshots
If applicable, add screenshots to help explain your problem.
Deployment
Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional Logs
Add any logs about the problem here.
The text was updated successfully, but these errors were encountered: