Hi, I’m attempting to build a bot that has the ability to handoff conversations to human agents mid conversation as alluded to here:
The problem I’m running into is that the messages from the participant that took place during the participant <> human agent conversation (while the conversation was paused) are still being read in after the conversation is resumed. Is there a way to ignore messages that are sent while the conversation is paused?
Perhaps this is due to me using the cmdline interface for the bot and stdin is still being processed while if interface was Slack or some other connection, it would be safely ignored while conversation is paused?
I’m making use of the ConversationPaused and ConversationResumed events, where I pause the conversation if the action to talk to a human agent is triggered. And then listen on an external API where messages are posted to by the human agents, polling this API and getting the messages into the conversation. Once the human agent sends an ‘/unpause’ message, I trigger the ConversationResumed event, and hand the conversation back to the chatbot. Here’s the code to do that: rasa-handoff/actions.py at master · moaazsidat/rasa-handoff · GitHub