I am quite new to Rasa, and am currently writing a chat bot based on it with a backend in node.js and using rasa as a docker container (1.x). It’s working pretty nice after I understood how the actions and predicitions need to be handled using the API, but now I have this issue: How do I detect that a story has ended, using the HTTP API?
I currently just see that the next best action seems to always be action_listen, but how do I know that I have reached the end of the conversation and that I should restart the conversation?
Hi @DonMartin76, There isn’t really a way to detect whether a story has finished. Conversations aren’t required to strictly follow what’s been defined in stories. You could do so by just training with the MemoizationPolicy (not Keras).
You could set a slot at the end of your stories, request the tracker from the http api, and check whether the slot has been set. To do this, please check out the docs on Slots.
OK, that certainly helps. It’s not what I expected, but that should be feasible. As an alternative, I could also create a custom action which in my service would create a new conversation ID; does that sound like a good idea, or is that a stupid one?
I also found the following possibility, which seems to work pretty well: I simply add action_restart to the end of the story, and that does what I want. At least for now.
@ricwo after action_restart i was unable to get all the messages from http://localhost:5005/conversations/ali/tracker
but messages are present in the database