-
-
Notifications
You must be signed in to change notification settings - Fork 7.6k
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
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] 部署在netlify使用gemini会莫名其妙地打断 #2566
Comments
Thank you for raising an issue. We will investigate into the matter and get back to you as soon as possible. |
vercel 托管也有类似情况。 |
A similar situation exists with vercel hosting. Vercel too. |
那现在是只能用自己的vps用docker托管比较靠谱? |
So now it is more reliable to only use your own vps and docker hosting? |
在控制台有没有抛错?
preview 用的是 vercel |
Are there any errors in the console?
preview uses vercel |
chat.xingpingcn.top-1716164970665.log 且在network查看该post请求的状态码是200,日志显示的是”The user aborted a request“ 另外使用的是edge,已经清除浏览器缓存。且初次打开的时候不断加载了这些js,非常卡 |
怎么样可以复现这个 user abort? |
How can I reproduce this user abort? |
我让Gemini写一篇1k字以上的关于ai的文章,基本上输出的字体一多就容易触发,但是不是100%触发 |
I asked Gemini to write an article about AI with more than 1k words |
因为是走的本地代理,而不是netlify服务器,现在临时的解决方法就是手动填写api和proxy了,但是这样子在环境变量填写的东西就失去意义了。解决的方法我想也很简单,只需要提供一个不用手动填写api和proxy就能走本地代理的按钮就行,api和proxy从netlify服务器环境变量中获取就可以 |
Because we are using the local proxy instead of the netlify server, the temporary solution now is to manually fill in the api and proxy, but in this way, the things filled in the environment variables are meaningless. I think the solution is very simple. You just need to provide a button to use the local proxy without manually filling in the api and proxy. The api and proxy can be obtained from the netlify server environment variables. |
API key不应发送到前端 |
|
如果前端调api key可以,但后端调用出现截断,那你可能要检查下是不是 netlify 的serverless 时间超时导致的了。比如像 vercel 的nodejs runtime 默认只支持 10s 的调用时长,超过10s就会自动销毁,表现出来就是生成一部分内容以后就掐断了。 |
If the front-end API key can be adjusted, but the back-end call is truncated, you may want to check whether it is caused by netlify's serverless timeout. For example, the nodejs runtime of vercel only supports a call duration of 10 seconds by default. If it exceeds 10 seconds, it will be automatically destroyed. This is manifested in that it will be cut off after generating part of the content. |
Normally, functions are synchronous with a maximum execution time of 10 seconds. But, adding -background to the end of the filename transforms any function into an asynchronous function that can run in the background with up to 15 minutes of runtime. netlify可以提升到26s,但是要钱。不知道能不能按照它所说的改成异步来增加超时限制 |
那你换成 vercel 部署就不会有这个问题了呗。
不可能,所有 ai 的 SSE 请求都是在一个 http 请求完成的,改成异步没有任何收益。 |
This issue is closed, If you have any questions, you can comment and reply. |
Then if you switch to vercel deployment, you won't have this problem.
Impossible, all SSE requests of ai are completed in an http request, and there is no gain in changing to asynchronous. |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
💻 Operating System
Windows
📦 Environment
Other
🌐 Browser
Chrome
🐛 Bug Description
部署在netlify使用gemini会莫名其妙地自行打断,但是使用官网提供的preview就没有这种情况
🚦 Expected Behavior
No response
📷 Recurrence Steps
复现条件不清楚,有些时候输出几个字就自己打断,有时候输出100字就自己打断。
📝 Additional Information
No response
The text was updated successfully, but these errors were encountered: