Skip to content
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

GEMINI API调用位置要求解决办法 #412

Closed
wiboy opened this issue Dec 30, 2023 · 9 comments
Closed

GEMINI API调用位置要求解决办法 #412

wiboy opened this issue Dec 30, 2023 · 9 comments

Comments

@wiboy
Copy link

wiboy commented Dec 30, 2023

https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web
这个项目就没有位置要求

https://www.youtube.com/watch?v=xefaQug_eyk&t=338s 这个视频 4:50有解决位置要求的办法

@yihong0618
Copy link
Owner

目前还不支持 gemini, 下周我们可能会支持 API 感谢反馈

yihong0618 added a commit that referenced this issue Jan 7, 2024
Signed-off-by: yihong0618 <zouzou0208@gmail.com>
yihong0618 added a commit that referenced this issue Jan 7, 2024
* feat: support gemini close #402 #412 #403 #338

Signed-off-by: yihong0618 <zouzou0208@gmail.com>

* fix: versions things

Signed-off-by: yihong0618 <zouzou0208@gmail.com>

* fix: lint

Signed-off-by: yihong0618 <zouzou0208@gmail.com>

---------

Signed-off-by: yihong0618 <zouzou0208@gmail.com>
@yihong0618
Copy link
Owner

支持了

@baicai
Copy link

baicai commented Mar 27, 2024

@yihong0618 你好,我在项目下使用命令调用gemini响应时提示下面这个问题(调用命令:xiaogpt % xiaogpt --hardware L15A --use_gemini ),方便帮忙看下吗?

……
以下是 Gemini 的回答: Gemini 回答出错 Your default credentials were not found. To set up Application Default Credentials, see
https://cloud.google.com/docs/authentication/external/set-up-adc for more information.
[03/27/24 13:36:49] WARNING Execption when get latest ask from xiaoai:

@yihong0618
Copy link
Owner

key 没放

@baicai
Copy link

baicai commented Mar 27, 2024

key 没放

感谢楼主回复,非常感谢!

我把gemini的key配置在项目根目录的xiao_config.json文件的gemini_key的,不知是否配置错位置了?
如下:
./xiao_config.json

"gemini_key": "AIzaSyBAmm4Gn**_xWzw2npExGAFGRGOm52FCgw",

@yihong0618
Copy link
Owner

yihong0618 commented Mar 27, 2024

是的你用这种方式启动得用这个 --gemini_key ${gemini_key}

@baicai
Copy link

baicai commented Mar 27, 2024

是的你用这种方式启动得用这个 --gemini_key ${gemini_key}

感谢感谢!
换成python3 xiaogpt.py --hardware L15A --mute_xiaoai --use_gemini --gemini_key AIzaSyBAmm4Gn**_xWzw2npExGAFGRGOm52FCgw后,可以唤起gemini,不过响应timeout了,开了全局的vpn也不行,console:

Running xiaogpt now, 用帮我/请开头来提问
或用开始持续对话开始持续对话

问题:看一下今天是多少号?
以下是小爱的回答: 今天是3月27日,周三,农历甲辰年二月十八。
以下是 Gemini 的回答: Gemini 回答出错 Timeout of 60.0s exceeded, last exception: 503 failed to connect to all addresses;
last error: UNAVAILABLE: ipv4:142.251.42.234:443: Failed to connect to remote host: FD shutdown

@yihong0618
Copy link
Owner

是的你用这种方式启动得用这个 --gemini_key ${gemini_key}

感谢感谢! 换成python3 xiaogpt.py --hardware L15A --mute_xiaoai --use_gemini --gemini_key AIzaSyBAmm4Gn**_xWzw2npExGAFGRGOm52FCgw后,可以唤起gemini,不过响应timeout了,开了全局的vpn也不行,console:

Running xiaogpt now, 用帮我/请开头来提问

或用开始持续对话开始持续对话
问题:看一下今天是多少号?
以下是小爱的回答: 今天是3月27日,周三,农历甲辰年二月十八。
以下是 Gemini 的回答: Gemini 回答出错 Timeout of 60.0s exceeded, last exception: 503 failed to connect to all addresses;
last error: UNAVAILABLE: ipv4:142.251.42.234:443: Failed to connect to remote host: FD shutdown

这个需要美国 ip 你得确保你 terminal 能用 gemini

@baicai
Copy link

baicai commented Mar 27, 2024

terminal 能用 gemini

谢谢谢谢!刚发现了,我之前在本地直接调用gemini正常的项目也跑不起来了。囧。。。

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

No branches or pull requests

3 participants