bclswl0827 / ChatGemini

✨ ChatGemini 是一个基于 Google Gemini 的网页客户端,对标 ChatGPT 3.5,操作逻辑同 ChatGPT 3.5 一致,同时支持在聊天中上传图片,应用会自动调用 Gemini-Pro-Vision 模型进行识图。
http://ibcl.us/ChatGemini/
MIT License
904 stars 247 forks source link

部署完了报错 #31

Open changeCat opened 4 months ago

changeCat commented 4 months ago

按照步骤部署完了报错,页面能打开 [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 commented 2 months ago

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

zhouSir340 commented 2 months ago

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

DreamofInfinity1 commented 2 months ago

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

zhouSir340 commented 2 months ago

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

DreamofInfinity1 commented 1 month ago

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