访问Gemini API 并解决错误 503 failed to connect to all addresses #54
Valdanitooooo
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
首先需要科学上网
略
在Google AI Studio生成apikey
使用google登录Google AI Studio

https://aistudio.google.com/app/apikey
生成apikey
访问Gemini Pro API
output:
解决错误 503 failed to connect to all addresses
错误信息:
解决方案
将
改为
绕过默认的grpc请求,改用rest请求
参考链接
google-gemini/generative-ai-python#117
完整demo代码
https://github.com/Valdanitooooo/code_snippets/tree/main/llm/google/gemini
Beta Was this translation helpful? Give feedback.
All reactions