在我的聊天机器人中,我通过返回ConversationPaused()
暂停对话来暂停对话,以便真正的代理可以处理。但是我怎样才能恢复暂停的对话呢?
这就是我所做的
from rasa_core.events import ConversationPaused
class ActionTalkToAgent(Action):
def name(self):
return "action_talk_to_agent"
def run(self, dispatcher, tracker, domain):
if tracker.get_slot("lang") == "bn":
dispatcher.utter_template("utter_restart_bot_bn", tracker)
else:
dispatcher.utter_template("utter_restart_bot_en", tracker)
return [ConversationPaused()]