mlc-ai/web-llm ? reverse-engineered prompt

Reverse engineered prompt

Build me a browser based AI chat app that runs the language model completely on the user’s computer, with no backend needed. It should use WebLLM so the chat works locally in the browser with WebGPU acceleration, and it should feel like a simple ChatGPT style page.

I want a clean interface where the user can pick a supported model, see the model download and loading progress, type messages, and get streaming replies as they generate. Make it clear that the first load may take a while and that the browser needs WebGPU support. Keep the UI responsive by using a worker if that’s the normal WebLLM approach.

Please include basic error states for unsupported browsers, failed model loading, and interrupted generation. Conversation history should stay on the page during the session, and there should be a button to clear the chat. Keep the code easy to understand and follow the current WebLLM docs or examples if needed.

Are you gonna build this?

make sure you review the code using coderabbit

Try freeSponsored — opens CodeRabbit in a new tab