I created a slot filling FormAction but its not calling utter_ask templates, any help?? when this action get called it just print utter_submit.
class RatingsForm(FormAction):
def name(self):
# type: () -> Text
"""Unique identifier of the form"""
return "rate_form"
@staticmethod
def required_slots(tracker: Tracker) -> List[Text]:
"""A list of required slots that the form has to fill"""
return ["ratings", "ratings_comments"]
def submit(self,
dispatcher: CollectingDispatcher,
tracker: Tracker,
domain: Dict[Text, Any]) -> List[Dict]:
"""Define what the form has to do
after all required slots are filled"""
# utter submit template
dispatcher.utter_template('utter_submit', tracker)
return []
def slot_mapping(self):
# type: () -> Dict[Text: Union[Text, Dict, List[Text, Dict]]]
"""A dictionary to map required slots to
- an extracted entity
- intent: value pairs
- a whole message
or a list of them, where the first match will be picked"""
return {"ratings": self.from_entity(entity="CARDINAL",
intent=None)}