Skip to content

Instantly share code, notes, and snippets.

@JustinaPetr
Created January 10, 2019 16:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JustinaPetr/4b10560d25e0239e8cc77e9950ad12c7 to your computer and use it in GitHub Desktop.
Save JustinaPetr/4b10560d25e0239e8cc77e9950ad12c7 to your computer and use it in GitHub Desktop.
def slot_mappings(self):
# type: () -> Dict[Text: Union[Dict, List[Dict]]]
"""A dictionary to map required slots to
- an extracted entity
- intent: value pairs
- a whole message or a list of them, where a first
match will be picked"""
return { "outdoor_seating": [self.from_entity(entity="seating"),
self.from_intent(intent='affirm',
value=True),
self.from_intent(intent='deny',
value=False)]}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment