Trigger a Story OR Intent from a custom action

How do i call a different story from a Custom Action using logic to control the story that is selected i have tried using UserUttered and SlotSet nothing seems to work. Kindly see screenshots of my implementation.

Screenshot 2021-06-18 at 15.07.11 Screenshot 2021-06-18 at 15.07.33

Screenshot 2021-06-18 at 15.11.37

I cant figure out what i am doing wrong. kindly help

@oluwoleilesanmi Try

result=[UserUttered(text="/first_latin_square", intent= {“name” : “first_latin_square”}), SlotSet(“latin_square_counter”, “lb”)]

check this also:

Do it same for rest, hope it will solve your issue.

@nik202 thank you response i tried this and it appears it is not recognised, but the slots values do change. It always says null. Kindly see screenshot from rasax interface when i use [UserUttered("/first_latin_square", {“name”: “first_latin_square”}), SlotSet(“latin_square_counter”, “lb”)] for all 3.

on the other hand when i include text= && intent= as shown in the event UserUttered [UserUttered(text="/first_latin_square", intent={“name”: “first_latin_square”}), SlotSet(“latin_square_counter”, “lb”)], i get the error below.

@oluwoleilesanmi Swap- Mention SlotSet first and then UserUttered

Do for both the cases please.

Even check this Events

Tip: Delete the older version and re-train the model please.

Good Luck!

@nik202 thank you, the intent is recognised but actions in the story are not called. below shows how to call UserUttered event.

[SlotSet(“latin_square_counter”, “la”), UserUttered(“first_latin_square”, {“intent”: {“name”: “third_latin_square”, “confidence”: 1.0}})]

any ideas why actions in the story are not called?

@oluwoleilesanmi please share updated story and action file please let me check and even show the error screenshot, run action server in second terminal by rasa run actions

Try mention action: “action_latin_square_selection” in story , give try please.

@nik202 Here are the files.


I just tried including the action_latin_square_selection in all stories but it doesn’t fix it.

@oluwoleilesanmi please share the all files (original files) not screenshots, let me run the code by myself, even share the version or requirement files whilst using pip freeze > requirement.txt.

I guess its issue of story, or may be other. If you can share. I can try to fix your issue. Thanks.

Is that you mention action in story?

-story: first_latin_square steps:

  • action: action_latin_square_selection
  • slot_was_set:
  • latin_square_counter: la
  • intent: first_lating_square * you can remove this and try
  • action: utter_greet

I can be wrong also, but you can try… Thats why I asked you all the file. Thanks

See all the story how they have mention action Responses

@nik202 Thanks i used a different approach all together after trying so many things, UserUttered doesn’t call any of the stories. I used followup action FollowupAction(name=“action_latin_one”) and this worked. This is what the actions and stories look like now.

1 Like

@oluwoleilesanmi Congrts, and well done!! I tried my level based to help you!

1 Like