To guide the user to ask some question under some condition, I need to add faqs to the button list (shown in following domain), rules, stories, reponses are shown below. However, it doesn’t work. The error msg is shown at the end.
domain
utter_ask_hydro_project_button:
- buttons:
- payload: /hydro_button{"hydro_type":"AAA"}
title: AAA
- payload: /hydro_button{"hydro_type":"BBB"}
title: BBB
- payload: /faq
title: CCC
- payload: /faq
title: DDD
rules
rules:
- rule: faq
steps:
- intent: faq
- action: utter_faq
story
- story: ask_hydro_project + faq
steps:
- intent: ask_hydro_project
- action: utter_ask_hydro_project_button
- intent: faq
- action: utter_faq
response
responses:
utter_faq/CCC:
- text: abcdefg
utter_faq/DDD:
- text: defghijk
Error log
2020-11-15 17:59:03 DEBUG rasa.core.processor - Received user message '/faq' with intent '{'name': 'faq', 'confidence': 1.0}' and entities '[]'
2020-11-15 17:59:03 DEBUG rasa.core.processor - Logged UserUtterance - tracker now has 15 events.
2020-11-15 17:59:03 DEBUG rasa.core.policies.memoization - Current tracker state [{'user': {'intent': 'faq'}, 'prev_action': {'action_name': 'action_listen'}}, {'user': {'intent': 'faq'}, 'prev_action': {'action_name': 'utter_faq'}}, {'user': {'intent': 'ask_hydro_project'}, 'prev_action': {'action_name': 'action_listen'}}, {'user': {'intent': 'ask_hydro_project'}, 'prev_action': {'action_name': 'utter_ask_hydro_project_button'}}, {'user': {'intent': 'faq'}, 'prev_action': {'action_name': 'action_listen'}}]
2020-11-15 17:59:03 DEBUG rasa.core.policies.memoization - Launch DeLorean...
2020-11-15 17:59:03 DEBUG rasa.core.policies.memoization - Current tracker state [{}, {'user': {'intent': 'ask_hydro_project'}, 'prev_action': {'action_name': 'action_listen'}}, {'user': {'intent': 'ask_hydro_project'}, 'prev_action': {'action_name': 'utter_ask_hydro_project_button'}}, {'user': {'intent': 'faq'}, 'prev_action': {'action_name': 'action_listen'}}]
2020-11-15 17:59:03 DEBUG rasa.core.policies.memoization - There is a memorised next action 'utter_faq'
2020-11-15 17:59:03 DEBUG rasa.core.policies.rule_policy - Current tracker state: [{}, {'user': {'intent': 'ask_hydro_project'}, 'prev_action': {'action_name': 'action_listen'}}, {'user': {'intent': 'ask_hydro_project'}, 'prev_action': {'action_name': 'utter_ask_hydro_project_button'}}, {'user': {'intent': 'faq'}, 'prev_action': {'action_name': 'action_listen'}}, {'user': {'intent': 'faq'}, 'prev_action': {'action_name': 'utter_faq'}}, {'user': {'intent': 'ask_hydro_project'}, 'prev_action': {'action_name': 'action_listen'}}, {'user': {'intent': 'ask_hydro_project'}, 'prev_action': {'action_name': 'utter_ask_hydro_project_button'}}, {'user': {'intent': 'faq'}, 'prev_action': {'action_name': 'action_listen'}}]
2020-11-15 17:59:03 DEBUG rasa.core.policies.rule_policy - There is a rule for the next action 'utter_faq'.
2020-11-15 17:59:03 DEBUG rasa.core.policies.ensemble - Predicted next action using policy_2_RulePolicy
2020-11-15 17:59:03 DEBUG rasa.core.processor - Predicted next action 'utter_faq' with confidence 1.00.
2020-11-15 17:59:03 ERROR rasa.core.processor - Encountered an exception while running action 'utter_faq'.Bot will continue, but the actions events are lost. Please check the logs of your action server for more information.
Traceback (most recent call last):
File "/home/sz/py36-bert110-grakn181-rasa203/lib/python3.7/site-packages/rasa/core/processor.py", line 681, in _run_action
events = await action.run(output_channel, nlg, tracker, self.domain)
File "/home/sz/py36-bert110-grakn181-rasa203/lib/python3.7/site-packages/rasa/core/actions/action.py", line 314, in run
RESPONSE_SELECTOR_PROPERTY_NAME
KeyError: 'response_selector'
2020-11-15 17:59:03 DEBUG rasa.core.processor - Action 'utter_faq' ended with events '[]'.
I tried other ways in domain like:
utter_ask_hydro_project_button:
- buttons:
- payload: /hydro_button{"hydro_type":"AAA"}
title: AAA
- payload: /hydro_button{"hydro_type":"BBB"}
title: BBB
- payload: /faq/CCC
title: CCC
- payload: /faq/DDD
title: DDD
But it still doesn’t work by shown the error that ‘/faq/CCC’ and ‘/faq/DDD’ are not defined in domain.
I checked all post in forum about the issue, it seems to solution yet. I’d like to have a conclusion that wether or not it’s possible to connect faq and buttions. I understand that buttions are capable to pass intent and slot. And faq is also one type of intent, how to pass it to faq/CCC and faq/DDD from buttons?
Thanks for your attention and help!