Rasa not asking for slots in forms

My bot is not asking for questions for slots in forms:

debug file:

2020-12-13 10:38:52 DEBUG rasa.core.lock_store - Issuing ticket for conversation ‘5c5c4280262d42b59adf2aa012204384’. 2020-12-13 10:38:52 DEBUG rasa.core.lock_store - Acquiring lock for conversation ‘5c5c4280262d42b59adf2aa012204384’. 2020-12-13 10:38:52 DEBUG rasa.core.lock_store - Acquired lock for conversation ‘5c5c4280262d42b59adf2aa012204384’. 2020-12-13 10:38:52 DEBUG rasa.core.tracker_store - Recreating tracker for id ‘5c5c4280262d42b59adf2aa012204384’ 2020-12-13 10:38:52 DEBUG rasa.nlu.classifiers.diet_classifier - There is no trained model for ‘ResponseSelector’: The component is either not trained or didn’t receive enough training data. 2020-12-13 10:38:52 DEBUG rasa.nlu.selectors.response_selector - Adding following selector key to message property: default 2020-12-13 10:38:52 DEBUG rasa.core.processor - Received user message ‘fetch my can number’ with intent ‘{‘id’: 8912499172652759313, ‘name’: ‘fetch_can’, ‘confidence’: 0.9999990463256836}’ and entities ‘[]’ 2020-12-13 10:38:52 DEBUG rasa.core.processor - Logged UserUtterance - tracker now has 8 events. 2020-12-13 10:38:52 DEBUG rasa.core.policies.memoization - Current tracker state: [state 1] user intent: fetch_can | previous action name: action_listen [state 2] user intent: fetch_can | previous action name: form_fetch_can [state 3] user intent: fetch_can | previous action name: action_submit_can_fetch_form [state 4] user intent: fetch_can | previous action name: action_listen 2020-12-13 10:38:52 DEBUG rasa.core.policies.memoization - There is no memorised next action 2020-12-13 10:38:52 DEBUG rasa.core.policies.rule_policy - Current tracker state: [state 1] user intent: fetch_can | previous action name: action_listen [state 2] user intent: fetch_can | previous action name: form_fetch_can [state 3] user intent: fetch_can | previous action name: action_submit_can_fetch_form [state 4] user intent: fetch_can | previous action name: action_listen 2020-12-13 10:38:52 DEBUG rasa.core.policies.rule_policy - There is a rule for the next action ‘form_fetch_can’. 2020-12-13 10:38:52 DEBUG rasa.core.policies.ensemble - Predicted next action using policy_2_RulePolicy. 2020-12-13 10:38:52 DEBUG rasa.core.processor - Predicted next action ‘form_fetch_can’ with confidence 1.00. 2020-12-13 10:38:52 DEBUG rasa.core.actions.action - Calling action endpoint to run action ‘form_fetch_can’. 2020-12-13 10:38:54 DEBUG rasa.core.processor - Policy prediction ended with events ‘[]’. 2020-12-13 10:38:54 DEBUG rasa.core.processor - Action ‘form_fetch_can’ ended with events ‘[<rasa.shared.core.events.SlotSet object at 0x000001C861933E88>]’. 2020-12-13 10:38:54 DEBUG rasa.core.processor - Current slot values: supported: None can_number: None name: None mobile: None email: None requested_slot: can_number 2020-12-13 10:38:54 DEBUG rasa.core.policies.memoization - Current tracker state: [state 1] user intent: fetch_can | previous action name: action_listen [state 2] user intent: fetch_can | previous action name: form_fetch_can [state 3] user intent: fetch_can | previous action name: action_submit_can_fetch_form [state 4] user intent: fetch_can | previous action name: action_listen [state 5] user intent: fetch_can | previous action name: form_fetch_can 2020-12-13 10:38:54 DEBUG rasa.core.policies.memoization - There is no memorised next action 2020-12-13 10:38:54 DEBUG rasa.core.policies.rule_policy - Current tracker state: [state 1] user intent: fetch_can | previous action name: action_listen [state 2] user intent: fetch_can | previous action name: form_fetch_can [state 3] user intent: fetch_can | previous action name: action_submit_can_fetch_form [state 4] user intent: fetch_can | previous action name: action_listen [state 5] user intent: fetch_can | previous action name: form_fetch_can 2020-12-13 10:38:54 DEBUG rasa.core.policies.rule_policy - There is a rule for the next action ‘action_submit_can_fetch_form’. 2020-12-13 10:38:54 DEBUG rasa.core.policies.ensemble - Predicted next action using policy_2_RulePolicy. 2020-12-13 10:38:54 DEBUG rasa.core.processor - Predicted next action ‘action_submit_can_fetch_form’ with confidence 1.00. 2020-12-13 10:38:54 DEBUG rasa.core.actions.action - Calling action endpoint to run action ‘action_submit_can_fetch_form’. 2020-12-13 10:38:56 DEBUG rasa.core.processor - Policy prediction ended with events ‘[]’.

