-
-
Notifications
You must be signed in to change notification settings - Fork 484
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
Add custom callbacks to ChatInterface buttons #5839
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #5839 +/- ##
==========================================
+ Coverage 84.16% 84.20% +0.04%
==========================================
Files 291 291
Lines 42807 42907 +100
==========================================
+ Hits 36027 36130 +103
+ Misses 6780 6777 -3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
@MarcSkovMadsen in regards to #5711, with this PR, you can do something like: def reset_welcome(instance, event):
instance.send(
state.welcome_message, user="Pandas Agent", avatar="🐼", respond=False
)
...
ChatInterface(..., button_properties={"reset": {"post_callback": reset_welcome}}) |
2b2904e
to
9f1ddbf
Compare
Needs rebasing after the merge of the serialize PR also |
1d2f21d
to
2970c8f
Compare
Closes #5711
So users can add additional functionality to existing buttons, or add additional buttons easily.
I can't figure out how to drop event here though.