How to run from a story to another

Hello ,I use rasa create a bot an it can talk to me.My is as follow


  • search_normal
    • utter_ok


  • greet -utter_greet

when I input “/greet” it response "hello ",but when I continue to input “/search_normal”,it has no response until I input "/restart’. So my problem is how can I start a new story when one is finished.

Hi @sdu-2044, you can use custom action to reset conversation


from import Restarted
class ActionRestarted(Action):
    def name(self):
        return "action_chat_restart"

    def run(self, dispatcher, tracker, domain):
        return [Restarted()]

In domain.yml:

  - action_chat_restart


## path 1
* happy_greet
  - utter_happy_greet
  - action_chat_restart
## path 2
* unhappy_greet
  - utter_unhappy_greet
  - action_chat_restart

Thanks for your reply.This solution works well,but I think rasa provides action_restart by default,you don’t need to write a custom action to restart the conversation yourself.And the restart action will reset all trackers and slot at the same time which sometime I don’t want to.So any other solutions?

You should definitely have more than two stories and they should be reflective of actual conversations someone might have with your bot. Check out Stories