my rules file:

  • rule: Activate form for fetching can

    steps:

    • intent: fetch_can

    • action: form_fetch_can

    • active_loop: form_fetch_can

  • rule: Submit form for fetching can

    condition:

    Condition that form is active.

    • active_loop: form_fetch_can

    steps:

    Form is deactivated

    • action: form_fetch_can

    • active_loop: null

    • slot_was_set:

      • requested_slot: null

    The actions we want to run when the form is submitted.

    • action: action_submit_can_fetch_form

domain: session_config:

session_expiration_time: 60

carry_over_slots_to_new_session: true

intents:

  • greet

  • what_is_supported

  • eligibility_criteria

  • goodbye

  • bot_challenge

  • how_to_apply_supported

  • fetch_can

  • mood_unhappy

  • affirm

  • deny

  • mood_great

entities:

  • supported

slots:

supported:

type: text

influence_conversation: true

can_number:

type: text

name:

type: text

mobile:

type: text

email:

type: text

responses:

utter_greet:

  • text: Hey! How are you?

utter_ask_can_number:

  • text: Enter can bro

utter_ask_email:

  • text: Enter email associated with with can number

utter_ask_mobile:

  • text: Enter the mobile number associated with your can number

utter_ask_name:

  • text: Enter name

utter_iamabot:

  • text: i am bot powered by TNeGA to help you

utter_goodbye:

  • text: Ok bye

actions:

  • action_what_is_supported

  • action_eligibility

  • action_apply_supported

  • form_fetch_can

  • action_submit_can_fetch_form

forms:

form_fetch_can:

can_number:

- type: from_text

email:

- type: from_text

mobile:

- type: from_text

name:

- type: from_text

Action file:

class ValidateCanFormFetch(Action):

def name(self) -> Text:

    return 'form_fetch_can'

def run(self,

    dispatcher: CollectingDispatcher, 

    tracker: Tracker, 

    domain: Dict) -> List[EventType]:

    required_slots = ['can_number', 'name', 'mobile', 'email']

    for slot_name in required_slots:

        if tracker.get_slot(slot_name) is None:

            return [SlotSet("requested_slot", slot_name)]

    #IF ALL SLOTS ARE FILLED

    return [SlotSet("requested_slot", None)]

class ActionSubmitCanDetails(Action):

def name(self) -> Text:

    return "action_submit_can_fetch_form"

def run(

    self,

    dispatcher,

    tracker: Tracker,

    domain: "DomainDict",

) -> List[Dict[Text, Any]]:

    print(tracker.get_slot('can_number'), tracker.get_slot('name'), tracker.get_slot('mobile'), tracker.get_slot('email'))

@sandeep2213, make sure that you run “rasa train” and check your stories.yml. Hope it helps :smiley: