ChatGPT-Telegram-Workers icon indicating copy to clipboard operation
ChatGPT-Telegram-Workers copied to clipboard

Add compabilities to Cloudflare AI Gateway

Open youngzyl opened this issue 5 months ago • 2 comments

参考#264

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

Google文档支持把api key通过header传递,这和CF AI Gateway的请求格式是一样的。

只要像如下修改环境变量: GOOGLE_COMPLETIONS_API = https://gateway.ai.cloudflare.com/v1/{account_id}/{gateway_name}/google-ai-studio/v1beta/models/

就可以在Cloudflare workers上请求Gemini了。

youngzyl avatar Aug 30 '24 18:08 youngzyl