cloudflare ai web
3.1.0
Example: https://ai.jaze.top
https://dash.deno.com
NITRO_PRESET=deno-deploy npm run build_nodedocker run -d --name cloudflare-ai-web
-e CF_TOKEN=YOUR_CF_TOKEN
-e CF_GATEWAY=YOUR_CF_GATEWAY
-p 3000:3000
--restart=always
jazee6/cloudflare-ai-webChatGPT Gemini Pro Stable Diffusion llama-3通义千问, etc.https://developers.cloudflare.com/workers-ai/models/
You can add or delete models in ./utils/db.ts
| name | describe |
|---|---|
| CF_TOKEN | Cloudflare Workers AI Token |
| CF_GATEWAY | Cloudflare AI Gateway URL |
| OPENAI_API_KEY | OpenAI API Key (Fill in when ChatGPT is required) |
| OPENAI_API_URL | Customize OpenAI API request address |
| G_API_KEY | Google AI API Key (Fill in when GeminiPro is required) |
| G_API_URL | Google AI anti-generation (don't support regional filling, or refer to the following configuration) |
| PASSWORD | Access password (optional) |
Example: View the .env.example file
https://dash.cloudflare.com/profile/api-tokens
https://dash.cloudflare.com/
/ ) and set environment variables https://ai.google.dev/tutorials/rest_quickstart#set_up_your_api_key
Refer to https://github.com/Jazee6/gemini-proxy to build anti-generation, no / for the end
Or add the following configuration in nuxt.config.ts
nitro: {
vercel: {
regions: ["sin1", "syd1", "sfo1", "iad1", "pdx1", "cle1"]
}
}