November 2018
Beginner to intermediate
182 pages
4h 48m
English
We now know how to understand and categorize user intent. We now need to simply respond to each user intent with some corresponding responses. Let's get these template bot responses in one place:
templates = { "utter_greet": ["hey there!", "Hey! How you doin'? "], "utter_options": ["ok, let me check some more"], "utter_goodbye": ["Great, I'll go now. Bye bye", "bye bye", "Goodbye!"], "utter_default": ["Sorry, I didn't quite follow"], "utter_confirm": ["Got it", "Gotcha", "Your order is confirmed now"] }
Storing the Response map in a separate entity is helpful. This means that you can generate responses at a separate service from your intent understanding module and then glue them together:
response_map = { "greet": "utter_greet", ...Read now
Unlock full access