Hi, so I am trying to ask a user for two different names. One should be their name and the other name should be the contact person they would like to speak with.
So both times, the entity name
is extracted from the utterance but saved to a different slot, depending on the requested_slot.
Since the entity name
and slot keys are different, I need to map the recognized entity to the according slot:
def slot_mappings(self) -> Dict[Text, Union[Dict, List[Dict]]]:
return {
"candidate_name": [
self.from_entity(entity="name")
],
"interview_partner": [
self.from_entity(entity="name")
]
}
Somehow when the FormAction first asks for candidate_name
it automatically sets slot interview_partner
as well.
But its even stranger that the FormAction calls the utter template with both slots set to None
. So instead of the (same) name for candidate_name
and interview_partner
in the answer, it just prints None both times.
* interview{"name":"Leon"}
- interview_form
- form{"name":"interview_form"}
- slot{"candidate_name":"Leon"}
- slot{"interview_partner":"Leon"}
- form{"name":null}
- slot{"requested_slot":null}