-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Forward bot messages received from /tracker/events route to output channel #6273
Forward bot messages received from /tracker/events route to output channel #6273
Conversation
Thanks for submitting a pull request 🚀 @Ghostvv will take a look at it as soon as possible ✨ |
Hi @pheel, could you give a bit more context on why you feel this change is needed? Do you need this in order to get something else working? |
@federicotdn This need came up in the context of working out a handoff/handover flow: NLG is put on pause, but the user still needs to receive messages as if they were the result of actions. The most convenient way I found to do this is to append those replies to the tracker in the form of BotUttered events using the To me the use case for where BotUttered events are forwarded to output is more obvious than the use case where they aren't, but on the face of it both seem legitimate? |
Hey @pheel, thanks for the explanation. I'm trying to think, just in case, if there's already an existing way of achieving what you need. In theory, you could use the |
The problem with using |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I understand your use case, and I have some thoughts:
- Another way of potentially doing the human hand-off is simply bypassing Rasa entirely. This could potentially be simpler than trying to use the Rasa tracker as a middleman for sending and receiving messages between two humans.
- We need to have a test for the new functionality.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks really good! Apologies for the delay. Please update the changelog and then we'll merge this.
I also saw that you removed an unused arg from handle_reminder
. I recommend you add a comment on the PR after doing this, so that the changes are easier to read. You can also do these types of changes on a separate PR. But thanks anyways!
Could not update branch. Most likely this is due to a merge conflict. Please update the branch manually and fix any issues. |
@rasabot ??? |
Proposed changes:
/conversations/<conversation_id>/tracker/events
do not trigger a new prediction, and that is fine. But a use case for this route is not currently supported: it could be used to push bot messages back to an output channel for the user to see. This is a minimal PR to add this feature. It adds theoutput_channel
query param to the route.Status (please check what you already did):
black
(please check Readme for instructions)