diff --git a/src/lib/components/chat/Chat.svelte b/src/lib/components/chat/Chat.svelte index fea036ec81..cc5eae73f5 100644 --- a/src/lib/components/chat/Chat.svelte +++ b/src/lib/components/chat/Chat.svelte @@ -5724,15 +5724,15 @@ if (history.messages[message.id].done == true) { const responseMessage = history.messages[message.id]; - responseMessage.done = false; - responseMessage.error = null; - await tick(); - const model = ($models ?? []) .filter((m) => m.id === (responseMessage?.selectedModelId ?? responseMessage.model)) .at(0); if (model) { + responseMessage.done = false; + responseMessage.error = null; + await tick(); + await sendMessageSocket( model, createMessagesList(history, responseMessage.id), @@ -5741,6 +5741,8 @@ _chatId, { continueResponse: true } ); + } else { + toast.error($i18n.t('Model not found')); } } };