Hi all,
I was trying to create form based chat following the tutorial Tutorial: Building Assistants but the bot never predicts the form utter_movie_genre action but it always predicts the 'action_listen’
Your input -> Please suggest a film
2020-03-18 22:10:14 DEBUG rasa.core.tracker_store - Creating a new tracker for id 'default'.
2020-03-18 22:10:14 DEBUG rasa.core.processor - Starting a new session for conversation ID 'default'.
2020-03-18 22:10:14 DEBUG rasa.core.processor - Action 'action_session_start' ended with events '[<rasa.core.events.SessionStarted object at 0x148fb9b00>, <rasa.core.events.ActionExecuted object at 0x148fb9ac8>]'.
2020-03-18 22:10:14 DEBUG rasa.core.processor - Current slot values:
langi: None
movie_genre: None
recencyi: None
requested_slot: None
stari: None
2020-03-18 22:10:14 DEBUG rasa.core.processor - Received user message 'Please suggest a film' with intent '{'name': 'movie_suggest', 'confidence': 0.9975939393043518}' and entities '[]'
2020-03-18 22:10:14 DEBUG rasa.core.processor - Logged UserUtterance - tracker now has 4 events.
2020-03-18 22:10:14 DEBUG rasa.core.policies.memoization - Current tracker state [None, None, None, {}, {'intent_movie_suggest': 1.0, 'prev_action_listen': 1.0}]
2020-03-18 22:10:14 DEBUG rasa.core.policies.memoization - There is a memorised next action '20'
2020-03-18 22:10:14 DEBUG rasa.core.policies.form_policy - There is no active form
2020-03-18 22:10:14 DEBUG rasa.core.policies.ensemble - Predicted next action using policy_0_MemoizationPolicy
2020-03-18 22:10:14 DEBUG rasa.core.processor - Predicted next action 'movie_form' with confidence 1.00.
2020-03-18 22:10:14 DEBUG rasa.core.actions.action - Calling action endpoint to run action 'movie_form'.
2020-03-18 22:10:14 DEBUG rasa.core.processor - Action 'movie_form' ended with events '[<rasa.core.events.Form object at 0x14906e208>, <rasa.core.events.SlotSet object at 0x14906e240>]'.
2020-03-18 22:10:14 DEBUG rasa.core.processor - Current slot values:
langi: None
movie_genre: None
recencyi: None
requested_slot: movie_genre
stari: None
2020-03-18 22:10:14 DEBUG rasa.core.policies.memoization - Current tracker state [None, None, None, {}, {'intent_movie_suggest': 1.0, 'prev_action_listen': 1.0}]
2020-03-18 22:10:14 DEBUG rasa.core.policies.memoization - There is a memorised next action '20'
2020-03-18 22:10:14 DEBUG rasa.core.policies.mapping_policy - There is no mapped action for the predicted intent, 'movie_suggest'.
2020-03-18 22:10:14 DEBUG rasa.core.policies.form_policy - There is an active form 'movie_form'
2020-03-18 22:10:14 DEBUG rasa.core.policies.ensemble - Predicted next action using policy_3_FormPolicy
2020-03-18 22:10:14 DEBUG rasa.core.processor - Predicted next action 'action_listen' with confidence 1.00.
2020-03-18 22:10:14 DEBUG rasa.core.processor - Action 'action_listen' ended with events '[]'.
2020-03-18 22:10:14 DEBUG rasa.core.lock_store - Deleted lock for conversation 'default'.
In story, I have
movie 1
- movie_suggest
- movie_form
- form{“name”: “movie_form”}
- form{“name”: null}
In action.py
class MovieForm(FormAction):
"""Collects personal preference to suggest the movie"""
def name(self):
return "movie_form"
def submit(
self,
dispatcher: CollectingDispatcher,
tracker: Tracker,
domain: Dict[Text, Any],
) -> List[Dict]:
dispatcher.utter_message("Thanks for getting in touch, we’ll contact you soon")
return []
@staticmethod
def required_slots(tracker):
return [
"movie_genre",
"langi",
"stari",
"recencyi",
]
In domain.yml template section I have utter_movie_genre: - text: Movie genre please?
utter_langi:
- text: Orginal language of movie?
utter_stari:
- text: Whos the leading star?
utter_recencyi:
- text: How old the movie can be ( recent < 1 year, for others specify no)?
In nlu.md
## intent:movie_suggest
- Please suggest a film
- Please suggest a movie
- Suggest a movie
- Suggest a film
- Movie please
- film please
Config file
language: en
pipeline:
- name: "WhitespaceTokenizer"
- name: "RegexFeaturizer"
- name: "CRFEntityExtractor"
- name: "EntitySynonymMapper"
- name: "CountVectorsFeaturizer"
- name: "CountVectorsFeaturizer"
analyzer: "char_wb"
min_ngram: 1
max_ngram: 4
- name: "EmbeddingIntentClassifier"
# Configuration for Rasa Core.
# https://rasa.com/docs/rasa/core/policies/
policies:
- name: MemoizationPolicy
- name: KerasPolicy
- name: MappingPolicy
- name: FormPolicy
It’s my first attempt with rasa form and I could not figure out why it’s not predicting it.
Can someone please share some suggestions