Hi, I don’t know why my bot is not asking for any slots in form. I have in stories:
## 1action send mail
* intent_send_mail
- ask_send_email_form
- form{"name":"ask_send_email_form"}
- form{"name": null}
in actions:
class ActionAskSendEmail(FormAction):
RANDOMIZE = False
@staticmethod
def required_slots(tracker: Tracker) -> List[Text]:
return ["subject", "text_mess", "useremail", "username" ]
def name(self):
return 'ask_send_email_form'
def submit(self,
dispatcher: CollectingDispatcher,
tracker: Tracker,
domain: Dict[Text, Any]) -> List[Dict]:
subject = tracker.get_slot("subject")
text_mess = tracker.get_slot("text_mess")
useremail = tracker.get_slot("useremail")
username = tracker.get_slot("username")
dispatcher.utter_message('/mail {{"fromName":"{}","fromEmail":"{}","toEmail":"{}","subject":"{}","content":"{}"}}'.format(username, useremail, to, subject, text_mess))
return [{"event":"followup", "name":"action_renew"}]
and I’m getting the answer: (bot is uttering None
):
DEBUG:rasa_core.processor:Received user message 'send email' with intent '{'name': 'intent_send_mail', 'confidence': 0.972303569316864}' and entities '[]'
DEBUG:rasa_core.processor:Logged UserUtterance - tracker now has 2 events
DEBUG:rasa_core.processor:Current slot values:
form_control: None
requested_slot: None
sms: None
subject: None
summary: None
text: None
text_mess: None
title: None
to: None
useremail: None
username: None
DEBUG:rasa_core.policies.form_policy:There is no active form
DEBUG:rasa_core.policies.memoization:Current tracker state [None, None, None, {}, {'intent_intent_send_mail': 1.0, 'prev_action_listen': 1.0}]
DEBUG:rasa_core.policies.memoization:There is a memorised next action '38'
DEBUG:rasa_core.policies.ensemble:Predicted next action using policy_2_MemoizationPolicy
DEBUG:rasa_core.processor:Predicted next action 'ask_send_email_form' with prob 1.00.
DEBUG:rasa_core.actions.action:Calling action endpoint to run action 'ask_send_email_form'.
DEBUG:rasa_core.processor:Action 'ask_send_email_form' ended with events '['Form(ask_send_email_form)', 'SlotSet(key: requested_slot, value: subject)']'
DEBUG:rasa_core.processor:Bot utterance 'BotUttered(text: None, data: {
"elements": null,
"buttons": null,
"attachment": null
})'
DEBUG:rasa_core.policies.form_policy:There is an active form 'ask_send_email_form'
why is not asking my utter_ask_subject
?
templates:
utter_ask_to:
- text: "Can you tell me who it is for?"
utter_ask_text_mess:
- text: "Can you enter the message please?"
utter_ask_subject:
- text: "Can you tell me what is the subject?"
can anyone help me, please? I’m getting desperate