diff --git a/web/llm_chat.js b/web/llm_chat.js index 2b73d773..4e9824fc 100644 --- a/web/llm_chat.js +++ b/web/llm_chat.js @@ -466,9 +466,8 @@ class LLMChatInstance { } this.appendMessage("init", ""); this.tvm = tvm; - self = this; - function initProgressCallback(report) { - self.updateLastMessage("init", report.text); + const initProgressCallback = (report) => { + this.updateLastMessage("init", report.text); } tvm.registerInitProgressCallback(initProgressCallback); if (!cacheUrl.startsWith("http")) {