vishalmysore/gamWebLLM ? reverse-engineered prompt
Reverse engineered prompt
Build me a browser based chat demo that shows how long conversation memory can work with a real on device AI model.
I want the app to run entirely in the browser with no backend, no API key, and no server calls. It should load a chat model and an embedding model in WebGPU, let me type messages back and forth, and keep track of the conversation in two ways: a fast short term graph for the current run, and a longer term topic memory that gets created when the conversation clearly shifts.
When the topic changes, summarize the old run into a topic card with a title and short summary, then connect it to related topics by similarity. For each new reply, retrieve the most relevant past topics using both content match and graph connections, then feed those summaries into the chat so the model can answer with memory.
Please include a simple visual interface that shows the current chat, the topic graph, and a log of when consolidation happens. If you need current model or WebLLM docs, look them up online.