From 00f3a9cb52a26bd8a0bfbd82f7189257e51d597b Mon Sep 17 00:00:00 2001 From: Timothy Jaeryang Baek Date: Tue, 24 Dec 2024 16:56:52 -0700 Subject: [PATCH] refac --- src/lib/apis/openai/index.ts | 2 +- src/lib/components/chat/Chat.svelte | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/lib/apis/openai/index.ts b/src/lib/apis/openai/index.ts index 4c558feb5..5ddfbe935 100644 --- a/src/lib/apis/openai/index.ts +++ b/src/lib/apis/openai/index.ts @@ -322,7 +322,7 @@ export const generateOpenAIChatCompletion = async ( return res.json(); }) .catch((err) => { - error = `OpenAI: ${err?.detail ?? 'Network Problem'}`; + error = `${err?.detail ?? 'Network Problem'}`; return null; }); diff --git a/src/lib/components/chat/Chat.svelte b/src/lib/components/chat/Chat.svelte index 88f4aaf3c..57e154b4d 100644 --- a/src/lib/components/chat/Chat.svelte +++ b/src/lib/components/chat/Chat.svelte @@ -1558,10 +1558,12 @@ }, `${WEBUI_BASE_URL}/api` ).catch((error) => { + console.log(error); responseMessage.error = { content: error }; responseMessage.done = true; + history.messages[responseMessageId] = responseMessage; return null; });