Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle chat response 'end' message #353

Merged
merged 1 commit into from
Jul 26, 2024

Conversation

adamjarling
Copy link
Contributor

@adamjarling adamjarling commented Jul 24, 2024

What does this do?

Handles the end object from chat response for error messaging in the UI. If an error occurs (communicated in the stream response), the Chat component will display a default Announcement component specifying the error and why the streamed response appears incomplete.

Example visual:

image

@adamjarling adamjarling self-assigned this Jul 24, 2024
@adamjarling adamjarling requested a review from mathewjordan July 24, 2024 21:04
Copy link
Member

@mathewjordan mathewjordan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, looks good!

Comment on lines +116 to +122
{streamingError && (
<Container>
<Announcement css={{ marginTop: "1rem" }}>
{streamingError}
</Announcement>
</Container>
)}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice 🫰

setStreamingError("The response has timed out.");
break;
case "eos_token":
setStreamingError("This should never happen.");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤣

@adamjarling adamjarling merged commit 2d1f862 into preview/chat-integration Jul 26, 2024
1 check passed
@adamjarling adamjarling deleted the 5057-handle-end-message branch July 26, 2024 15:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants