Want to give Cloudflare Workers AI a try? This repo can help you get started quickly with a chat application built using Next.js, Tailwindcss and Workers AI. Based on Nashex's wonderful GPT-4 Playground repo.
https://chat-llama2.pages.dev/
0 . Go cloudflare.com and signup one if dont have account yet
- npx @cloudflare/next-on-pages
- npx wrangler pages deploy .vercel/output/static
- Goto your Cloudflare dashboard https://dash.cloudflare.com Workers & Pages section and go to setting of the Pages app you just deployed.
- Add environment variables for CLOUDFLARE_ACCOUNT_ID and CLOUDFLARE_API_KEY CLOUDFLARE_ACCOUNT_ID you can find right in that page Workers & Pages/overview CLOUDFLARE_API_KEY (you can create a new key with just Workers AI access)
- Go to that page you deployed Settings>Functions>Compatibility flags section Add 'nodejs_compat' in both product, preview.
Finally run 'npx wrangler pages deploy .vercel/output/static' in your vscode again and your own Llama chat is ready for action!