From a3ecf62564dc3321115682678f5604b120661629 Mon Sep 17 00:00:00 2001 From: "Timothy J. Baek" Date: Sun, 2 Jun 2024 19:02:46 -0700 Subject: [PATCH] fix: chat completed --- src/lib/components/chat/Chat.svelte | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib/components/chat/Chat.svelte b/src/lib/components/chat/Chat.svelte index 3309ff6c2..bcb5d59a6 100644 --- a/src/lib/components/chat/Chat.svelte +++ b/src/lib/components/chat/Chat.svelte @@ -247,13 +247,13 @@ } }; - const chatCompletedHandler = async (model, messages) => { + const chatCompletedHandler = async (modelId, messages) => { await mermaid.run({ querySelector: '.mermaid' }); const res = await chatCompleted(localStorage.token, { - model: model.id, + model: modelId, messages: messages.map((m) => ({ id: m.id, role: m.role, @@ -902,7 +902,7 @@ } else { const messages = createMessagesList(responseMessageId); - await chatCompletedHandler(model, messages); + await chatCompletedHandler(model.id, messages); } break;