Skip to content

Commit

Permalink
Frame chat response error on web app in a more conversational form
Browse files Browse the repository at this point in the history
Also indicate hitting dislike on the message should be enough to
convey the issue to the developers.
  • Loading branch information
debanjum committed Sep 15, 2024
1 parent 893ae60 commit 575ff10
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/interface/web/app/chat/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 575ff10

Please sign in to comment.