From 575ff103cf27898fc7f440a1c0e94f69a0b0ae7d Mon Sep 17 00:00:00 2001 From: Debanjum Singh Solanky Date: Sun, 15 Sep 2024 03:00:49 -0700 Subject: [PATCH] Frame chat response error on web app in a more conversational form Also indicate hitting dislike on the message should be enough to convey the issue to the developers. --- src/interface/web/app/chat/page.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/interface/web/app/chat/page.tsx b/src/interface/web/app/chat/page.tsx index 1a9611f6..8a22dc5a 100644 --- a/src/interface/web/app/chat/page.tsx +++ b/src/interface/web/app/chat/page.tsx @@ -264,7 +264,10 @@ export default function Chat() { // Render error message as current message const errorMessage = (err as Error).message; - currentMessage.rawResponse = `Encountered Error: ${errorMessage}. Please try again later.`; + if (errorMessage.includes("Error in input stream")) + currentMessage.rawResponse = `Woops! The connection broke while I was writing my thoughts down. Maybe try again in a bit or dislike this message if the issue persists?`; + else + currentMessage.rawResponse = `Umm, not sure what just happened. I see this error message: ${errorMessage}. Could you try again or dislike this message if the issue persists?`; // Complete message streaming teardown properly currentMessage.completed = true;