I’m answering your original question here as I had to solve the exact same issue. “How can I map the same entity to different slot”.
You can solve this with new FormAction
with slot_mapping
.
In NLU, you can just train “country” entity only.
Then, in FormAction
, you define both as required_slots
like this return ["origin", "destination"]
. then in slot_mappings
, you define like this
return dict(
origin=self.from_entity(entity='country'),
destination=self.from_entity(entity='country')
)