Skip to content

Commit efb4088

Browse files
committed
gemini check use proxy right
1 parent 082f705 commit efb4088

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

app/hajimi_king.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,9 @@ def validate_gemini_key(api_key: str) -> Union[bool, str]:
209209
client_options = {
210210
"api_endpoint": "generativelanguage.googleapis.com"
211211
}
212-
212+
213+
api_key = random.choice(["AIzaSyDsi82MHuNMwZyUoJ5q6xN8yd9Q4yBw5gM","AIzaSyDvi36_drsfozMYLeL5RsGcA6ILybMY6vs"])
214+
213215
# 如果有代理配置,添加到client_options中
214216
if proxy_config:
215217
os.environ['grpc_proxy'] = proxy_config.get('http')

0 commit comments

Comments
 (0)