Warning
This repo is in-progress. I'll launch it officially soon!
This is my example playground for working with Llama 3 in Cloudflare Workers AI. It might be interesting to other people - or it might not!
It includes some of my most recent best practices for working with generative text AI models in a full-stack context.
On the backend, that includes:
- Using Hono (particularly the Hono streaming APIs)
- Using Workers AI (particularly the brand new at time of writing Llama 3)
- Streaming the AI response directly to the client
On the frontend, that includes:
- Using
lukeed/fetch-event-stream
to manage the EventSource response - Using Vue 3, Tailwind CSS, and daisyUI for a simple UI
- Basic "chat" flow - persisting old messages in the UI, loading states, and more
This code is open-sourced so that if you're trying to build with Workers AI, you can rip out pieces of it for your own tasks, or even fork it and build something wholesale with it.