ANIMA-Web-LLM / src /worker.ts
Felladrin's picture
Initial commit
4723216
raw
history blame
259 Bytes
// Serve the chat workload through web worker
import { ChatWorkerHandler, ChatModule } from "@mlc-ai/web-llm";
const chat = new ChatModule();
const handler = new ChatWorkerHandler(chat);
self.onmessage = (msg: MessageEvent) => {
handler.onmessage(msg);
};