Closed charley008 closed 5 months ago
我以为,docker部署的vps所在地区可以用gemini就ok了,可试了一下发现 需要翻墙软件的节点所在地区可用才行, 只要我的翻墙节点在不可用地区,就会出现 [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.
在墙外可用 Gemini 的地区服务器使用 Docker 部署的版本,若需启用容器内部自动设置的反向代理,请将 REACT_APP_GEMINI_API_URL
变量值设为 __use_nginx__
,即
$ docker run -d \
--name chatgemini \
--restart always \
--publish 8080:8080 \
--env REACT_APP_GEMINI_API_KEY="您的密钥" \
--env REACT_APP_GEMINI_API_URL="__use_nginx__" \
ghcr.io/bclswl0827/chatgemini
我没仔细看说明,所以才出现低级失误。。。马上我就关掉了issue。还是被你发现了
我以为,docker部署的vps所在地区可以用gemini就ok了,可试了一下发现 需要翻墙软件的节点所在地区可用才行, 只要我的翻墙节点在不可用地区,就会出现 [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.