Is there a way to perform SlotSet
within a custom action so that I don’t have to include it within the return []
part.
My action already performs a dispatcher.utter_button_message()
and the logic breaks if I return the SlotSet action in the method.
How does a SlotSet-Event break your logic?
msg = "Which of these are you interested in?"
dispatcher.utter_button_message(msg, buttons)
return [SlotSet("scheme_choice_type", "sub")]
This is the end of my custom action.
When the user chooses a button, the slot does not get set and the button message keeps on looping for the user.
nikhilcss97
(Nikhil Gupta)
4
Yes you are correct @GauravRoy48, a single custom action cannot perform both slot setting and uttering button messages.
You will have to create two separate custom actions and organise them to run one after another in the stories. This is one hack to solve this problem.
aniket
(Aniket Chaudhary)
5
How you solved this?can you post the code