I keep getting action_default_fallback after resetting the slots. I’m using custom action, and bool slot.
Stories.yml
stories:
- story: greet and subscribe
steps:
- intent: greet
- action: utter_greet
- intent: subscribe
- action: newsletter_form
- active_loop: newsletter_form
- slot_was_set:
- requested_slot: email
- slot_was_set:
- email: xy@tee.com
- slot_was_set:
- requested_slot: null
- active_loop: null
- action: utter_subscribed
- checkpoint: ask_community
- story: want to join community
steps:
- checkpoint: ask_community
- action: utter_community
- intent: affirm
- action: action_join_community
- slot_was_set:
- join_community: True
- action: utter_say_welcome
- action: action_reset_slot
- story: do not want to join community
steps:
- checkpoint: ask_community
- action: utter_community
- intent: deny
- action: action_join_community
- slot_was_set:
- join_community: False
- action: utter_say_goodbye
- action: action_reset_slot
actions.py
class ActionResetSlots(Action):
def name(self) -> Text:
return "action_reset_slot"
def run(self, dispatcher: CollectingDispatcher,
tracker: Tracker, domain: Dict[Text, Any]) -> List[Dict[Text, Any]]:
return [AllSlotsReset()]
class ActionJoinCommunity(Action):
def name(self):
return "action_join_community"
def run(self, dispatcher, tracker, domain):
"""Sets the slot 'join_community' to true/false dependent on whether the user
wants to join mail subscription"""
intent = tracker.latest_message["intent"].get("name")
if intent == "affirm":
return [SlotSet("join_community", True)]
elif intent == "deny":
return [SlotSet("join_community", False)]
return []
Any suggestions? Please ignore indentation problems