Skip to content
This repository has been archived by the owner on Jan 17, 2025. It is now read-only.

部署完了报错 #31

Open
changeCat opened this issue Mar 13, 2024 · 5 comments
Open

部署完了报错 #31

changeCat opened this issue Mar 13, 2024 · 5 comments

Comments

@changeCat
Copy link

按照步骤部署完了报错,页面能打开
[GoogleGenerativeAI Error]: Error fetching from https://generativelanguage.googleapis.com/v1/models/gemini-pro:streamGenerateContent?alt=sse: [400 ] User location is not supported for the API use.

@DreamofInfinity1
Copy link

我也出现这个错误,每次需要多次重复会话才会得到反馈,这个问题如何去解决?

@zhouSir340
Copy link

@changeCat @DreamofInfinity1 需要配置反向代理,nginx,cloud flare或者netlify都可以,readme有写

@DreamofInfinity1
Copy link

@zhouSir340 是的,我是在cf搭建反向代理的,结果就如我上面所说,每次需要多次重复会话才会得到反馈,甚至无反馈,我看到别人说是cf使用的是香港的流量,而香港不在gemini api支持地区里,请问还有什么解决方法?

@zhouSir340
Copy link

@DreamofInfinity1 是的 我之前在gemini-pro-chat项目里这么做的时候也概率性遇到这个问题,目前netlify在国内直连还是ok的,可以用在这上面做反代替换BASE_URL,我自己切换到netlify之后目前运行都稳定,可以参考这个repo:https://github.com/antergone/palm-netlify-proxy

@DreamofInfinity1
Copy link

还有另一种解决方案,我目前使用cf部署代理脚本,脚本通过workers路由关联一个域名,这个域名在dns解析上指向一个美国ip地址,然后一般情况下稳定运行,很少时间会出错。

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants