Closed Superqinqing closed 5 months ago
本应用默认直连 Google API,请仔细阅读 README 说明配置反代,方可在中国使用
我也遇到了这个情况。docker部署在美国vps上,然后nginx反向代理到dockers容器的网络和端口。不知道怎么修改才能直接使用。
服务器端口确保是开的吧?有的服务器,需要提交工单到服务商那里,注明要开通放行某个端口的。
On Wed, Feb 21, 2024 at 3:59 PM Mackerly @.***> wrote:
我也遇到了这个情况。docker部署在美国vps上,然后nginx反向代理到dockers容器的网络和端口。不知道怎么修改才能直接使用。
— Reply to this email directly, view it on GitHub https://github.com/bclswl0827/ChatGemini/issues/20#issuecomment-1956080334, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB7TGF7KSKSXMKAN7ELKRUDYUWSMVAVCNFSM6AAAAABDFZ3OIGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNJWGA4DAMZTGQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>
--
我也遇到了这个情况。docker部署在美国vps上,然后nginx反向代理到dockers容器的网络和端口。不知道怎么修改才能直接使用。
后来发现是我的VPS的问题,我那个vps就是连不上谷歌api,换了一个vps就可以了,nginx配置可参考 `server { listen 80;
server_name xxx.xxx.com;
#网站根目录
location / {
proxy_ssl_name $host;
proxy_ssl_server_name on;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_http_version 1.1;
proxy_read_timeout 86400s;
proxy_cache off; # 注意关闭缓存
proxy_buffering off; # 注意关闭缓冲
proxy_pass http://localhost:8080/;
}
}`
[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. 难道只能使用代理访问?