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

How to send toast notifications? #1639

Open
hexart opened this issue Jan 8, 2025 · 3 comments
Open

How to send toast notifications? #1639

hexart opened this issue Jan 8, 2025 · 3 comments

Comments

@hexart
Copy link

hexart commented Jan 8, 2025

under chainlit 2.0, when I changed chat settings, I want to popup a toast to let user know the settings changes accept successfully.

await context.emitter.emit("ui:toast", { "title": "Settings updated", "description": "Settings updated successfully.", "type": "success" # success, error, info, warning })

but it won't work.

thanks for anyone who response.

@willydouhard
Copy link
Collaborator

I don't think this was possible in Chainlit 1.x either. It would be a feature request!

@hexart
Copy link
Author

hexart commented Jan 8, 2025

Yes, I just came up with this idea and try. User should know chat settings change was accept, and I don't want to send a message and save it into steps, because setting information has already saved in thread metadata.

@celeriev
Copy link

celeriev commented Jan 8, 2025

It will be helpful also to share failures with the user. On my side, I have cases where azure would filter out the message that contains hate/violence speech. If I could warn the user when this happen through a toast, it would even better

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants