Spaces:
Running
Running
File size: 259 Bytes
4723216 |
1 2 3 4 5 6 7 8 9 |
// 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);
};
|