- Add extra capabilities to your RAG app
-
Add caching with Workers KV:
Store frequent queries and LLM responses to speed up retrieval.
-
Add Model Switching via AI Gateway
Let users toggle between Workers AI and external models (e.g. OpenAI GPT-4, Anthropic Claude).
-
Store Chat History
Create
/api/historyto return stored conversations from your D1 conversations table. -
Deploy to production:
Set a custom domain and push the app live.