TBXark / ChatGPT-Telegram-Workers

Easily deploy your Telegram ChatGPT bot on Cloudflare Workers (or Vercel, Docker...).
https://t.me/ChatGPT_Telegram_Workers
MIT License
3.52k stars 842 forks source link

[BUG] Gemini 在 Cloudflare Workers 上无法请求 #264

Open tujiangh opened 4 months ago

tujiangh commented 4 months ago

大佬,问一下哈,Gemini问了问题后回复在当前地区不可用怎么办啊,谢谢

TBXark commented 4 months ago

没有办法呢,Cloudflare workers请求Gemini就是会报错,只能说部署在vercel或者其他平台

TBXark commented 4 months ago

你可以试一下 cloudflare的ai网关 https://developers.cloudflare.com/ai-gateway/providers/google-ai-studio/

jinjunliu commented 2 months ago

我用Gemini遇到了这个报错:

Error: Please use a valid role: user, model.

我也是部署在Cloudflare workers,版本是:1cd65d7(9/4/2024, 7:29:31 AM)

这应该和楼主描述的”当前地区不可用“不是同一个问题吧?

djx30103 commented 1 month ago

GOOGLE_COMPLETIONS_API = "https://generativelanguage.googleapis.com/v1beta/models/" image image

GOOGLE_COMPLETIONS_API = "https://developers.cloudflare.com/ai-gateway/providers/google-ai-studio/" image