From 1aa963a2fe56a0ce7f87d3facb9496c8cf8c6d6e Mon Sep 17 00:00:00 2001 From: Luyi Tian Date: Sat, 15 Feb 2025 21:25:12 +0800 Subject: [PATCH] Update Chat.svelte error handling of previous message related to this discussion: https://github.com/open-webui/open-webui/discussions/10034. in some cases the previous message have error but it still generate a response. in such case we should also next round chat. so I update the if condition to add another checking of the content in previous message. --- src/lib/components/chat/Chat.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/components/chat/Chat.svelte b/src/lib/components/chat/Chat.svelte index d3986ca04..8525d1a72 100644 --- a/src/lib/components/chat/Chat.svelte +++ b/src/lib/components/chat/Chat.svelte @@ -1241,7 +1241,7 @@ // Response not done return; } - if (messages.length != 0 && messages.at(-1).error) { + if (messages.length != 0 && messages.at(-1).error && !messages.at(-1).content) { // Error in response toast.error($i18n.t(`Oops! There was an error in the previous response.`)); return;