Hi @nik202 thanks for looking at my code. I’m using rasa 2.8.1.
The slots and forms are working correctly, I can see them filled (with rasa shell --debug) and I can access the values.
So the first rule I listed is working as expected.
So sent_ticket is being set to true as required.
What is supposed to happen then is the rule “successfully created ticket” should trigger:
- rule: sucessfully created ticket
condition:
- slot_was_set:
- sent_ticket: true
steps:
- action: utter_created_ticket
so that the bot says utter_created_ticket.
But it is not, and the debug output says rasa.core.policies.rule_policy - There is no applicable rule.
In case it is useful, here is the full debug output after the form is correctly filled with email.
You can see that it correctly calls utter_thanks
and action_create_freshdesk_ticket
, and then returns from the action with the slots correctly filled. But then it says it cannot find an applicable rule, and clears the slots. I’m not sure why.
2021-07-30 11:40:33 DEBUG rasa.core.processor - Current slot values:
email: test@example.com
ticket_number: None
sent_ticket: None
user_query: this is a test question
requested_slot: None
session_started_metadata: None
2021-07-30 11:40:33 DEBUG rasa.core.policies.rule_policy - Current tracker state:
[state 1] user intent: qna | previous action name: action_listen
[state 2] user intent: qna | previous action name: utter_qna
[state 3] user intent: qna | previous action name: action_store_user_query
[state 4] user intent: qna | previous action name: utter_was_question_answered
[state 5] user intent: deny | previous action name: action_listen
[state 6] user intent: deny | previous action name: utter_inquire_with_human_imogen
[state 7] user intent: affirm | previous action name: action_listen
[state 8] user intent: affirm | previous action name: utter_ill_create_ticket
[state 9] user intent: affirm | previous action name: ticket_form | slots: {'email': (1.0,)}
2021-07-30 11:40:33 DEBUG rasa.core.policies.rule_policy - There is a rule for the next action 'utter_thanks'.
2021-07-30 11:40:33 DEBUG rasa.core.policies.ensemble - Predicted next action using policy_0_RulePolicy.
2021-07-30 11:40:33 DEBUG rasa.core.processor - Predicted next action 'utter_thanks' with confidence 1.00.
2021-07-30 11:40:33 DEBUG rasa.core.processor - Policy prediction ended with events '[]'.
2021-07-30 11:40:33 DEBUG rasa.core.processor - Action 'utter_thanks' ended with events '[BotUttered('Thank you!', {"elements": null, "quick_replies": null, "buttons": null, "attachment": null, "image": null, "custom": null}, {"utter_action": "utter_thanks"}, 1627641633.710536)]'.
2021-07-30 11:40:33 DEBUG rasa.core.policies.rule_policy - Current tracker state:
[state 1] user intent: qna | previous action name: action_listen
[state 2] user intent: qna | previous action name: utter_qna
[state 3] user intent: qna | previous action name: action_store_user_query
[state 4] user intent: qna | previous action name: utter_was_question_answered
[state 5] user intent: deny | previous action name: action_listen
[state 6] user intent: deny | previous action name: utter_inquire_with_human_imogen
[state 7] user intent: affirm | previous action name: action_listen
[state 8] user intent: affirm | previous action name: utter_ill_create_ticket
[state 9] user intent: affirm | previous action name: ticket_form | slots: {'email': (1.0,)}
[state 10] user intent: affirm | previous action name: utter_thanks | slots: {'email': (1.0,)}
2021-07-30 11:40:33 DEBUG rasa.core.policies.rule_policy - There is a rule for the next action 'action_create_freshdesk_ticket'.
2021-07-30 11:40:33 DEBUG rasa.core.policies.ensemble - Predicted next action using policy_0_RulePolicy.
2021-07-30 11:40:33 DEBUG rasa.core.processor - Predicted next action 'action_create_freshdesk_ticket' with confidence 1.00.
2021-07-30 11:40:33 DEBUG rasa.core.actions.action - Calling action endpoint to run action 'action_create_freshdesk_ticket'.
2021-07-30 11:40:34 DEBUG rasa.core.processor - Policy prediction ended with events '[]'.
2021-07-30 11:40:34 DEBUG rasa.core.processor - Action 'action_create_freshdesk_ticket' ended with events '[<rasa.shared.core.events.SlotSet object at 0x7f94d8100b50>, <rasa.shared.core.events.SlotSet object at 0x7f94a0dc48e0>]'.
2021-07-30 11:40:34 DEBUG rasa.core.processor - Current slot values:
email: test@example.com
ticket_number: 449
sent_ticket: True
user_query: this is a test question
requested_slot: None
session_started_metadata: None
2021-07-30 11:40:34 DEBUG rasa.core.policies.rule_policy - Current tracker state:
[state 1] user intent: qna | previous action name: action_listen
[state 2] user intent: qna | previous action name: utter_qna
[state 3] user intent: qna | previous action name: action_store_user_query
[state 4] user intent: qna | previous action name: utter_was_question_answered
[state 5] user intent: deny | previous action name: action_listen
[state 6] user intent: deny | previous action name: utter_inquire_with_human_imogen
[state 7] user intent: affirm | previous action name: action_listen
[state 8] user intent: affirm | previous action name: utter_ill_create_ticket
[state 9] user intent: affirm | previous action name: ticket_form | slots: {'email': (1.0,)}
[state 10] user intent: affirm | previous action name: utter_thanks | slots: {'email': (1.0,)}
[state 11] user intent: affirm | previous action name: action_create_freshdesk_ticket | slots: {'email': (1.0,)}
2021-07-30 11:40:34 DEBUG rasa.core.policies.rule_policy - There is no applicable rule.
2021-07-30 11:40:34 DEBUG rasa.core.policies.ensemble - Predicted next action using policy_0_RulePolicy.
2021-07-30 11:40:34 DEBUG rasa.core.processor - Predicted next action 'action_default_fallback' with confidence 0.60.
2021-07-30 11:40:34 DEBUG rasa.core.processor - Policy prediction ended with events '[]'.
2021-07-30 11:40:34 DEBUG rasa.core.processor - Action 'action_default_fallback' ended with events '[BotUttered('I'm sorry, I don't understand.
Can you please try again?
', {"elements": null, "quick_replies": null, "buttons": null, "attachment": null, "image": null, "custom": null}, {"utter_action": "utter_default"}, 1627641634.7135618), <rasa.shared.core.events.UserUtteranceReverted object at 0x7f94a0e385e0>]'.
2021-07-30 11:40:34 DEBUG rasa.core.processor - Current slot values:
email: None
ticket_number: None
sent_ticket: None
user_query: this is a test question
requested_slot: None
session_started_metadata: None