Timothy Jaeryang Baek 6 months ago
parent
commit
00f3a9cb52
2 changed files with 3 additions and 1 deletions
  1. 1 1
      src/lib/apis/openai/index.ts
  2. 2 0
      src/lib/components/chat/Chat.svelte

+ 1 - 1
src/lib/apis/openai/index.ts

@@ -322,7 +322,7 @@ export const generateOpenAIChatCompletion = async (
 			return res.json();
 			return res.json();
 		})
 		})
 		.catch((err) => {
 		.catch((err) => {
-			error = `OpenAI: ${err?.detail ?? 'Network Problem'}`;
+			error = `${err?.detail ?? 'Network Problem'}`;
 			return null;
 			return null;
 		});
 		});
 
 

+ 2 - 0
src/lib/components/chat/Chat.svelte

@@ -1558,10 +1558,12 @@
 			},
 			},
 			`${WEBUI_BASE_URL}/api`
 			`${WEBUI_BASE_URL}/api`
 		).catch((error) => {
 		).catch((error) => {
+			console.log(error);
 			responseMessage.error = {
 			responseMessage.error = {
 				content: error
 				content: error
 			};
 			};
 			responseMessage.done = true;
 			responseMessage.done = true;
+			history.messages[responseMessageId] = responseMessage;
 			return null;
 			return null;
 		});
 		});