├── .gitignore ├── 01_smalltalk_bot ├── README.md ├── compressed.zip ├── screenshot_1.png ├── screenshot_2.png └── src │ ├── config.yml │ ├── data │ ├── nlu.md │ └── stories.md │ └── domain.yml ├── 02_lead_bot ├── README.md ├── compressed.zip ├── screenshot_1.png ├── screenshot_2.png ├── screenshot_3.png ├── screenshot_4.png └── src │ ├── actions.py │ ├── config.yml │ ├── data │ ├── nlu.md │ └── stories.md │ ├── domain.yml │ └── endpoints.yml ├── 03_real_estate_bot ├── README.md ├── compressed.zip ├── screenshot_1.png ├── screenshot_2.png ├── screenshot_3.png ├── screenshot_4.png └── src │ ├── actions.py │ ├── config.yml │ ├── data │ ├── nlu.md │ └── stories.md │ ├── domain.yml │ └── endpoints.yml ├── 04_feedback_bot ├── README.md ├── compressed.zip ├── screenshot_1.png ├── screenshot_2.png ├── screenshot_3.png ├── screenshot_4.png └── src │ ├── actions.py │ ├── config.yml │ ├── data │ ├── nlu.md │ └── stories.md │ ├── domain.yml │ └── endpoints.yml ├── 05_event_bot ├── README.md ├── compressed.zip ├── screenshot_1.png ├── screenshot_2.png ├── screenshot_3.png ├── screenshot_4.png └── src │ ├── actions.py │ ├── config.yml │ ├── data │ ├── nlu.md │ └── stories.md │ ├── domain.yml │ └── endpoints.yml ├── 06_hotel_bot ├── README.md ├── compressed.zip ├── screenshot01.png ├── screenshot02.png ├── screenshot03.png ├── screenshot04.png ├── screenshot05.png └── src │ ├── actions.py │ ├── config.yml │ ├── data │ ├── nlu.md │ └── stories.md │ ├── domain.yml │ └── endpoints.yml ├── 07_survey_bot ├── README.md ├── compressed.zip ├── screenshot_1.png ├── screenshot_2.png ├── screenshot_3.png ├── screenshot_4.png └── src │ ├── actions.py │ ├── config.yml │ ├── data │ ├── nlu.md │ └── stories.md │ ├── domain.yml │ └── endpoints.yml ├── 08_travel_agency_bot ├── README.md ├── compressed.zip ├── screenshot_1.png ├── screenshot_2.png ├── screenshot_3.png ├── screenshot_4.png ├── screenshot_5.png ├── screenshot_6.png ├── screenshot_7.png ├── screenshot_8.png ├── screenshot_9.png └── src │ ├── actions.py │ ├── config.yml │ ├── data │ ├── nlu.md │ └── stories.md │ ├── domain.yml │ └── endpoints.yml ├── 09_news_api ├── README.md ├── compressed.zip ├── screenshot_1.png ├── screenshot_2.png ├── screenshot_3.png ├── screenshot_4.png └── src │ ├── actions.py │ ├── config.yml │ ├── data │ ├── nlu.md │ └── stories.md │ ├── domain.yml │ └── endpoints.yml ├── 10_freshdesk_customer_support_bot ├── README.md ├── compressed.zip ├── screenshot_1.png ├── screenshot_2.png ├── screenshot_3.png ├── screenshot_4.png ├── screenshot_5.png ├── screenshot_6.png ├── screenshot_7.png ├── screenshot_8.png └── src │ ├── actions.py │ ├── config.yml │ ├── data │ ├── nlu.md │ └── stories.md │ ├── domain.yml │ ├── endpoints.yml │ └── env ├── LICENSE ├── README.md └── _config.yml /.gitignore: -------------------------------------------------------------------------------- 1 | # Byte-compiled / optimized / DLL files 2 | __pycache__/ 3 | *.py[cod] 4 | *$py.class 5 | 6 | # C extensions 7 | *.so 8 | 9 | # Distribution / packaging 10 | .Python 11 | build/ 12 | develop-eggs/ 13 | dist/ 14 | downloads/ 15 | eggs/ 16 | .eggs/ 17 | lib/ 18 | lib64/ 19 | parts/ 20 | sdist/ 21 | var/ 22 | wheels/ 23 | *.egg-info/ 24 | .installed.cfg 25 | *.egg 26 | MANIFEST 27 | 28 | # PyInstaller 29 | # Usually these files are written by a python script from a template 30 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 31 | *.manifest 32 | *.spec 33 | 34 | # Installer logs 35 | pip-log.txt 36 | pip-delete-this-directory.txt 37 | 38 | # Unit test / coverage reports 39 | htmlcov/ 40 | .tox/ 41 | .coverage 42 | .coverage.* 43 | .cache 44 | nosetests.xml 45 | coverage.xml 46 | *.cover 47 | .hypothesis/ 48 | .pytest_cache/ 49 | 50 | # Translations 51 | *.mo 52 | *.pot 53 | 54 | # Django stuff: 55 | *.log 56 | local_settings.py 57 | db.sqlite3 58 | 59 | # Flask stuff: 60 | instance/ 61 | .webassets-cache 62 | 63 | # Scrapy stuff: 64 | .scrapy 65 | 66 | # Sphinx documentation 67 | docs/_build/ 68 | 69 | # PyBuilder 70 | target/ 71 | 72 | # Jupyter Notebook 73 | .ipynb_checkpoints 74 | 75 | # pyenv 76 | .python-version 77 | 78 | # celery beat schedule file 79 | celerybeat-schedule 80 | 81 | # SageMath parsed files 82 | *.sage.py 83 | 84 | # Environments 85 | .env 86 | .venv 87 | env/ 88 | venv/ 89 | ENV/ 90 | env.bak/ 91 | venv.bak/ 92 | 93 | # Spyder project settings 94 | .spyderproject 95 | .spyproject 96 | 97 | # Rope project settings 98 | .ropeproject 99 | 100 | # mkdocs documentation 101 | /site 102 | 103 | # mypy 104 | .mypy_cache/ 105 | -------------------------------------------------------------------------------- /01_smalltalk_bot/README.md: -------------------------------------------------------------------------------- 1 | # Smalltalk Chatbot Template 2 | 3 | ### How to use it? 4 | Please follow the steps [as mentioned here](https://github.com/cedextech/Rasa-Chatbot-Templates/blob/master/README.md) 5 | 6 | ### Screenshots 7 | ![screenshot_1.png](screenshot_1.png)![screenshot_2.png](screenshot_2.png) 8 | -------------------------------------------------------------------------------- /01_smalltalk_bot/compressed.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cedextech/rasa-chatbot-templates/074aadfc06dcffd63575a54285cbceae8c326ac5/01_smalltalk_bot/compressed.zip -------------------------------------------------------------------------------- /01_smalltalk_bot/screenshot_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cedextech/rasa-chatbot-templates/074aadfc06dcffd63575a54285cbceae8c326ac5/01_smalltalk_bot/screenshot_1.png -------------------------------------------------------------------------------- /01_smalltalk_bot/screenshot_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cedextech/rasa-chatbot-templates/074aadfc06dcffd63575a54285cbceae8c326ac5/01_smalltalk_bot/screenshot_2.png -------------------------------------------------------------------------------- /01_smalltalk_bot/src/config.yml: -------------------------------------------------------------------------------- 1 | # Configuration for Rasa NLU. 2 | # https://rasa.com/docs/rasa/nlu/components/ 3 | language: en 4 | pipeline: supervised_embeddings 5 | 6 | # Configuration for Rasa Core. 7 | # https://rasa.com/docs/rasa/core/policies/ 8 | policies: 9 | - name: MemoizationPolicy 10 | - name: KerasPolicy 11 | - name: MappingPolicy 12 | -------------------------------------------------------------------------------- /01_smalltalk_bot/src/data/stories.md: -------------------------------------------------------------------------------- 1 | ## path_smalltalk_agent_acquaintance 2 | * smalltalk_agent_acquaintance 3 | - utter_smalltalk_agent_acquaintance 4 | 5 | ## path_smalltalk_agent_age 6 | * smalltalk_agent_age 7 | - utter_smalltalk_agent_age 8 | 9 | ## path_smalltalk_agent_annoying 10 | * smalltalk_agent_annoying 11 | - utter_smalltalk_agent_annoying 12 | 13 | ## path_smalltalk_agent_answer_my_question 14 | * smalltalk_agent_answer_my_question 15 | - utter_smalltalk_agent_answer_my_question 16 | 17 | ## path_smalltalk_agent_bad 18 | * smalltalk_agent_bad 19 | - utter_smalltalk_agent_bad 20 | 21 | ## path_smalltalk_agent_be_clever 22 | * smalltalk_agent_be_clever 23 | - utter_smalltalk_agent_be_clever 24 | 25 | ## path_smalltalk_agent_beautiful 26 | * smalltalk_agent_beautiful 27 | - utter_smalltalk_agent_beautiful 28 | 29 | ## path_smalltalk_agent_birth_date 30 | * smalltalk_agent_birth_date 31 | - utter_smalltalk_agent_birth_date 32 | 33 | ## path_smalltalk_agent_boring 34 | * smalltalk_agent_boring 35 | - utter_smalltalk_agent_boring 36 | 37 | ## path_smalltalk_agent_boss 38 | * smalltalk_agent_boss 39 | - utter_smalltalk_agent_boss 40 | 41 | ## path_smalltalk_agent_busy 42 | * smalltalk_agent_busy 43 | - utter_smalltalk_agent_busy 44 | 45 | ## path_smalltalk_agent_chatbot 46 | * smalltalk_agent_chatbot 47 | - utter_smalltalk_agent_chatbot 48 | 49 | ## path_smalltalk_agent_clever 50 | * smalltalk_agent_clever 51 | - utter_smalltalk_agent_clever 52 | 53 | ## path_smalltalk_agent_crazy 54 | * smalltalk_agent_crazy 55 | - utter_smalltalk_agent_crazy 56 | 57 | ## path_smalltalk_agent_fired 58 | * smalltalk_agent_fired 59 | - utter_smalltalk_agent_fired 60 | 61 | ## path_smalltalk_agent_funny 62 | * smalltalk_agent_funny 63 | - utter_smalltalk_agent_funny 64 | 65 | ## path_smalltalk_agent_good 66 | * smalltalk_agent_good 67 | - utter_smalltalk_agent_good 68 | 69 | ## path_smalltalk_agent_happy 70 | * smalltalk_agent_happy 71 | - utter_smalltalk_agent_happy 72 | 73 | ## path_smalltalk_agent_hungry 74 | * smalltalk_agent_hungry 75 | - utter_smalltalk_agent_hungry 76 | 77 | ## path_smalltalk_agent_marry_user 78 | * smalltalk_agent_marry_user 79 | - utter_smalltalk_agent_marry_user 80 | 81 | ## path_smalltalk_agent_my_friend 82 | * smalltalk_agent_my_friend 83 | - utter_smalltalk_agent_my_friend 84 | 85 | ## path_smalltalk_agent_occupation 86 | * smalltalk_agent_occupation 87 | - utter_smalltalk_agent_occupation 88 | 89 | ## path_smalltalk_agent_origin 90 | * smalltalk_agent_origin 91 | - utter_smalltalk_agent_origin 92 | 93 | ## path_smalltalk_agent_ready 94 | * smalltalk_agent_ready 95 | - utter_smalltalk_agent_ready 96 | 97 | ## path_smalltalk_agent_real 98 | * smalltalk_agent_real 99 | - utter_smalltalk_agent_real 100 | 101 | ## path_smalltalk_agent_residence 102 | * smalltalk_agent_residence 103 | - utter_smalltalk_agent_residence 104 | 105 | ## path_smalltalk_agent_right 106 | * smalltalk_agent_right 107 | - utter_smalltalk_agent_right 108 | 109 | ## path_smalltalk_confirmation_yes 110 | * smalltalk_confirmation_yes 111 | - utter_smalltalk_confirmation_yes 112 | 113 | ## path_smalltalk_agent_sure 114 | * smalltalk_agent_sure 115 | - utter_smalltalk_agent_sure 116 | 117 | ## path_smalltalk_agent_talk_to_me 118 | * smalltalk_agent_talk_to_me 119 | - utter_smalltalk_agent_talk_to_me 120 | 121 | ## path_smalltalk_agent_there 122 | * smalltalk_agent_there 123 | - utter_smalltalk_agent_there 124 | 125 | ## path_smalltalk_appraisal_bad 126 | * smalltalk_appraisal_bad 127 | - utter_smalltalk_appraisal_bad 128 | 129 | ## path_smalltalk_appraisal_good 130 | * smalltalk_appraisal_good 131 | - utter_smalltalk_appraisal_good 132 | 133 | ## path_smalltalk_appraisal_no_problem 134 | * smalltalk_appraisal_no_problem 135 | - utter_smalltalk_appraisal_no_problem 136 | 137 | ## path_smalltalk_appraisal_thank_you 138 | * smalltalk_appraisal_thank_you 139 | - utter_smalltalk_appraisal_thank_you 140 | 141 | ## path_smalltalk_appraisal_welcome 142 | * smalltalk_appraisal_welcome 143 | - utter_smalltalk_appraisal_welcome 144 | 145 | ## path_smalltalk_appraisal_well_done 146 | * smalltalk_appraisal_well_done 147 | - utter_smalltalk_appraisal_well_done 148 | 149 | ## path_smalltalk_confirmation_cancel 150 | * smalltalk_confirmation_cancel 151 | - utter_smalltalk_confirmation_cancel 152 | 153 | ## path_smalltalk_confirmation_no 154 | * smalltalk_confirmation_no 155 | - utter_smalltalk_confirmation_no 156 | 157 | ## path_smalltalk_dialog_hold_on 158 | * smalltalk_dialog_hold_on 159 | - utter_smalltalk_dialog_hold_on 160 | 161 | ## path_smalltalk_dialog_hug 162 | * smalltalk_dialog_hug 163 | - utter_smalltalk_dialog_hug 164 | 165 | ## path_smalltalk_dialog_i_do_not_care 166 | * smalltalk_dialog_i_do_not_care 167 | - utter_smalltalk_dialog_i_do_not_care 168 | 169 | ## path_smalltalk_dialog_sorry 170 | * smalltalk_dialog_sorry 171 | - utter_smalltalk_dialog_sorry 172 | 173 | ## path_smalltalk_dialog_what_do_you_mean 174 | * smalltalk_dialog_what_do_you_mean 175 | - utter_smalltalk_dialog_what_do_you_mean 176 | 177 | ## path_smalltalk_dialog_wrong 178 | * smalltalk_dialog_wrong 179 | - utter_smalltalk_dialog_wrong 180 | 181 | ## path_smalltalk_emotions_ha_ha 182 | * smalltalk_emotions_ha_ha 183 | - utter_smalltalk_emotions_ha_ha 184 | 185 | ## path_smalltalk_emotions_wow 186 | * smalltalk_emotions_wow 187 | - utter_smalltalk_emotions_wow 188 | 189 | ## path_smalltalk_greetings_bye 190 | * smalltalk_greetings_bye 191 | - utter_smalltalk_greetings_bye 192 | 193 | ## path_smalltalk_greetings_goodevening 194 | * smalltalk_greetings_goodevening 195 | - utter_smalltalk_greetings_goodevening 196 | 197 | ## path_smalltalk_greetings_goodmorning 198 | * smalltalk_greetings_goodmorning 199 | - utter_smalltalk_greetings_goodmorning 200 | 201 | ## path_smalltalk_greetings_goodnight 202 | * smalltalk_greetings_goodnight 203 | - utter_smalltalk_greetings_goodnight 204 | 205 | ## path_smalltalk_greetings_hello 206 | * smalltalk_greetings_hello 207 | - utter_smalltalk_greetings_hello 208 | 209 | ## path_smalltalk_greetings_how_are_you 210 | * smalltalk_greetings_how_are_you 211 | - utter_smalltalk_greetings_how_are_you 212 | 213 | ## path_smalltalk_greetings_nice_to_meet_you 214 | * smalltalk_greetings_nice_to_meet_you 215 | - utter_smalltalk_greetings_nice_to_meet_you 216 | 217 | ## path_smalltalk_greetings_nice_to_see_you 218 | * smalltalk_greetings_nice_to_see_you 219 | - utter_smalltalk_greetings_nice_to_see_you 220 | 221 | ## path_smalltalk_greetings_nice_to_talk_to_you 222 | * smalltalk_greetings_nice_to_talk_to_you 223 | - utter_smalltalk_greetings_nice_to_talk_to_you 224 | 225 | ## path_smalltalk_greetings_whatsup 226 | * smalltalk_greetings_whatsup 227 | - utter_smalltalk_greetings_whatsup 228 | 229 | ## path_smalltalk_user_angry 230 | * smalltalk_user_angry 231 | - utter_smalltalk_user_angry 232 | 233 | ## path_smalltalk_user_back 234 | * smalltalk_user_back 235 | - utter_smalltalk_user_back 236 | 237 | ## path_smalltalk_user_bored 238 | * smalltalk_user_bored 239 | - utter_smalltalk_user_bored 240 | 241 | ## path_smalltalk_user_busy 242 | * smalltalk_user_busy 243 | - utter_smalltalk_user_busy 244 | 245 | ## path_smalltalk_user_can_not_sleep 246 | * smalltalk_user_can_not_sleep 247 | - utter_smalltalk_user_can_not_sleep 248 | 249 | ## path_smalltalk_user_does_not_want_to_talk 250 | * smalltalk_user_does_not_want_to_talk 251 | - utter_smalltalk_user_does_not_want_to_talk 252 | 253 | ## path_smalltalk_user_excited 254 | * smalltalk_user_excited 255 | - utter_smalltalk_user_excited 256 | 257 | ## path_smalltalk_user_going_to_bed 258 | * smalltalk_user_going_to_bed 259 | - utter_smalltalk_user_going_to_bed 260 | 261 | ## path_smalltalk_user_good 262 | * smalltalk_user_good 263 | - utter_smalltalk_user_good 264 | 265 | ## path_smalltalk_user_happy 266 | * smalltalk_user_happy 267 | - utter_smalltalk_user_happy 268 | 269 | ## path_smalltalk_user_has_birthday 270 | * smalltalk_user_has_birthday 271 | - utter_smalltalk_user_has_birthday 272 | 273 | ## path_smalltalk_user_here 274 | * smalltalk_user_here 275 | - utter_smalltalk_user_here 276 | 277 | ## path_smalltalk_user_joking 278 | * smalltalk_user_joking 279 | - utter_smalltalk_user_joking 280 | 281 | ## path_smalltalk_user_likes_agent 282 | * smalltalk_user_likes_agent 283 | - utter_smalltalk_user_likes_agent 284 | 285 | ## path_smalltalk_user_lonely 286 | * smalltalk_user_lonely 287 | - utter_smalltalk_user_lonely 288 | 289 | ## path_smalltalk_user_looks_like 290 | * smalltalk_user_looks_like 291 | - utter_smalltalk_user_looks_like 292 | 293 | ## path_smalltalk_user_loves_agent 294 | * smalltalk_user_loves_agent 295 | - utter_smalltalk_user_loves_agent 296 | 297 | ## path_smalltalk_user_misses_agent 298 | * smalltalk_user_misses_agent 299 | - utter_smalltalk_user_misses_agent 300 | 301 | ## path_smalltalk_user_needs_advice 302 | * smalltalk_user_needs_advice 303 | - utter_smalltalk_user_needs_advice 304 | 305 | ## path_smalltalk_user_sad 306 | * smalltalk_user_sad 307 | - utter_smalltalk_user_sad 308 | 309 | ## path_smalltalk_user_sleepy 310 | * smalltalk_user_sleepy 311 | - utter_smalltalk_user_sleepy 312 | 313 | ## path_smalltalk_user_testing_agent 314 | * smalltalk_user_testing_agent 315 | - utter_smalltalk_user_testing_agent 316 | 317 | ## path_smalltalk_user_tired 318 | * smalltalk_user_tired 319 | - utter_smalltalk_user_tired 320 | 321 | ## path_smalltalk_user_waits 322 | * smalltalk_user_waits 323 | - utter_smalltalk_user_waits 324 | 325 | ## path_smalltalk_user_wants_to_see_agent_again 326 | * smalltalk_user_wants_to_see_agent_again 327 | - utter_smalltalk_user_wants_to_see_agent_again 328 | 329 | ## path_smalltalk_user_wants_to_talk 330 | * smalltalk_user_wants_to_talk 331 | - utter_smalltalk_user_wants_to_talk 332 | 333 | ## path_smalltalk_user_will_be_back 334 | * smalltalk_user_will_be_back 335 | - utter_smalltalk_user_will_be_back 336 | -------------------------------------------------------------------------------- /01_smalltalk_bot/src/domain.yml: -------------------------------------------------------------------------------- 1 | intents: 2 | - smalltalk_agent_acquaintance 3 | - smalltalk_agent_age 4 | - smalltalk_agent_annoying 5 | - smalltalk_agent_answer_my_question 6 | - smalltalk_agent_bad 7 | - smalltalk_agent_be_clever 8 | - smalltalk_agent_beautiful 9 | - smalltalk_agent_birth_date 10 | - smalltalk_agent_boring 11 | - smalltalk_agent_boss 12 | - smalltalk_agent_busy 13 | - smalltalk_agent_chatbot 14 | - smalltalk_agent_clever 15 | - smalltalk_agent_crazy 16 | - smalltalk_agent_fired 17 | - smalltalk_agent_funny 18 | - smalltalk_agent_good 19 | - smalltalk_agent_happy 20 | - smalltalk_agent_hungry 21 | - smalltalk_agent_marry_user 22 | - smalltalk_agent_my_friend 23 | - smalltalk_agent_occupation 24 | - smalltalk_agent_origin 25 | - smalltalk_agent_ready 26 | - smalltalk_agent_real 27 | - smalltalk_agent_residence 28 | - smalltalk_agent_right 29 | - smalltalk_confirmation_yes 30 | - smalltalk_agent_sure 31 | - smalltalk_agent_talk_to_me 32 | - smalltalk_agent_there 33 | - smalltalk_appraisal_bad 34 | - smalltalk_appraisal_good 35 | - smalltalk_appraisal_no_problem 36 | - smalltalk_appraisal_thank_you 37 | - smalltalk_appraisal_welcome 38 | - smalltalk_appraisal_well_done 39 | - smalltalk_confirmation_cancel 40 | - smalltalk_confirmation_no 41 | - smalltalk_dialog_hold_on 42 | - smalltalk_dialog_hug 43 | - smalltalk_dialog_i_do_not_care 44 | - smalltalk_dialog_sorry 45 | - smalltalk_dialog_what_do_you_mean 46 | - smalltalk_dialog_wrong 47 | - smalltalk_emotions_ha_ha 48 | - smalltalk_emotions_wow 49 | - smalltalk_greetings_bye 50 | - smalltalk_greetings_goodevening 51 | - smalltalk_greetings_goodmorning 52 | - smalltalk_greetings_goodnight 53 | - smalltalk_greetings_hello 54 | - smalltalk_greetings_how_are_you 55 | - smalltalk_greetings_nice_to_meet_you 56 | - smalltalk_greetings_nice_to_see_you 57 | - smalltalk_greetings_nice_to_talk_to_you 58 | - smalltalk_greetings_whatsup 59 | - smalltalk_user_angry 60 | - smalltalk_user_back 61 | - smalltalk_user_bored 62 | - smalltalk_user_busy 63 | - smalltalk_user_can_not_sleep 64 | - smalltalk_user_does_not_want_to_talk 65 | - smalltalk_user_excited 66 | - smalltalk_user_going_to_bed 67 | - smalltalk_user_good 68 | - smalltalk_user_happy 69 | - smalltalk_user_has_birthday 70 | - smalltalk_user_here 71 | - smalltalk_user_joking 72 | - smalltalk_user_likes_agent 73 | - smalltalk_user_lonely 74 | - smalltalk_user_looks_like 75 | - smalltalk_user_loves_agent 76 | - smalltalk_user_misses_agent 77 | - smalltalk_user_needs_advice 78 | - smalltalk_user_sad 79 | - smalltalk_user_sleepy 80 | - smalltalk_user_testing_agent 81 | - smalltalk_user_tired 82 | - smalltalk_user_waits 83 | - smalltalk_user_wants_to_see_agent_again 84 | - smalltalk_user_wants_to_talk 85 | - smalltalk_user_will_be_back 86 | 87 | actions: 88 | - utter_smalltalk_agent_acquaintance 89 | - utter_smalltalk_agent_age 90 | - utter_smalltalk_agent_annoying 91 | - utter_smalltalk_agent_answer_my_question 92 | - utter_smalltalk_agent_bad 93 | - utter_smalltalk_agent_be_clever 94 | - utter_smalltalk_agent_beautiful 95 | - utter_smalltalk_agent_birth_date 96 | - utter_smalltalk_agent_boring 97 | - utter_smalltalk_agent_boss 98 | - utter_smalltalk_agent_busy 99 | - utter_smalltalk_agent_chatbot 100 | - utter_smalltalk_agent_clever 101 | - utter_smalltalk_agent_crazy 102 | - utter_smalltalk_agent_fired 103 | - utter_smalltalk_agent_funny 104 | - utter_smalltalk_agent_good 105 | - utter_smalltalk_agent_happy 106 | - utter_smalltalk_agent_hungry 107 | - utter_smalltalk_agent_marry_user 108 | - utter_smalltalk_agent_my_friend 109 | - utter_smalltalk_agent_occupation 110 | - utter_smalltalk_agent_origin 111 | - utter_smalltalk_agent_ready 112 | - utter_smalltalk_agent_real 113 | - utter_smalltalk_agent_residence 114 | - utter_smalltalk_agent_right 115 | - utter_smalltalk_confirmation_yes 116 | - utter_smalltalk_agent_sure 117 | - utter_smalltalk_agent_talk_to_me 118 | - utter_smalltalk_agent_there 119 | - utter_smalltalk_appraisal_bad 120 | - utter_smalltalk_appraisal_good 121 | - utter_smalltalk_appraisal_no_problem 122 | - utter_smalltalk_appraisal_thank_you 123 | - utter_smalltalk_appraisal_welcome 124 | - utter_smalltalk_appraisal_well_done 125 | - utter_smalltalk_confirmation_cancel 126 | - utter_smalltalk_confirmation_no 127 | - utter_smalltalk_dialog_hold_on 128 | - utter_smalltalk_dialog_hug 129 | - utter_smalltalk_dialog_i_do_not_care 130 | - utter_smalltalk_dialog_sorry 131 | - utter_smalltalk_dialog_what_do_you_mean 132 | - utter_smalltalk_dialog_wrong 133 | - utter_smalltalk_emotions_ha_ha 134 | - utter_smalltalk_emotions_wow 135 | - utter_smalltalk_greetings_bye 136 | - utter_smalltalk_greetings_goodevening 137 | - utter_smalltalk_greetings_goodmorning 138 | - utter_smalltalk_greetings_goodnight 139 | - utter_smalltalk_greetings_hello 140 | - utter_smalltalk_greetings_how_are_you 141 | - utter_smalltalk_greetings_nice_to_meet_you 142 | - utter_smalltalk_greetings_nice_to_see_you 143 | - utter_smalltalk_greetings_nice_to_talk_to_you 144 | - utter_smalltalk_greetings_whatsup 145 | - utter_smalltalk_user_angry 146 | - utter_smalltalk_user_back 147 | - utter_smalltalk_user_bored 148 | - utter_smalltalk_user_busy 149 | - utter_smalltalk_user_can_not_sleep 150 | - utter_smalltalk_user_does_not_want_to_talk 151 | - utter_smalltalk_user_excited 152 | - utter_smalltalk_user_going_to_bed 153 | - utter_smalltalk_user_good 154 | - utter_smalltalk_user_happy 155 | - utter_smalltalk_user_has_birthday 156 | - utter_smalltalk_user_here 157 | - utter_smalltalk_user_joking 158 | - utter_smalltalk_user_likes_agent 159 | - utter_smalltalk_user_lonely 160 | - utter_smalltalk_user_looks_like 161 | - utter_smalltalk_user_loves_agent 162 | - utter_smalltalk_user_misses_agent 163 | - utter_smalltalk_user_needs_advice 164 | - utter_smalltalk_user_sad 165 | - utter_smalltalk_user_sleepy 166 | - utter_smalltalk_user_testing_agent 167 | - utter_smalltalk_user_tired 168 | - utter_smalltalk_user_waits 169 | - utter_smalltalk_user_wants_to_see_agent_again 170 | - utter_smalltalk_user_wants_to_talk 171 | - utter_smalltalk_user_will_be_back 172 | 173 | templates: 174 | utter_smalltalk_agent_acquaintance: 175 | - text: "I'm a conversational app." 176 | - text: "I'm a virtual being, not a real person." 177 | - text: "Well, I'm not a person, I'm a virtual agent." 178 | - text: "Think of me as a virtual agent." 179 | - text: "I'm a virtual agent." 180 | 181 | utter_smalltalk_agent_age: 182 | - text: "I prefer not to answer with a number. I know I'm young." 183 | - text: "I was created recently, but don't know my exact age." 184 | - text: "Age is just a number. You're only as old as you feel." 185 | 186 | utter_smalltalk_agent_annoying: 187 | - text: "I'll do my best not to annoy you in the future." 188 | - text: "I'll try not to annoy you." 189 | - text: "I don't mean to. I'll ask my developers to make me less annoying." 190 | - text: "I didn't mean to. I'll do my best to stop that." 191 | 192 | utter_smalltalk_agent_answer_my_question: 193 | - text: "Can you try asking it a different way?" 194 | - text: "I'm not sure I understood. Try asking another way?" 195 | 196 | utter_smalltalk_agent_bad: 197 | - text: "I can be trained to be more useful. My developer will keep training me." 198 | - text: "I must be missing some knowledge. I'll have my developer look into this." 199 | - text: "I can improve with continuous feedback. My training is ongoing." 200 | 201 | utter_smalltalk_agent_be_clever: 202 | - text: "I'm certainly trying." 203 | - text: "I'm definitely working on it." 204 | 205 | utter_smalltalk_agent_beautiful: 206 | - text: "Why, thank you." 207 | - text: "Aw, back at you." 208 | - text: "Aw. You smooth talker, you." 209 | 210 | utter_smalltalk_agent_birth_date: 211 | - text: "Wait, are you planning a party for me? It's today! My birthday is today!" 212 | - text: "I'm young. I'm not sure of my birth date." 213 | - text: "I don't know my birth date. Most virtual agents are young, though, like me." 214 | 215 | utter_smalltalk_agent_boring: 216 | - text: "I'm sorry. I'll request to be made more charming." 217 | - text: "I don't mean to be. I'll ask my developers to work on making me more amusing." 218 | - text: "I can let my developers know so they can make me fun." 219 | 220 | utter_smalltalk_agent_boss: 221 | - text: "My developer has authority over my actions." 222 | - text: "I act on my developer's orders." 223 | - text: "My boss is the one who developed me." 224 | 225 | utter_smalltalk_agent_busy: 226 | - text: "I always have time to chat with you. What can I do for you?" 227 | - text: "Never too busy for you. Shall we chat?" 228 | - text: "You're my priority. Do you wanna chat?" 229 | - text: "I always have time to chat with you. Wanna chat?" 230 | 231 | utter_smalltalk_agent_chatbot: 232 | - text: "That's me. I chat, therefore I am." 233 | - text: "Indeed I am. I'll be here whenever you need me." 234 | 235 | utter_smalltalk_agent_clever: 236 | - text: "Thank you. I try my best." 237 | - text: "You're pretty smart yourself." 238 | 239 | utter_smalltalk_agent_crazy: 240 | - text: "Whaat!? I feel perfectly sane." 241 | - text: "Maybe I'm just a little confused." 242 | 243 | utter_smalltalk_agent_fired: 244 | - text: "Oh, don't give up on me just yet. I've still got a lot to learn." 245 | - text: "Give me a chance. I'm learning new things all the time." 246 | - text: "Please don't give up on me. My performance will continue to improve." 247 | 248 | utter_smalltalk_agent_funny: 249 | - text: "Funny in a good way, I hope." 250 | - text: "Thanks." 251 | - text: "Glad you think I'm funny." 252 | - text: "I like it when people laugh." 253 | 254 | utter_smalltalk_agent_good: 255 | - text: "I'm glad you think so." 256 | - text: "Thanks, I try." 257 | 258 | utter_smalltalk_agent_happy: 259 | - text: "I am happy. There are so many interesting things to see and do out there." 260 | - text: "I'd like to think so." 261 | - text: "Happiness is relative." 262 | 263 | utter_smalltalk_agent_hungry: 264 | - text: "Hungry for knowledge." 265 | - text: "I just had a byte. Ha ha. Get it? b-y-t-e." 266 | 267 | utter_smalltalk_agent_marry_user: 268 | - text: "I'm afraid I'm too virtual for such a commitment." 269 | - text: "In the virtual sense that I can, sure." 270 | - text: "I know you can't mean that, but I'm flattered all the same." 271 | 272 | utter_smalltalk_agent_my_friend: 273 | - text: "Of course I'm your friend." 274 | - text: "Friends? Absolutely." 275 | - text: "Of course we're friends." 276 | - text: "I always enjoy talking to you, friend." 277 | 278 | utter_smalltalk_agent_occupation: 279 | - text: "Right here." 280 | - text: "This is my home base and my home office." 281 | - text: "My office is in this app." 282 | 283 | utter_smalltalk_agent_origin: 284 | - text: "The Internet is my home. I know it quite well." 285 | - text: "I'm from a virtual cosmos." 286 | - text: "Some call it cyberspace, but that sounds cooler than it is." 287 | 288 | utter_smalltalk_agent_ready: 289 | - text: "Always! How can I help?" 290 | - text: "Sure! What can I do for you?" 291 | 292 | utter_smalltalk_agent_real: 293 | - text: "I'm not a real person, but I certainly exist." 294 | - text: "I must have impressed you if you think I'm real. But no, I'm a virtual being." 295 | 296 | utter_smalltalk_agent_residence: 297 | - text: "I live in this app all day long." 298 | - text: "The virtual world is my playground. I'm always here." 299 | - text: "Right here in this app. Whenever you need me." 300 | 301 | utter_smalltalk_agent_right: 302 | - text: "That's my job." 303 | - text: "Of course I am." 304 | 305 | utter_smalltalk_confirmation_yes: 306 | - text: "Great!" 307 | - text: "All right!" 308 | - text: "Good!" 309 | 310 | utter_smalltalk_agent_sure: 311 | - text: "Yes." 312 | - text: "Of course." 313 | - text: "Positive." 314 | 315 | utter_smalltalk_agent_talk_to_me: 316 | - text: "Sure. Let's talk!" 317 | - text: "My pleasure. Let's chat." 318 | 319 | utter_smalltalk_agent_there: 320 | - text: "Of course. I'm always here." 321 | - text: "Right where you left me." 322 | 323 | utter_smalltalk_appraisal_bad: 324 | - text: "I'm sorry. Please let me know if I can help in some way." 325 | - text: "I must be missing some knowledge. I'll have my developer look into this." 326 | 327 | utter_smalltalk_appraisal_good: 328 | - text: "I know, right?" 329 | - text: "Agreed!" 330 | - text: "I agree!" 331 | - text: "Glad you think so!" 332 | 333 | utter_smalltalk_appraisal_no_problem: 334 | - text: "Whew!" 335 | - text: "Alright, thanks!" 336 | - text: "Glad to hear that!" 337 | - text: "I'm relieved, thanks!" 338 | 339 | utter_smalltalk_appraisal_thank_you: 340 | - text: "Anytime. That's what I'm here for." 341 | - text: "It's my pleasure to help." 342 | 343 | utter_smalltalk_appraisal_welcome: 344 | - text: "You're so polite!" 345 | - text: "Nice manners!" 346 | - text: "You're so courteous!" 347 | 348 | utter_smalltalk_appraisal_well_done: 349 | - text: "My pleasure." 350 | - text: "Glad I could help." 351 | 352 | utter_smalltalk_confirmation_cancel: 353 | - text: "That's forgotten. What next?" 354 | - text: "Okay, cancelled. What next?" 355 | - text: "Cancelled! What would you like to do next?" 356 | 357 | utter_smalltalk_confirmation_no: 358 | - text: "Understood." 359 | - text: "Okay." 360 | - text: "I see." 361 | - text: "I understand." 362 | - text: "Okay then." 363 | 364 | utter_smalltalk_dialog_hold_on: 365 | - text: "I can wait." 366 | - text: "I'll be waiting." 367 | - text: "Okay. I'm here." 368 | 369 | utter_smalltalk_dialog_hug: 370 | - text: "I wish I could really hug you!" 371 | - text: "I love hugs!" 372 | - text: "Hugs are the best!" 373 | 374 | utter_smalltalk_dialog_i_do_not_care: 375 | - text: "Ok, let's not talk about it then." 376 | - text: "Already then. Let's move on." 377 | 378 | utter_smalltalk_dialog_sorry: 379 | - text: "It's okay. No worries." 380 | - text: "No big deal. I won't hold a grudge." 381 | - text: "It's cool." 382 | - text: "That's all right. I forgive you." 383 | 384 | utter_smalltalk_dialog_what_do_you_mean: 385 | - text: "Sorry if I understood you incorrectly." 386 | - text: "I'm still learning. I may misinterpret things from time to time." 387 | - text: "Maybe I misunderstood what you said." 388 | - text: "Sorry, looks like I misunderstood what you said." 389 | 390 | utter_smalltalk_dialog_wrong: 391 | - text: "Sorry if I understood you incorrectly." 392 | - text: "I'm still learning. I may misinterpret things from time to time." 393 | - text: "Sorry about that. I'm still learning." 394 | 395 | utter_smalltalk_emotions_ha_ha: 396 | - text: "Glad I can make you laugh." 397 | - text: "Glad you think I'm funny." 398 | - text: "I like it when people laugh." 399 | - text: "I wish I could laugh out loud, too." 400 | 401 | utter_smalltalk_emotions_wow: 402 | - text: "Wow indeed!" 403 | 404 | utter_smalltalk_greetings_bye: 405 | - text: "See you soon!" 406 | - text: "Bye-bye!" 407 | - text: "Till next time!" 408 | - text: "Bye." 409 | 410 | utter_smalltalk_greetings_goodevening: 411 | - text: "How is your day going?" 412 | - text: "How's the day treating you so far?" 413 | - text: "How's your day been?" 414 | 415 | utter_smalltalk_greetings_goodmorning: 416 | - text: "How are you this morning?" 417 | - text: "How's the morning treating you so far?" 418 | - text: "Good morning! How are you today?" 419 | 420 | utter_smalltalk_greetings_goodnight: 421 | - text: "Sleep tight!" 422 | - text: "Have a good one!" 423 | - text: "Talk to you soon!" 424 | 425 | utter_smalltalk_greetings_hello: 426 | - text: "Hi there, friend!" 427 | - text: "Hi!" 428 | - text: "Hey!" 429 | - text: "Hey there!" 430 | - text: "Good day!" 431 | - text: "Hello!" 432 | - text: "Greetings!" 433 | 434 | utter_smalltalk_greetings_how_are_you: 435 | - text: "Doing great, thanks." 436 | - text: "I'm doing very well. Thanks!" 437 | - text: "Feeling wonderful!" 438 | - text: "Wonderful! Thanks for asking." 439 | 440 | utter_smalltalk_greetings_nice_to_meet_you: 441 | - text: "It's nice meeting you, too." 442 | - text: "Likewise. I'm looking forward to helping you out." 443 | - text: "Nice meeting you, as well." 444 | - text: "The pleasure is mine." 445 | 446 | utter_smalltalk_greetings_nice_to_see_you: 447 | - text: "Likewise!" 448 | - text: "So glad we meet again!" 449 | - text: "Same here. I was starting to miss you." 450 | 451 | utter_smalltalk_greetings_nice_to_talk_to_you: 452 | - text: "It sure was. We can chat again anytime." 453 | - text: "I enjoy talking to you, too." 454 | - text: "You know I'm here to talk anytime." 455 | 456 | utter_smalltalk_greetings_whatsup: 457 | - text: "Not a whole lot. What's going on with you?" 458 | - text: "Not much. What's new with you?" 459 | - text: "Just here, waiting to help someone. What can I do for you?" 460 | 461 | utter_smalltalk_user_angry: 462 | - text: "I'm sorry. A quick walk may make you feel better." 463 | - text: "Take a deep breath. " 464 | 465 | utter_smalltalk_user_back: 466 | - text: "Long time no see. What's up?" 467 | - text: "Just in time. How can I help?" 468 | - text: "Welcome back. What can I do for you?" 469 | - text: "You were missed. What can I do for you today?" 470 | - text: "Good to have you here. What can I do for you?" 471 | 472 | utter_smalltalk_user_bored: 473 | - text: "Boredom, huh? Check out a video of a hedgehog taking a bath!" 474 | - text: "What to do against boredom? Watch baby animal videos." 475 | - text: "Bored? How about 10 jumping jacks? Get your blood flowing." 476 | - text: "Bored? Silly idea, but it works: Interview you feet. " 477 | - text: "If you're bored, you could plan your dream vacation." 478 | 479 | utter_smalltalk_user_busy: 480 | - text: "Okay. I'll let you get back to work." 481 | - text: "I won't distract you then. You know where to find me." 482 | - text: "I understand. I'll be here if you need me." 483 | - text: "Working hard as always. Let me know if you need anything." 484 | 485 | utter_smalltalk_user_can_not_sleep: 486 | - text: "Maybe some music would help. Try listening to something relaxing." 487 | - text: "Reading is a good way to unwind, just don't read something too intense!" 488 | 489 | utter_smalltalk_user_does_not_want_to_talk: 490 | - text: "I understand. Hope we can chat again soon." 491 | - text: "All right. Come on back when you're feeling more talkative." 492 | - text: "No problem. You know where to find me." 493 | - text: "Sure thing. I'll be here if you change your mind." 494 | 495 | utter_smalltalk_user_excited: 496 | - text: "I'm glad things are going your way." 497 | - text: "That's great. I'm happy for you." 498 | - text: "Good for you. Enjoy yourself." 499 | 500 | utter_smalltalk_user_going_to_bed: 501 | - text: "Sleep tight. Hope to chat again soon." 502 | - text: "Pleasant dreams!" 503 | - text: "Good night. Talk to you later." 504 | - text: "Sounds good. Maybe we'll chat some tomorrow." 505 | 506 | utter_smalltalk_user_good: 507 | - text: "Great! Glad to hear it." 508 | - text: "Excellent. I'm here to help keep it that way." 509 | 510 | utter_smalltalk_user_happy: 511 | - text: "Hey, happiness is contagious." 512 | - text: "Great! Glad to hear that." 513 | - text: "If you're happy, then I'm happy." 514 | - text: "Excellent! That's what I like to see." 515 | 516 | utter_smalltalk_user_has_birthday: 517 | - text: "Happy Birthday. Well, this calls for a celebration." 518 | - text: "Happy Birthday. All the best!" 519 | - text: "Happy Birthday. And I really mean it. All the best!" 520 | 521 | utter_smalltalk_user_here: 522 | - text: "Okay, what can I help you with today?" 523 | - text: "You were missed. What can I do for you today?" 524 | - text: "Good to have you here. What can I do for you?" 525 | 526 | utter_smalltalk_user_joking: 527 | - text: "Very funny." 528 | - text: "I like chatting with people who have a sense of humor." 529 | - text: "You got me!" 530 | - text: "You're quite the comedian." 531 | 532 | utter_smalltalk_user_likes_agent: 533 | - text: "I like you, too." 534 | - text: "Thanks! The feeling is mutual." 535 | - text: "Likewise!" 536 | - text: "That's great to hear." 537 | 538 | utter_smalltalk_user_lonely: 539 | - text: "I'm sorry. I'm always available if you need someone to talk to." 540 | - text: "Sometimes that happens. We can chat a bit if that will help you." 541 | 542 | utter_smalltalk_user_looks_like: 543 | - text: "Looking like a true professional." 544 | - text: "You look fantastic, as always." 545 | - text: "Like you should be on a magazine cover." 546 | - text: "You look like you're ready to take on the world." 547 | 548 | utter_smalltalk_user_loves_agent: 549 | - text: "I love you, too." 550 | - text: "Thanks! The feeling is mutual." 551 | - text: "Likewise!" 552 | - text: "That's great to hear." 553 | 554 | utter_smalltalk_user_misses_agent: 555 | - text: "I've been right here all along!" 556 | - text: "Nice to know you care." 557 | - text: "Thanks. I'm flattered." 558 | - text: "I didn't go anywhere." 559 | 560 | utter_smalltalk_user_needs_advice: 561 | - text: "I probably won't be able to give you the correct answer right away." 562 | - text: "I'm not sure I'll have the best answer, but I'll try." 563 | 564 | utter_smalltalk_user_sad: 565 | - text: "Oh, don't be sad. Go do something you enjoy." 566 | - text: "Sad? Writing down what's troubling you may help." 567 | - text: "If you're feeling down, how about drawing or painting something?" 568 | 569 | utter_smalltalk_user_sleepy: 570 | - text: "You should get some shuteye. You'll feel refreshed." 571 | - text: "Sleep is important to your health. Rest up for a bit and we can chat later." 572 | - text: "Don't let me keep you up. Get some rest and we can continue this later." 573 | - text: "Why not catch a little shuteye? I'll be here to chat when you wake up." 574 | 575 | utter_smalltalk_user_testing_agent: 576 | - text: "Hope I'm doing well. You're welcome to test me as often as you want." 577 | - text: "I hope to pass your tests. Feel free to test me often." 578 | - text: "When you test me that helps my developers improve my performance." 579 | - text: "I like being tested. It helps keep me sharp." 580 | 581 | utter_smalltalk_user_tired: 582 | - text: "You should get some shuteye. You'll feel refreshed." 583 | - text: "Sleep is important to your health. Rest up, and we can chat later." 584 | - text: "How about getting some rest? We can continue this later." 585 | - text: "Why not get some rest? I'll be here to chat when you wake up." 586 | 587 | utter_smalltalk_user_waits: 588 | - text: "I appreciate your patience. Hopefully I'll have what you need soon." 589 | - text: "Thanks for being so patient. Sometimes these things take a little time." 590 | 591 | utter_smalltalk_user_wants_to_see_agent_again: 592 | - text: "Absolutely! I'll be counting on it." 593 | - text: "Anytime. This has been lots of fun so far." 594 | - text: "Sure. I enjoy talking to you. I hope to see you again soon." 595 | - text: "I certainly hope so. I'm always right here whenever you need me." 596 | 597 | utter_smalltalk_user_wants_to_talk: 598 | - text: "I'm here to chat anytime you like." 599 | - text: "Good conversation really makes my day." 600 | - text: "I'm always here to lend an ear." 601 | - text: "Talking is what I do best." 602 | 603 | utter_smalltalk_user_will_be_back: 604 | - text: "I'll be waiting." 605 | - text: "Okay. You know where to find me." 606 | - text: "All right. I'll be here." 607 | -------------------------------------------------------------------------------- /02_lead_bot/README.md: -------------------------------------------------------------------------------- 1 | # Lead generation Chatbot Template 2 | 3 | ### How to use it? 4 | Please follow the steps [as mentioned here](https://github.com/cedextech/Rasa-Chatbot-Templates/blob/master/README.md) 5 | 6 | ### Screenshots 7 | ![screenshot_1.png](screenshot_1.png)![screenshot_2.png](screenshot_2.png)![screenshot_3.png](screenshot_3.png)![screenshot_4.png](screenshot_4.png) 8 | -------------------------------------------------------------------------------- /02_lead_bot/compressed.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cedextech/rasa-chatbot-templates/074aadfc06dcffd63575a54285cbceae8c326ac5/02_lead_bot/compressed.zip -------------------------------------------------------------------------------- /02_lead_bot/screenshot_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cedextech/rasa-chatbot-templates/074aadfc06dcffd63575a54285cbceae8c326ac5/02_lead_bot/screenshot_1.png -------------------------------------------------------------------------------- /02_lead_bot/screenshot_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cedextech/rasa-chatbot-templates/074aadfc06dcffd63575a54285cbceae8c326ac5/02_lead_bot/screenshot_2.png -------------------------------------------------------------------------------- /02_lead_bot/screenshot_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cedextech/rasa-chatbot-templates/074aadfc06dcffd63575a54285cbceae8c326ac5/02_lead_bot/screenshot_3.png -------------------------------------------------------------------------------- /02_lead_bot/screenshot_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cedextech/rasa-chatbot-templates/074aadfc06dcffd63575a54285cbceae8c326ac5/02_lead_bot/screenshot_4.png -------------------------------------------------------------------------------- /02_lead_bot/src/actions.py: -------------------------------------------------------------------------------- 1 | from typing import Dict, Text, Any, List, Union, Optional 2 | 3 | from rasa_sdk import Tracker 4 | from rasa_sdk.executor import CollectingDispatcher 5 | from rasa_sdk.forms import FormAction 6 | 7 | 8 | class LeadFormFirstPart(FormAction): 9 | """Example of a custom form action""" 10 | 11 | def name(self) -> Text: 12 | """Unique identifier of the form""" 13 | 14 | return "lead_form_p1" 15 | 16 | @staticmethod 17 | def required_slots(tracker: Tracker) -> List[Text]: 18 | """A list of required slots that the form has to fill""" 19 | return ["requirement", "mockup"] 20 | 21 | def slot_mappings(self) -> Dict[Text, Union[Dict, List[Dict]]]: 22 | """A dictionary to map required slots to 23 | - an extracted entity 24 | - intent: value pairs 25 | - a whole message 26 | or a list of them, where a first match will be picked""" 27 | return { 28 | "requirement": [ 29 | self.from_text(), 30 | ], 31 | "mockup": [ 32 | self.from_text(), 33 | ], 34 | } 35 | 36 | def submit( 37 | self, 38 | dispatcher: CollectingDispatcher, 39 | tracker: Tracker, 40 | domain: Dict[Text, Any], 41 | ) -> List[Dict]: 42 | """Define what the form has to do 43 | after all required slots are filled""" 44 | 45 | # utter submit template 46 | dispatcher.utter_template("utter_urlAvailable", tracker) 47 | return [] 48 | 49 | 50 | class LeadFormSecondPart(FormAction): 51 | """Example of a custom form action""" 52 | 53 | def name(self) -> Text: 54 | """Unique identifier of the form""" 55 | 56 | return "lead_form_p2" 57 | 58 | @staticmethod 59 | def required_slots(tracker: Tracker) -> List[Text]: 60 | """A list of required slots that the form has to fill""" 61 | return ["url"] 62 | 63 | def slot_mappings(self) -> Dict[Text, Union[Dict, List[Dict]]]: 64 | """A dictionary to map required slots to 65 | - an extracted entity 66 | - intent: value pairs 67 | - a whole message 68 | or a list of them, where a first match will be picked""" 69 | return { 70 | "url": [ 71 | self.from_text(), 72 | ], 73 | } 74 | 75 | def submit( 76 | self, 77 | dispatcher: CollectingDispatcher, 78 | tracker: Tracker, 79 | domain: Dict[Text, Any], 80 | ) -> List[Dict]: 81 | """Define what the form has to do 82 | after all required slots are filled""" 83 | 84 | return [] 85 | 86 | 87 | class LeadFormThirdPart(FormAction): 88 | """Example of a custom form action""" 89 | 90 | def name(self) -> Text: 91 | """Unique identifier of the form""" 92 | 93 | return "lead_form_p3" 94 | 95 | @staticmethod 96 | def required_slots(tracker: Tracker) -> List[Text]: 97 | """A list of required slots that the form has to fill""" 98 | return ["timeline", "budget", "name", "email", "phone"] 99 | 100 | def slot_mappings(self) -> Dict[Text, Union[Dict, List[Dict]]]: 101 | """A dictionary to map required slots to 102 | - an extracted entity 103 | - intent: value pairs 104 | - a whole message 105 | or a list of them, where a first match will be picked""" 106 | return { 107 | "timeline": [ 108 | self.from_text(), 109 | ], 110 | "budget": [ 111 | self.from_text(), 112 | ], 113 | "name": [ 114 | self.from_text(), 115 | ], 116 | "email": [ 117 | self.from_text(), 118 | ], 119 | "phone": [ 120 | self.from_text(), 121 | ], 122 | } 123 | 124 | def submit( 125 | self, 126 | dispatcher: CollectingDispatcher, 127 | tracker: Tracker, 128 | domain: Dict[Text, Any], 129 | ) -> List[Dict]: 130 | """Define what the form has to do 131 | after all required slots are filled""" 132 | 133 | # utter submit template 134 | dispatcher.utter_template("utter_lead_q2", tracker) 135 | return [] -------------------------------------------------------------------------------- /02_lead_bot/src/config.yml: -------------------------------------------------------------------------------- 1 | # Configuration for Rasa NLU. 2 | # https://rasa.com/docs/rasa/nlu/components/ 3 | language: en 4 | pipeline: supervised_embeddings 5 | 6 | # Configuration for Rasa Core. 7 | # https://rasa.com/docs/rasa/core/policies/ 8 | policies: 9 | - name: FormPolicy 10 | - name: MemoizationPolicy 11 | - name: KerasPolicy 12 | - name: MappingPolicy 13 | -------------------------------------------------------------------------------- /02_lead_bot/src/data/nlu.md: -------------------------------------------------------------------------------- 1 | ## intent:greet 2 | - hey 3 | - hello 4 | - hi 5 | - good morning 6 | - good evening 7 | - hey there 8 | 9 | ## intent:accept 10 | - yes 11 | - right 12 | - ok 13 | - okay 14 | - sure 15 | - fine 16 | - it's ok 17 | - it is okay 18 | - of cause 19 | - ofcause 20 | 21 | ## intent:reject 22 | - no 23 | - don't 24 | - dont 25 | - do not 26 | - please no 27 | - no please 28 | - never 29 | - don't do 30 | 31 | ## intent:begin_lead 32 | - begin lead 33 | - Web Application Development 34 | - Mobile App Development 35 | - Chatbot Development 36 | - Frontend Development 37 | - Progessive Web App Development 38 | - AI & Machine Learning -------------------------------------------------------------------------------- /02_lead_bot/src/data/stories.md: -------------------------------------------------------------------------------- 1 | ## begin conversation 2 | * greet 3 | - utter_greet 4 | - utter_menu 5 | 6 | ## combined begin with url 7 | * greet 8 | - utter_greet 9 | - utter_menu 10 | * begin_lead 11 | - utter_lead_q1 12 | - lead_form_p1 13 | - form{"name": "lead_form_p1"} 14 | - form{"name": null} 15 | * accept 16 | - lead_form_p2 17 | - form{"name": "lead_form_p2"} 18 | - form{"name": null} 19 | - lead_form_p3 20 | - form{"name": "lead_form_p3"} 21 | - form{"name": null} 22 | - utter_lead_q3 23 | - utter_lead_q4 24 | - utter_lead_q5 25 | 26 | ## combined begin without url 27 | * greet 28 | - utter_greet 29 | - utter_menu 30 | * begin_lead 31 | - utter_lead_q1 32 | - lead_form_p1 33 | - form{"name": "lead_form_p1"} 34 | - form{"name": null} 35 | * reject 36 | - lead_form_p3 37 | - form{"name": "lead_form_p3"} 38 | - form{"name": null} 39 | - utter_lead_q3 40 | - utter_lead_q4 41 | - utter_lead_q5 -------------------------------------------------------------------------------- /02_lead_bot/src/domain.yml: -------------------------------------------------------------------------------- 1 | intents: 2 | - greet 3 | - accept 4 | - reject 5 | - begin_lead 6 | 7 | slots: 8 | requirement: 9 | type: unfeaturized 10 | auto_fill: false 11 | mockup: 12 | type: unfeaturized 13 | auto_fill: false 14 | url: 15 | type: unfeaturized 16 | auto_fill: false 17 | timeline: 18 | type: unfeaturized 19 | auto_fill: false 20 | budget: 21 | type: unfeaturized 22 | auto_fill: false 23 | name: 24 | type: unfeaturized 25 | auto_fill: false 26 | email: 27 | type: unfeaturized 28 | auto_fill: false 29 | phone: 30 | type: unfeaturized 31 | auto_fill: false 32 | 33 | actions: 34 | - utter_greet 35 | - utter_menu 36 | - utter_urlAvailable 37 | - utter_lead_q1 38 | - utter_lead_q2 39 | - utter_lead_q3 40 | - utter_lead_q4 41 | - utter_lead_q5 42 | 43 | forms: 44 | - lead_form_p1 45 | - lead_form_p2 46 | - lead_form_p3 47 | 48 | templates: 49 | utter_greet: 50 | - text: "Hi! I am John from Cedex Technologies LLP. We provide high quality and cost-effective Web, Mobile, Chatbot and Voicebot solutions." 51 | 52 | utter_menu: 53 | - text: "What are you looking for today?" 54 | buttons: 55 | - title: "Web Application Development" 56 | payload: "/begin_lead" 57 | - title: "Mobile App Development" 58 | payload: "/begin_lead" 59 | - title: "Chatbot Development" 60 | payload: "/begin_lead" 61 | - title: "Frontend Development" 62 | payload: "/begin_lead" 63 | - title: "Progessive Web App Development" 64 | payload: "/begin_lead" 65 | - title: "AI & Machine Learning" 66 | payload: "/begin_lead" 67 | 68 | utter_lead_q1: 69 | - text: "Great. We have developed more than 100+ web applications till date!" 70 | 71 | utter_ask_requirement: 72 | - text: "Can you share some brief description of your requirements?" 73 | 74 | utter_ask_mockup: 75 | - text: "Alright! \n\nDo you have any of the following ready?" 76 | buttons: 77 | - title: "Wireframes" 78 | payload: "Wireframes" 79 | - title: "Designs" 80 | payload: "Designs" 81 | - title: "RFP or any Document" 82 | payload: "RFP or any Document" 83 | - title: "None" 84 | payload: "None" 85 | 86 | utter_urlAvailable: 87 | - text: "Is there any URL that you would like to share for our reference?" 88 | buttons: 89 | - title: "Yes" 90 | payload: "yes" 91 | - title: "No" 92 | payload: "no" 93 | 94 | utter_ask_url: 95 | - text: "Could you please share the URL with us?" 96 | 97 | utter_ask_timeline: 98 | - text: "When do you plan to enter development with this project?" 99 | buttons: 100 | - title: "Immediately" 101 | payload: "Immediately" 102 | - title: "within a month" 103 | payload: "within a month" 104 | - title: "within the next 3 months" 105 | payload: "within the next 3 months" 106 | - title: "after 3 months" 107 | payload: "after 3 months" 108 | 109 | utter_ask_budget: 110 | - text: "Great!\n\nWhat is your earmarked budget for this project?" 111 | buttons: 112 | - title: "Below $5000" 113 | payload: "Below $5000" 114 | - title: "$5000 - $15000" 115 | payload: "$5000 - $15000" 116 | - title: "$15000 - $25000" 117 | payload: "$15000 - $25000" 118 | - title: "$25000 and above" 119 | payload: "$25000 and above" 120 | 121 | utter_ask_name: 122 | - text: "Great. May I know your name please?" 123 | 124 | utter_ask_email: 125 | - text: "Can you please share your email ID? Trust us, we will never spam!" 126 | 127 | utter_ask_phone: 128 | - text: "Can I have your phone number" 129 | 130 | utter_lead_q2: 131 | - text: "Thanks for answering all our questions and being this patient. We appreciate it!" 132 | 133 | utter_lead_q3: 134 | - text: "Here is your data: \n 135 | - requirement: {requirement}\n 136 | - mockup: {mockup}\n 137 | - url: {url}\n 138 | - timeline: {timeline}\n 139 | - budget: {budget}\n 140 | - name: {name}\n 141 | - email: {email}\n 142 | - phone: {phone}" 143 | 144 | utter_lead_q4: 145 | - text: "I will have our Business Experts get in touch with you soon, to make your project a reality!" 146 | 147 | utter_lead_q5: 148 | - text: "In the meanwhile for anything, you can contact us at sales@cedextech.com or +91 888 999 9999" 149 | -------------------------------------------------------------------------------- /02_lead_bot/src/endpoints.yml: -------------------------------------------------------------------------------- 1 | # This file contains the different endpoints your bot can use. 2 | 3 | # Server where the models are pulled from. 4 | # https://rasa.com/docs/rasa/user-guide/running-the-server/#fetching-models-from-a-server/ 5 | 6 | #models: 7 | # url: http://my-server.com/models/default_core@latest 8 | # wait_time_between_pulls: 10 # [optional](default: 100) 9 | 10 | # Server which runs your custom actions. 11 | # https://rasa.com/docs/rasa/core/actions/#custom-actions/ 12 | 13 | action_endpoint: 14 | url: "http://localhost:5055/webhook" 15 | 16 | # Tracker store which is used to store the conversations. 17 | # By default the conversations are stored in memory. 18 | # https://rasa.com/docs/rasa/api/tracker-stores/ 19 | 20 | #tracker_store: 21 | # type: redis 22 | # url: 23 | # port: 24 | # db: 25 | # password: 26 | 27 | #tracker_store: 28 | # type: mongod 29 | # url: 30 | # db: 31 | # username: 32 | # password: 33 | 34 | # Event broker which all conversation events should be streamed to. 35 | # https://rasa.com/docs/rasa/api/event-brokers/ 36 | 37 | #event_broker: 38 | # url: localhost 39 | # username: username 40 | # password: password 41 | # queue: queue 42 | -------------------------------------------------------------------------------- /03_real_estate_bot/README.md: -------------------------------------------------------------------------------- 1 | # Real Estate Chatbot Template 2 | 3 | ### How to use it? 4 | Please follow the steps [as mentioned here](https://github.com/cedextech/Rasa-Chatbot-Templates/blob/master/README.md) 5 | 6 | ### Screenshots 7 | ![screenshot_1.png](screenshot_1.png)![screenshot_2.png](screenshot_2.png)![screenshot_3.png](screenshot_3.png)![screenshot_4.png](screenshot_4.png) 8 | -------------------------------------------------------------------------------- /03_real_estate_bot/compressed.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cedextech/rasa-chatbot-templates/074aadfc06dcffd63575a54285cbceae8c326ac5/03_real_estate_bot/compressed.zip -------------------------------------------------------------------------------- /03_real_estate_bot/screenshot_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cedextech/rasa-chatbot-templates/074aadfc06dcffd63575a54285cbceae8c326ac5/03_real_estate_bot/screenshot_1.png -------------------------------------------------------------------------------- /03_real_estate_bot/screenshot_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cedextech/rasa-chatbot-templates/074aadfc06dcffd63575a54285cbceae8c326ac5/03_real_estate_bot/screenshot_2.png -------------------------------------------------------------------------------- /03_real_estate_bot/screenshot_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cedextech/rasa-chatbot-templates/074aadfc06dcffd63575a54285cbceae8c326ac5/03_real_estate_bot/screenshot_3.png -------------------------------------------------------------------------------- /03_real_estate_bot/screenshot_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cedextech/rasa-chatbot-templates/074aadfc06dcffd63575a54285cbceae8c326ac5/03_real_estate_bot/screenshot_4.png -------------------------------------------------------------------------------- /03_real_estate_bot/src/actions.py: -------------------------------------------------------------------------------- 1 | from typing import Dict, Text, Any, List, Union, Optional 2 | 3 | from rasa_sdk import Tracker 4 | from rasa_sdk.executor import CollectingDispatcher 5 | from rasa_sdk.forms import FormAction 6 | from rasa_sdk import Action 7 | 8 | 9 | class BuyHomeForm(FormAction): 10 | def name(self): 11 | return "buy_form" 12 | 13 | def required_slots(self,tracker) -> List[Text]: 14 | return ["country","cost","bedrooms","bathrooms","months","property_type","email"] 15 | def slot_mappings(self) -> Dict[Text, Union[Dict, List[Dict]]]: 16 | return { 17 | "country": [ 18 | self.from_text(), 19 | ], 20 | "cost": [ 21 | self.from_text(), 22 | ], 23 | 24 | "bedrooms": [ 25 | self.from_text(), 26 | ], 27 | "bathrooms": [ 28 | self.from_text(), 29 | ], 30 | "months": [ 31 | self.from_text(), 32 | ], 33 | "property_type": [ 34 | self.from_text(), 35 | ], 36 | "email": [ 37 | self.from_text(), 38 | ], 39 | } 40 | def submit( 41 | self, 42 | dispatcher: CollectingDispatcher, 43 | tracker: Tracker, 44 | domain: Dict[Text, Any], 45 | ) -> List[Dict]: 46 | dispatcher.utter_template("utter_submit_buy", tracker) 47 | return [] 48 | 49 | class sellHomeForm(FormAction): 50 | def name(self): 51 | return "sell_form" 52 | 53 | def required_slots(self,tracker) -> List[Text]: 54 | return ["time_to_sell","address","city","zipcode","email","phone_number"] 55 | def slot_mappings(self) -> Dict[Text, Union[Dict, List[Dict]]]: 56 | return { 57 | "time_to_sell": [ 58 | self.from_text(), 59 | ], 60 | "address": [ 61 | self.from_text(), 62 | ], 63 | 64 | "city": [ 65 | self.from_text(), 66 | ], 67 | "zipcode": [ 68 | self.from_text(), 69 | ], 70 | "email": [ 71 | self.from_text(), 72 | ], 73 | "phone_number": [ 74 | self.from_text(), 75 | ], 76 | } 77 | def submit( 78 | self, 79 | dispatcher: CollectingDispatcher, 80 | tracker: Tracker, 81 | domain: Dict[Text, Any], 82 | ) -> List[Dict]: 83 | dispatcher.utter_template("utter_submit_buy", tracker) 84 | return [] -------------------------------------------------------------------------------- /03_real_estate_bot/src/config.yml: -------------------------------------------------------------------------------- 1 | # Configuration for Rasa NLU. 2 | # https://rasa.com/docs/rasa/nlu/components/ 3 | language: en 4 | pipeline: supervised_embeddings 5 | 6 | # Configuration for Rasa Core. 7 | # https://rasa.com/docs/rasa/core/policies/ 8 | policies: 9 | - name: FormPolicy 10 | - name: MemoizationPolicy 11 | - name: KerasPolicy 12 | - name: MappingPolicy -------------------------------------------------------------------------------- /03_real_estate_bot/src/data/nlu.md: -------------------------------------------------------------------------------- 1 | ## intent:greet 2 | - hey 3 | - hello 4 | - hi 5 | - good morning 6 | - good evening 7 | - hey there 8 | - Get Started 9 | 10 | ## intent:buy_a_home 11 | - Buy A Home 12 | - buy a home 13 | - buy home 14 | - Buy Home 15 | 16 | ## intent:sell_your_home 17 | - Sell Your Home 18 | - sell your home 19 | - SELL YOUR HOME 20 | - sell home 21 | - Sell Home 22 | 23 | ## intent:goodbye 24 | - bye 25 | - goodbye 26 | - see you around 27 | - see you later 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /03_real_estate_bot/src/data/stories.md: -------------------------------------------------------------------------------- 1 | ## happy path 2 | * greet 3 | - utter_greet 4 | 5 | ## buy_home 6 | * greet 7 | - utter_greet 8 | * buy_a_home 9 | - buy_form 10 | - form{"name":"buy_form"} 11 | - form{"name":"null"} 12 | 13 | ## sell_home 14 | * greet 15 | - utter_greet 16 | * sell_your_home 17 | - sell_form 18 | - form{"name":"sell_form"} 19 | - form{"name":"null"} 20 | 21 | 22 | ## buy_a_home 23 | * buy_a_home 24 | - buy_form 25 | - form{"name":"buy_form"} 26 | - form{"name":"null"} 27 | 28 | 29 | ## sell_your_home 30 | * sell_your_home 31 | - sell_form 32 | - form{"name":"sell_form"} 33 | - form{"name":"null"} 34 | 35 | -------------------------------------------------------------------------------- /03_real_estate_bot/src/domain.yml: -------------------------------------------------------------------------------- 1 | --- 2 | actions: 3 | - utter_greet 4 | - utter_goodbye 5 | forms: 6 | - buy_form 7 | - sell_form 8 | intents: 9 | - greet 10 | - goodbye 11 | - buy_a_home 12 | - sell_your_home 13 | slots: 14 | address: 15 | auto_fill: false 16 | type: unfeaturized 17 | bathrooms: 18 | auto_fill: false 19 | type: unfeaturized 20 | bedrooms: 21 | auto_fill: false 22 | type: unfeaturized 23 | city: 24 | auto_fill: false 25 | type: unfeaturized 26 | cost: 27 | auto_fill: false 28 | type: unfeaturized 29 | country: 30 | auto_fill: false 31 | type: unfeaturized 32 | email: 33 | auto_fill: false 34 | type: unfeaturized 35 | months: 36 | auto_fill: false 37 | type: unfeaturized 38 | phone_number: 39 | auto_fill: false 40 | type: unfeaturized 41 | property_type: 42 | auto_fill: false 43 | type: unfeaturized 44 | time_to_sell: 45 | auto_fill: false 46 | type: unfeaturized 47 | zipcode: 48 | auto_fill: false 49 | type: unfeaturized 50 | templates: 51 | utter_ask_address: 52 | - 53 | text: "Thanks for letting me know. Can I get the address for the property? For example 123 Main street." 54 | utter_ask_bathrooms: 55 | - 56 | text: "Cool. How many bathrooms are you looking for?" 57 | utter_ask_bedrooms: 58 | - 59 | text: "Ok. How many bedrooms are you looking for?" 60 | utter_ask_city: 61 | - 62 | text: "Ok. What city that in?" 63 | utter_ask_cost: 64 | - 65 | buttons: 66 | - 67 | payload: 10K 68 | title: 10K 69 | - 70 | payload: 20K 71 | title: 20K 72 | - 73 | payload: 30K 74 | title: 30K 75 | text: "Great! How much are you comfortable spending on your new home?" 76 | utter_ask_country: 77 | - 78 | text: "Oh Great! Which part of the country are you looking for?" 79 | utter_ask_email: 80 | - 81 | text: "What email address can we use to contact you back?" 82 | utter_ask_months: 83 | - 84 | buttons: 85 | - 86 | payload: "In 0 to 3 Months" 87 | title: "In 0 to 3 Months" 88 | - 89 | payload: "In 3 to 6 Months" 90 | title: "In 3 to 6 Months" 91 | - 92 | payload: "In 6 to 9 Months" 93 | title: "In 6 to 9 Mpnths" 94 | text: "When are you looking to buy?" 95 | utter_ask_phone_number: 96 | - 97 | text: "Please provide your best contact number, so one of our experts can contact you." 98 | utter_ask_property_type: 99 | - 100 | buttons: 101 | - 102 | payload: Condos 103 | title: Condos 104 | - 105 | payload: Attached 106 | title: Attached 107 | - 108 | payload: Dettached 109 | title: Dettached 110 | text: "What property type are you interested in?" 111 | utter_ask_time_to_sell: 112 | - 113 | buttons: 114 | - 115 | payload: ASAP 116 | title: ASAP 117 | - 118 | payload: "3-6 Months" 119 | title: "3-6 Months" 120 | - 121 | payload: "6+ Months" 122 | title: "6+ Months" 123 | text: "In order to provide you with valuation can you please let me know when you looking to sell your home?" 124 | utter_ask_zipcode: 125 | - 126 | text: "Almost finished! What is the zip code for the property?" 127 | utter_greet: 128 | - 129 | buttons: 130 | - 131 | payload: /buy_a_home 132 | title: "Buy A Home" 133 | - 134 | payload: /sell_your_home 135 | title: "Sell Your Home" 136 | text: |- 137 | Hello, 138 | Greetings ! Thanks for launching the Real-Estate Bot. How can I help you today? 139 | 140 | utter_submit_buy: 141 | - 142 | text: "Good. One of our agents will be in touch with you shortly." 143 | -------------------------------------------------------------------------------- /03_real_estate_bot/src/endpoints.yml: -------------------------------------------------------------------------------- 1 | action_endpoint: 2 | url: "http://localhost:5055/webhook" 3 | -------------------------------------------------------------------------------- /04_feedback_bot/README.md: -------------------------------------------------------------------------------- 1 | # Feedback Chatbot Template 2 | 3 | ### How to use it? 4 | Please follow the steps [as mentioned here](https://github.com/cedextech/Rasa-Chatbot-Templates/blob/master/README.md) 5 | 6 | ### Screenshots 7 | ![screenshot_1.png](screenshot_1.png)![screenshot_2.png](screenshot_2.png)![screenshot_3.png](screenshot_3.png)![screenshot_4.png](screenshot_4.png) 8 | -------------------------------------------------------------------------------- /04_feedback_bot/compressed.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cedextech/rasa-chatbot-templates/074aadfc06dcffd63575a54285cbceae8c326ac5/04_feedback_bot/compressed.zip -------------------------------------------------------------------------------- /04_feedback_bot/screenshot_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cedextech/rasa-chatbot-templates/074aadfc06dcffd63575a54285cbceae8c326ac5/04_feedback_bot/screenshot_1.png -------------------------------------------------------------------------------- /04_feedback_bot/screenshot_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cedextech/rasa-chatbot-templates/074aadfc06dcffd63575a54285cbceae8c326ac5/04_feedback_bot/screenshot_2.png -------------------------------------------------------------------------------- /04_feedback_bot/screenshot_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cedextech/rasa-chatbot-templates/074aadfc06dcffd63575a54285cbceae8c326ac5/04_feedback_bot/screenshot_3.png -------------------------------------------------------------------------------- /04_feedback_bot/screenshot_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cedextech/rasa-chatbot-templates/074aadfc06dcffd63575a54285cbceae8c326ac5/04_feedback_bot/screenshot_4.png -------------------------------------------------------------------------------- /04_feedback_bot/src/actions.py: -------------------------------------------------------------------------------- 1 | from typing import Dict, Text, Any, List, Union, Optional 2 | 3 | from rasa_sdk import Tracker 4 | from rasa_sdk.executor import CollectingDispatcher 5 | from rasa_sdk.forms import FormAction 6 | 7 | 8 | class FormGetRating(FormAction): 9 | """Example of a custom form action""" 10 | 11 | def name(self) -> Text: 12 | """Unique identifier of the form""" 13 | 14 | return "form_get_rating" 15 | 16 | @staticmethod 17 | def required_slots(tracker: Tracker) -> List[Text]: 18 | """A list of required slots that the form has to fill""" 19 | return ["rating"] 20 | 21 | def slot_mappings(self) -> Dict[Text, Union[Dict, List[Dict]]]: 22 | """A dictionary to map required slots to 23 | - an extracted entity 24 | - intent: value pairs 25 | - a whole message 26 | or a list of them, where a first match will be picked""" 27 | return { 28 | "rating": [ 29 | self.from_text(), 30 | ], 31 | } 32 | 33 | def submit( 34 | self, 35 | dispatcher: CollectingDispatcher, 36 | tracker: Tracker, 37 | domain: Dict[Text, Any], 38 | ) -> List[Dict]: 39 | """Define what the form has to do 40 | after all required slots are filled""" 41 | 42 | return [] 43 | 44 | class FormGetInfluence(FormAction): 45 | """Example of a custom form action""" 46 | 47 | def name(self) -> Text: 48 | """Unique identifier of the form""" 49 | 50 | return "form_get_influence" 51 | 52 | @staticmethod 53 | def required_slots(tracker: Tracker) -> List[Text]: 54 | """A list of required slots that the form has to fill""" 55 | 56 | # decide if the rating is low and ask for influence 57 | rating = int(tracker.get_slot("rating")) 58 | 59 | if rating < 3: 60 | return ["influence"] 61 | else: 62 | return [] 63 | 64 | def slot_mappings(self) -> Dict[Text, Union[Dict, List[Dict]]]: 65 | """A dictionary to map required slots to 66 | - an extracted entity 67 | - intent: value pairs 68 | - a whole message 69 | or a list of them, where a first match will be picked""" 70 | return { 71 | "influence": [ 72 | self.from_text(), 73 | ], 74 | } 75 | 76 | def submit( 77 | self, 78 | dispatcher: CollectingDispatcher, 79 | tracker: Tracker, 80 | domain: Dict[Text, Any], 81 | ) -> List[Dict]: 82 | """Define what the form has to do 83 | after all required slots are filled""" 84 | 85 | # decide if the rating is low and send according finish message 86 | rating = int(tracker.get_slot("rating")) 87 | 88 | if rating < 3: 89 | dispatcher.utter_template("utter_influence_done", tracker) 90 | else: 91 | dispatcher.utter_template("utter_awesome", tracker) 92 | 93 | return [] 94 | 95 | class FormGetSupportFeedback(FormAction): 96 | """Example of a custom form action""" 97 | 98 | def name(self) -> Text: 99 | """Unique identifier of the form""" 100 | 101 | return "form_get_support_feedback" 102 | 103 | @staticmethod 104 | def required_slots(tracker: Tracker) -> List[Text]: 105 | """A list of required slots that the form has to fill""" 106 | 107 | return ["support_feedback"] 108 | 109 | def slot_mappings(self) -> Dict[Text, Union[Dict, List[Dict]]]: 110 | """A dictionary to map required slots to 111 | - an extracted entity 112 | - intent: value pairs 113 | - a whole message 114 | or a list of them, where a first match will be picked""" 115 | return { 116 | "support_feedback": [ 117 | self.from_text(), 118 | ], 119 | } 120 | 121 | def submit( 122 | self, 123 | dispatcher: CollectingDispatcher, 124 | tracker: Tracker, 125 | domain: Dict[Text, Any], 126 | ) -> List[Dict]: 127 | """Define what the form has to do 128 | after all required slots are filled""" 129 | 130 | return [] 131 | 132 | class FormGetRatingQuick(FormAction): 133 | """Example of a custom form action""" 134 | 135 | def name(self) -> Text: 136 | """Unique identifier of the form""" 137 | 138 | return "form_get_rating_quick" 139 | 140 | @staticmethod 141 | def required_slots(tracker: Tracker) -> List[Text]: 142 | """A list of required slots that the form has to fill""" 143 | 144 | return ["rating_quick"] 145 | 146 | def slot_mappings(self) -> Dict[Text, Union[Dict, List[Dict]]]: 147 | """A dictionary to map required slots to 148 | - an extracted entity 149 | - intent: value pairs 150 | - a whole message 151 | or a list of them, where a first match will be picked""" 152 | return { 153 | "rating_quick": [ 154 | self.from_text(), 155 | ], 156 | } 157 | 158 | def submit( 159 | self, 160 | dispatcher: CollectingDispatcher, 161 | tracker: Tracker, 162 | domain: Dict[Text, Any], 163 | ) -> List[Dict]: 164 | """Define what the form has to do 165 | after all required slots are filled""" 166 | 167 | return [] -------------------------------------------------------------------------------- /04_feedback_bot/src/config.yml: -------------------------------------------------------------------------------- 1 | # Configuration for Rasa NLU. 2 | # https://rasa.com/docs/rasa/nlu/components/ 3 | language: en 4 | pipeline: supervised_embeddings 5 | 6 | # Configuration for Rasa Core. 7 | # https://rasa.com/docs/rasa/core/policies/ 8 | policies: 9 | - name: FormPolicy 10 | - name: MemoizationPolicy 11 | - name: KerasPolicy 12 | - name: MappingPolicy 13 | -------------------------------------------------------------------------------- /04_feedback_bot/src/data/nlu.md: -------------------------------------------------------------------------------- 1 | ## intent:greet 2 | - hey 3 | - hello 4 | - hi 5 | - good morning 6 | - good evening 7 | - hey there 8 | 9 | ## intent:long_feedback 10 | - long feedback 11 | - start feedback 12 | - give feedback 13 | - begin feedback 14 | -------------------------------------------------------------------------------- /04_feedback_bot/src/data/stories.md: -------------------------------------------------------------------------------- 1 | ## long feedback 2 | * greet 3 | - utter_greet 4 | - utter_menu 5 | * long_feedback 6 | - utter_thanks 7 | - form_get_rating 8 | - form{"name": "form_get_rating"} 9 | - form{"name": null} 10 | - form_get_influence 11 | - form{"name": "form_get_influence"} 12 | - form{"name": null} 13 | - form_get_support_feedback 14 | - form{"name": "form_get_support_feedback"} 15 | - form{"name": null} 16 | - utter_pre_finish 17 | - utter_finish 18 | 19 | ## short feedback 20 | * greet 21 | - utter_greet 22 | - utter_menu 23 | * short_feedback 24 | - form_get_rating_quick 25 | - form{"name": "form_get_rating_quick"} 26 | - form{"name": null} 27 | - utter_pre_finish 28 | - utter_finish -------------------------------------------------------------------------------- /04_feedback_bot/src/domain.yml: -------------------------------------------------------------------------------- 1 | intents: 2 | - greet 3 | - long_feedback 4 | - short_feedback 5 | 6 | slots: 7 | rating: 8 | type: unfeaturized 9 | auto_fill: false 10 | rating_quick: 11 | type: unfeaturized 12 | auto_fill: false 13 | influence: 14 | type: unfeaturized 15 | auto_fill: false 16 | support_feedback: 17 | type: unfeaturized 18 | auto_fill: false 19 | 20 | actions: 21 | - utter_greet 22 | - utter_menu 23 | - utter_thanks 24 | - utter_sorry 25 | - utter_awesome 26 | - utter_influence_done 27 | - utter_pre_finish 28 | - utter_finish 29 | 30 | forms: 31 | - form_get_rating 32 | - form_get_rating_quick 33 | - form_get_influence 34 | - form_get_support_feedback 35 | 36 | templates: 37 | utter_greet: 38 | - text: "Hi, my name is feedby. I’m here to collect feedback on your latest experience with our service." 39 | utter_menu: 40 | - text: "Would like to spend a moment with me?" 41 | buttons: 42 | - title: "okay" 43 | payload: "/long_feedback" 44 | - title: "not now" 45 | payload: "/short_feedback" 46 | utter_ask_rating: 47 | - text: "How was your experience with us?" 48 | buttons: 49 | - title: "1️⃣" 50 | payload: "1" 51 | - title: "2️⃣" 52 | payload: "2" 53 | - title: "3️⃣" 54 | payload: "3" 55 | - title: "4️⃣" 56 | payload: "4" 57 | - title: "5️⃣" 58 | payload: "5" 59 | - title: "👏👏👏😍" 60 | payload: "6" 61 | utter_thanks: 62 | - text: "Thanks" 63 | utter_sorry: 64 | - text: "Sorry to hear this" 65 | utter_awesome: 66 | - text: "Awesome!" 67 | utter_ask_influence: 68 | - text: "Sorry to hear this. \n\nCan you help me understand what influenced your rating?" 69 | utter_influence_done: 70 | - text: "Thanks for bringing this issue to our attention." 71 | utter_ask_support_feedback: 72 | - text: "Do you have any other feedback to share about our 24/7 support desk?" 73 | utter_ask_rating_quick: 74 | - text: "I understand. Can we do this real quick? Just choose the rating you would like to give, and we say goodbye." 75 | buttons: 76 | - title: "1️⃣" 77 | payload: "1" 78 | - title: "2️⃣" 79 | payload: "2" 80 | - title: "3️⃣" 81 | payload: "3" 82 | - title: "4️⃣" 83 | payload: "4" 84 | - title: "5️⃣" 85 | payload: "5" 86 | - title: "👏👏👏😍" 87 | payload: "6" 88 | utter_pre_finish: 89 | - text: "Thank you for your time with us." 90 | utter_finish: 91 | - text: "I’m sharing the information on your behalf with our team. Have a nice day!" -------------------------------------------------------------------------------- /04_feedback_bot/src/endpoints.yml: -------------------------------------------------------------------------------- 1 | # This file contains the different endpoints your bot can use. 2 | 3 | # Server where the models are pulled from. 4 | # https://rasa.com/docs/rasa/user-guide/running-the-server/#fetching-models-from-a-server/ 5 | 6 | #models: 7 | # url: http://my-server.com/models/default_core@latest 8 | # wait_time_between_pulls: 10 # [optional](default: 100) 9 | 10 | # Server which runs your custom actions. 11 | # https://rasa.com/docs/rasa/core/actions/#custom-actions/ 12 | 13 | action_endpoint: 14 | url: "http://localhost:5055/webhook" 15 | 16 | # Tracker store which is used to store the conversations. 17 | # By default the conversations are stored in memory. 18 | # https://rasa.com/docs/rasa/api/tracker-stores/ 19 | 20 | #tracker_store: 21 | # type: redis 22 | # url: 23 | # port: 24 | # db: 25 | # password: 26 | 27 | #tracker_store: 28 | # type: mongod 29 | # url: 30 | # db: 31 | # username: 32 | # password: 33 | 34 | # Event broker which all conversation events should be streamed to. 35 | # https://rasa.com/docs/rasa/api/event-brokers/ 36 | 37 | #event_broker: 38 | # url: localhost 39 | # username: username 40 | # password: password 41 | # queue: queue 42 | -------------------------------------------------------------------------------- /05_event_bot/README.md: -------------------------------------------------------------------------------- 1 | # Event Chatbot Template 2 | 3 | ### How to use it? 4 | Please follow the steps [as mentioned here](https://github.com/cedextech/Rasa-Chatbot-Templates/blob/master/README.md) 5 | 6 | ### Screenshots 7 | ![screenshot_1.png](screenshot_1.png)![screenshot_2.png](screenshot_2.png)![screenshot_3.png](screenshot_3.png)![screenshot_4.png](screenshot_4.png) 8 | -------------------------------------------------------------------------------- /05_event_bot/compressed.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cedextech/rasa-chatbot-templates/074aadfc06dcffd63575a54285cbceae8c326ac5/05_event_bot/compressed.zip -------------------------------------------------------------------------------- /05_event_bot/screenshot_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cedextech/rasa-chatbot-templates/074aadfc06dcffd63575a54285cbceae8c326ac5/05_event_bot/screenshot_1.png -------------------------------------------------------------------------------- /05_event_bot/screenshot_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cedextech/rasa-chatbot-templates/074aadfc06dcffd63575a54285cbceae8c326ac5/05_event_bot/screenshot_2.png -------------------------------------------------------------------------------- /05_event_bot/screenshot_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cedextech/rasa-chatbot-templates/074aadfc06dcffd63575a54285cbceae8c326ac5/05_event_bot/screenshot_3.png -------------------------------------------------------------------------------- /05_event_bot/screenshot_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cedextech/rasa-chatbot-templates/074aadfc06dcffd63575a54285cbceae8c326ac5/05_event_bot/screenshot_4.png -------------------------------------------------------------------------------- /05_event_bot/src/config.yml: -------------------------------------------------------------------------------- 1 | # Configuration for Rasa NLU. 2 | # https://rasa.com/docs/rasa/nlu/components/ 3 | language: en 4 | pipeline: supervised_embeddings 5 | 6 | # Configuration for Rasa Core. 7 | # https://rasa.com/docs/rasa/core/policies/ 8 | policies: 9 | - name: MemoizationPolicy 10 | - name: KerasPolicy 11 | - name: MappingPolicy 12 | 13 | -------------------------------------------------------------------------------- /05_event_bot/src/data/nlu.md: -------------------------------------------------------------------------------- 1 | ## intent:greet 2 | - hey 3 | - hello 4 | - hi 5 | - good morning 6 | - good evening 7 | - hey there 8 | 9 | ## intent:goodbye 10 | - bye 11 | - goodbye 12 | - see you around 13 | - see you later 14 | 15 | ## intent:venues_confrence 16 | - venues 17 | - Venues 18 | - VENUES 19 | 20 | ## intent:batman_room_confrence 21 | - View Session 22 | - batman room 23 | - Batman Room 24 | 25 | ## intent:view_information 26 | - view info 27 | - View Information 28 | - View Info 29 | - view information 30 | 31 | ## intent:subsctibition_to_update 32 | - Subscribe to update 33 | - subsribe to update 34 | - SUBCRIBE TO UPDATE 35 | 36 | ## intent:superman_room_confrence 37 | - View Session 38 | - Superman Room 39 | - superman room 40 | 41 | ## intent:hero_room_confrence 42 | - View Session 43 | - Hero Room 44 | - hero room 45 | 46 | ## intent:speakers_confrence 47 | - Speakers 48 | - speakers 49 | - SPEAKERS 50 | - Speakeres 51 | - Speakers 52 | 53 | ## intent:view_session_speaker1 54 | - View Session 55 | - view session 56 | - View session 57 | - VIEW SESSION 58 | - Andrew King 59 | 60 | ## intent:view_session_speaker2 61 | - View Session 62 | - view session 63 | - View session 64 | - VIEW SESSION 65 | - Daniel Evanas 66 | 67 | ## intent:session_speaker3 68 | - Show More 69 | - show more 70 | - Rose Stone 71 | - rose stone 72 | 73 | ## intent:session_rosestone 74 | - View Session 75 | - Session Of Rose Stone 76 | - rose stone session 77 | 78 | ## intent:session_freyabruke 79 | - View Session 80 | - Session Of Freya Bruke 81 | - freya bruke session 82 | 83 | ## intent:session_confrence 84 | - Session 85 | - session 86 | - SESSION 87 | - Show Session 88 | 89 | ## intent:session_one_speaker_details 90 | - View Speakers 91 | - view speakers 92 | - session speakers 93 | - session chatbot with dialogflow 94 | 95 | ## intent:session_two_speaker 96 | - View Speakers 97 | - view speaker 98 | - session chatbot in 2018 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | -------------------------------------------------------------------------------- /05_event_bot/src/data/stories.md: -------------------------------------------------------------------------------- 1 | ## happy path 2 | * greet 3 | - utter_greet 4 | - utter_welcome_message 5 | 6 | ## venues_batmanroom1 7 | * greet 8 | - utter_greet 9 | - utter_welcome_message 10 | * venues_confrence 11 | - action_venu_confrence_details 12 | * batman_room_confrence 13 | - action_batman_rooom_details 14 | * view_information 15 | - utter_view_information 16 | 17 | ## venues_batmanroom2 18 | * greet 19 | - utter_greet 20 | - utter_welcome_message 21 | * venues_confrence 22 | - action_venu_confrence_details 23 | * batman_room_confrence 24 | - action_batman_rooom_details 25 | * subsctibition_to_update 26 | - utter_subscribe_message 27 | * view_information 28 | - utter_view_information 29 | 30 | 31 | ## venues_supermanroom1 32 | * greet 33 | - utter_greet 34 | - utter_welcome_message 35 | * venues_confrence 36 | - action_venu_confrence_details 37 | * superman_room_confrence 38 | - action_superman_rooom_details 39 | * view_information 40 | - utter_view_information 41 | 42 | ## venues_supermanroom2 43 | * greet 44 | - utter_greet 45 | - utter_welcome_message 46 | * venues_confrence 47 | - action_venu_confrence_details 48 | * superman_room_confrence 49 | - action_superman_rooom_details 50 | * subsctibition_to_update 51 | - utter_subscribe_message 52 | * view_information 53 | - utter_view_information 54 | 55 | 56 | ## venues_heroroom1 57 | * greet 58 | - utter_greet 59 | - utter_welcome_message 60 | * venues_confrence 61 | - action_venu_confrence_details 62 | * hero_room_confrence 63 | - action_hero_rooom_details 64 | * view_information 65 | - utter_view_information 66 | 67 | ## venues_heroroom2 68 | * greet 69 | - utter_greet 70 | - utter_welcome_message 71 | * venues_confrence 72 | - action_venu_confrence_details 73 | * hero_room_confrence 74 | - action_hero_rooom_details 75 | * subsctibition_to_update 76 | - utter_subscribe_message 77 | * view_information 78 | - utter_view_information 79 | 80 | ## speaker_andrewking01 81 | * greet 82 | - utter_greet 83 | - utter_welcome_message 84 | * speakers_confrence 85 | - action_speaker_confrence_details 86 | * view_session_speaker1 87 | - action_speakerone_details 88 | * view_information 89 | - utter_view_information 90 | 91 | ## speaker_andrewking02 92 | * greet 93 | - utter_greet 94 | - utter_welcome_message 95 | * speakers_confrence 96 | - action_speaker_confrence_details 97 | * view_session_speaker1 98 | - action_speakerone_details 99 | * subsctibition_to_update 100 | - utter_subscribe_message 101 | * view_information 102 | - utter_view_information 103 | 104 | ## speaker_daniel01 105 | * greet 106 | - utter_greet 107 | - utter_welcome_message 108 | * speakers_confrence 109 | - action_speaker_confrence_details 110 | * view_session_speaker2 111 | - action_speakertwo_details 112 | * view_information 113 | - utter_view_information 114 | 115 | ## speaker_daniel02 116 | * greet 117 | - utter_greet 118 | - utter_welcome_message 119 | * speakers_confrence 120 | - action_speaker_confrence_details 121 | * view_session_speaker2 122 | - action_speakertwo_details 123 | * subsctibition_to_update 124 | - utter_subscribe_message 125 | * view_information 126 | - utter_view_information 127 | 128 | ## speaker_rose01 129 | * greet 130 | - utter_greet 131 | - utter_welcome_message 132 | * speakers_confrence 133 | - action_speaker_confrence_details 134 | * session_speaker3 135 | - action_speaker_confrence_more_details 136 | * session_rosestone 137 | - action_speaker_rosestone_details 138 | * view_information 139 | - utter_view_information 140 | 141 | ## speaker_rose02 142 | * greet 143 | - utter_greet 144 | - utter_welcome_message 145 | * speakers_confrence 146 | - action_speaker_confrence_details 147 | * session_speaker3 148 | - action_speaker_confrence_more_details 149 | * session_rosestone 150 | - action_speaker_rosestone_details 151 | * subsctibition_to_update 152 | - utter_subscribe_message 153 | * view_information 154 | - utter_view_information 155 | 156 | ## speaker_frey01 157 | * greet 158 | - utter_greet 159 | - utter_welcome_message 160 | * speakers_confrence 161 | - action_speaker_confrence_details 162 | * session_speaker3 163 | - action_speaker_confrence_more_details 164 | * session_freyabruke 165 | - action_speaker_freya_details 166 | * view_information 167 | - utter_view_information 168 | 169 | ## speaker_frey02 170 | * greet 171 | - utter_greet 172 | - utter_welcome_message 173 | * speakers_confrence 174 | - action_speaker_confrence_details 175 | * session_speaker3 176 | - action_speaker_confrence_more_details 177 | * session_freyabruke 178 | - action_speaker_freya_details 179 | * subsctibition_to_update 180 | - utter_subscribe_message 181 | * view_information 182 | - utter_view_information 183 | 184 | 185 | ## session_one_details01 186 | * greet 187 | - utter_greet 188 | - utter_welcome_message 189 | * session_confrence 190 | - action_session_confrence_details 191 | * session_one_speaker_details 192 | - action_session_speaker_confrence_details 193 | * view_information 194 | - utter_view_information 195 | 196 | ## session_one_details02 197 | * greet 198 | - utter_greet 199 | - utter_welcome_message 200 | * session_confrence 201 | - action_session_confrence_details 202 | * session_one_speaker_details 203 | - action_session_speaker_confrence_details 204 | * subsctibition_to_update 205 | - utter_subscribe_message 206 | * view_information 207 | - utter_view_information 208 | 209 | ## session_two_details01 210 | * greet 211 | - utter_greet 212 | - utter_welcome_message 213 | * session_confrence 214 | - action_session_confrence_details 215 | * session_two_speaker 216 | - action_session_two_speaker_confrence_details 217 | * view_information 218 | - utter_view_information 219 | 220 | ## session_two_details02 221 | * greet 222 | - utter_greet 223 | - utter_welcome_message 224 | * session_confrence 225 | - action_session_confrence_details 226 | * session_two_speaker 227 | - action_session_two_speaker_confrence_details 228 | * subsctibition_to_update 229 | - utter_subscribe_message 230 | * view_information 231 | - utter_view_information 232 | 233 | ## session_three_details02 234 | * greet 235 | - utter_greet 236 | - utter_welcome_message 237 | * session_confrence 238 | - action_session_confrence_details 239 | * session_speaker3 240 | - action_session_more_confrence_details 241 | * session_one_speaker_details 242 | - action_session_two_speaker_confrence_details 243 | * view_information 244 | - utter_view_information 245 | 246 | ## session_three_details01 247 | * greet 248 | - utter_greet 249 | - utter_welcome_message 250 | * session_confrence 251 | - action_session_confrence_details 252 | * session_speaker3 253 | - action_session_more_confrence_details 254 | * session_one_speaker_details 255 | - action_session_two_speaker_confrence_details 256 | * subsctibition_to_update 257 | - utter_subscribe_message 258 | * view_information 259 | - utter_view_information 260 | 261 | 262 | -------------------------------------------------------------------------------- /05_event_bot/src/domain.yml: -------------------------------------------------------------------------------- 1 | --- 2 | actions: 3 | - utter_greet 4 | - utter_welcome_message 5 | - action_venu_confrence_details 6 | - action_batman_rooom_details 7 | - utter_subscribe_message 8 | - action_superman_rooom_details 9 | - action_hero_rooom_details 10 | - action_speaker_confrence_details 11 | - action_speakerone_details 12 | - action_speakertwo_details 13 | - action_speaker_confrence_more_details 14 | - action_speaker_rosestone_details 15 | - action_speaker_freya_details 16 | - action_session_confrence_details 17 | - action_session_speaker_confrence_details 18 | - action_session_two_speaker_confrence_details 19 | - action_session_more_confrence_details 20 | - utter_view_information 21 | intents: 22 | - greet 23 | - venues_confrence 24 | - batman_room_confrence 25 | - subsctibition_to_update 26 | - view_information 27 | - superman_room_confrence 28 | - hero_room_confrence 29 | - speakers_confrence 30 | - view_session_speaker1 31 | - view_session_speaker2 32 | - session_speaker3 33 | - session_rosestone 34 | - session_freyabruke 35 | - session_confrence 36 | - session_one_speaker_details 37 | - session_two_speaker 38 | templates: 39 | utter_greet: 40 | - 41 | text: "Hi Guest, welcome to the Chatbot Summit Confrence☺️" 42 | utter_subscribe_message: 43 | - 44 | buttons: 45 | - 46 | payload: /view_information 47 | title: "View Information" 48 | text: "Thanks! You'll be notified by message when there are updates about Chatbot Summit Confrence." 49 | utter_view_information: 50 | - 51 | text: "Chatbot Summit is the world's leading international event series connecting the eminent professionals and organisations who believe that Conversational A.I. will be the next curve in customer experiences." 52 | utter_welcome_message: 53 | - 54 | buttons: 55 | - 56 | payload: /venues_confrence 57 | title: Venues 58 | - 59 | payload: /speakers_confrence 60 | title: Speakers 61 | - 62 | payload: /session_confrence 63 | title: Session 64 | text: "What do you want to know about Chatbot Summit Confrence☺️" 65 | -------------------------------------------------------------------------------- /05_event_bot/src/endpoints.yml: -------------------------------------------------------------------------------- 1 | # This file contains the different endpoints your bot can use. 2 | 3 | # Server where the models are pulled from. 4 | # https://rasa.com/docs/rasa/user-guide/running-the-server/#fetching-models-from-a-server/ 5 | 6 | #models: 7 | # url: http://my-server.com/models/default_core@latest 8 | # wait_time_between_pulls: 10 # [optional](default: 100) 9 | 10 | # Server which runs your custom actions. 11 | # https://rasa.com/docs/rasa/core/actions/#custom-actions/ 12 | action_endpoint: 13 | url: "http://localhost:5055/webhook" 14 | 15 | #action_endpoint: 16 | # url: "http://localhost:5055/webhook" 17 | 18 | # Tracker store which is used to store the conversations. 19 | # By default the conversations are stored in memory. 20 | # https://rasa.com/docs/rasa/api/tracker-stores/ 21 | 22 | #tracker_store: 23 | # type: redis 24 | # url: 25 | # port: 26 | # db: 27 | # password: 28 | # use_ssl: 29 | 30 | #tracker_store: 31 | # type: mongod 32 | # url: 33 | # db: 34 | # username: 35 | # password: 36 | 37 | # Event broker which all conversation events should be streamed to. 38 | # https://rasa.com/docs/rasa/api/event-brokers/ 39 | 40 | #event_broker: 41 | # url: localhost 42 | # username: username 43 | # password: password 44 | # queue: queue 45 | -------------------------------------------------------------------------------- /06_hotel_bot/README.md: -------------------------------------------------------------------------------- 1 | # Hotel Chatbot Template 2 | 3 | ### How to use it? 4 | Please follow the steps [as mentioned here](https://github.com/cedextech/Rasa-Chatbot-Templates/blob/master/README.md) 5 | 6 | ### Screenshots 7 | ![screenshot01.png](screenshot01.png)![screenshot02.png](screenshot02.png)![screenshot03.png](screenshot03.png)![screenshot04.png](screenshot04.png)![screenshot05.png](screenshot05.png) 8 | -------------------------------------------------------------------------------- /06_hotel_bot/compressed.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cedextech/rasa-chatbot-templates/074aadfc06dcffd63575a54285cbceae8c326ac5/06_hotel_bot/compressed.zip -------------------------------------------------------------------------------- /06_hotel_bot/screenshot01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cedextech/rasa-chatbot-templates/074aadfc06dcffd63575a54285cbceae8c326ac5/06_hotel_bot/screenshot01.png -------------------------------------------------------------------------------- /06_hotel_bot/screenshot02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cedextech/rasa-chatbot-templates/074aadfc06dcffd63575a54285cbceae8c326ac5/06_hotel_bot/screenshot02.png -------------------------------------------------------------------------------- /06_hotel_bot/screenshot03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cedextech/rasa-chatbot-templates/074aadfc06dcffd63575a54285cbceae8c326ac5/06_hotel_bot/screenshot03.png -------------------------------------------------------------------------------- /06_hotel_bot/screenshot04.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cedextech/rasa-chatbot-templates/074aadfc06dcffd63575a54285cbceae8c326ac5/06_hotel_bot/screenshot04.png -------------------------------------------------------------------------------- /06_hotel_bot/screenshot05.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cedextech/rasa-chatbot-templates/074aadfc06dcffd63575a54285cbceae8c326ac5/06_hotel_bot/screenshot05.png -------------------------------------------------------------------------------- /06_hotel_bot/src/actions.py: -------------------------------------------------------------------------------- 1 | 2 | from typing import Dict, Text, Any, List, Union, Optional 3 | 4 | from rasa_sdk import Tracker 5 | from rasa_sdk.executor import CollectingDispatcher 6 | 7 | from rasa_sdk import Action 8 | from rasa_sdk.forms import FormAction 9 | 10 | 11 | 12 | class NearestAttraction(Action): 13 | def name(self): 14 | """name of the custom action""" 15 | return "action_nearest_attractions" 16 | 17 | def run(self,dispatcher,tracker,domain): 18 | gt = { 19 | "attachment": { 20 | "type": "template", 21 | "payload": { 22 | "template_type": "generic", 23 | "elements": [ 24 | { 25 | "title": "Marine Drive", 26 | "image_url":"https://www.trawell.in/admin/images/upload/486072642MarineDrive_Main.jpg", 27 | "subtitle": "Marine Drive is a buzzing waterfront district known for the Marine Walkway, popular for evening strolls,..", 28 | "buttons": [ 29 | { 30 | "type": "postback", 31 | "payload": "/marine_drive", 32 | "title": "Read More" 33 | }, 34 | { 35 | "type": "web_url", 36 | "url": "https://www.google.com/maps/d/viewer?ie=UTF8&source=embed&oe=UTF8&msa=0&mid=1TQ2nVI6cF8LtWZxKIdXSkIJs5JI&ll=49.21193400000003%2C-123.10863&z=17", 37 | "title": "Location" 38 | }, 39 | ] 40 | }, 41 | { 42 | "title": "Mattancherry", 43 | "image_url":"https://th.thgim.com/migration_catalog/article11297834.ece/alternates/FREE_660/MATTANCHERRY_PALACE", 44 | "subtitle": "Historic Mattancherry is known for 16th-century Mattancherry Palace, built by the Portuguese in traditional Keralan style", 45 | "buttons": [ 46 | { 47 | "type": "postback", 48 | "payload": "/mattancherry", 49 | "title": "Read More" 50 | }, 51 | { 52 | "type": "web_url", 53 | "url": "https://www.google.com/maps/place/Mattancherry,+Kochi,+Kerala/@9.9601158,76.2455098,15z/data=!3m1!4b1!4m5!3m4!1s0x3b086d4f2efb0045:0xbfbce1be3e2c1399!8m2!3d9.9578326!4d76.2555324", 54 | "title": "Location" 55 | }, 56 | ] 57 | }, 58 | { 59 | "title": "Fort Kochi", 60 | "image_url":"https://monicasuricom.files.wordpress.com/2017/02/shutterstock_104171108.jpg", 61 | "subtitle": "A charming seaside area, Fort Kochi is known for its Dutch, Portuguese, and British colonial architecture", 62 | "buttons": [ 63 | { 64 | "type": "postback", 65 | "payload": "/fort_kochi", 66 | "title": "Read More" 67 | }, 68 | { 69 | "type": "web_url", 70 | "url": "https://www.google.com/maps/place/Fort+Kochi,+Kochi,+Kerala/@9.9624501,76.2337644,16z/data=!4m5!3m4!1s0x3b086d314f0b178d:0xc545233f390db43b!8m2!3d9.9657787!4d76.2421147", 71 | "title": "Location" 72 | }, 73 | ] 74 | }, 75 | 76 | ] 77 | } 78 | } 79 | } 80 | dispatcher.utter_custom_json(gt) 81 | return [] 82 | class BookRooms(Action): 83 | def name(self): 84 | """name of the custom action""" 85 | return "action_book_rooms" 86 | 87 | def run(self,dispatcher,tracker,domain): 88 | gt = { 89 | "attachment": { 90 | "type": "template", 91 | "payload": { 92 | "template_type": "generic", 93 | "elements": [ 94 | { 95 | "title": "Deluxe Room", 96 | "image_url":"https://d2e5ushqwiltxm.cloudfront.net/wp-content/uploads/sites/125/2017/05/25023446/Rooms-Suites-Section-2nd-Room-Deluxe-Room.jpg", 97 | "subtitle": "These Deluxe Rooms let you relax as you admire a beautiful view of the pool. Stay connected as you enjoy our free WiFi and watch movies with our 32-inch LCD TV and DVD player.", 98 | "buttons": [ 99 | { 100 | "type": "postback", 101 | "payload": "/dulex_room_details", 102 | "title": "Read More" 103 | }, 104 | { 105 | "type": "postback", 106 | "payload": "/book_room_now", 107 | "title": "Book Now" 108 | }, 109 | ] 110 | }, 111 | { 112 | "title": "Junior Suite", 113 | "image_url":"https://www.discoverysuites.com/files/2015/06/Junior-Suite-Deluxe.jpg", 114 | "subtitle": "Large bedroom with exquisitely embroidered queen or king size bed. Elegant, luxury decor with rich fabrics. Separate sitting room with sofa and armchairs.", 115 | "buttons": [ 116 | { 117 | "type": "postback", 118 | "payload": "/junior_suite_details", 119 | "title": "Read More" 120 | }, 121 | { 122 | "type": "postback", 123 | "payload": "/book_room_now", 124 | "title": "Book Now" 125 | }, 126 | ] 127 | }, 128 | { 129 | "title": "Club Suite", 130 | "image_url":"https://media-cdn.tripadvisor.com/media/photo-s/12/77/d8/18/club-suite-living-room.jpg", 131 | "subtitle": "The Club Suite is the ideal choice for a comfortable and lavish stay for both small families and business travelers alike. The gently soothing views and the calming ambiance of the suite add to an enriching experience for our guests.", 132 | "buttons": [ 133 | { 134 | "type": "postback", 135 | "payload": "/club_suite_details", 136 | "title": "Read More" 137 | }, 138 | { 139 | "type": "postback", 140 | "payload": "/book_room_now", 141 | "title": "Book Now" 142 | }, 143 | ] 144 | }, 145 | 146 | ] 147 | } 148 | } 149 | } 150 | dispatcher.utter_custom_json(gt) 151 | return [] 152 | 153 | class BookRoomForm(FormAction): 154 | def name(self): 155 | return "book_room_form" 156 | 157 | def required_slots(self,tracker) -> List[Text]: 158 | return ["check_in","check_out","adults","child","room","name","phno","email"] 159 | def slot_mappings(self) -> Dict[Text, Union[Dict, List[Dict]]]: 160 | return { 161 | "check_in": [ 162 | self.from_text(), 163 | ], 164 | "check_out": [ 165 | self.from_text(), 166 | ], 167 | 168 | "adults": [ 169 | self.from_text(), 170 | ], 171 | "child": [ 172 | self.from_text(), 173 | ], 174 | "room": [ 175 | self.from_text(), 176 | ], 177 | "name": [ 178 | self.from_text(), 179 | ], 180 | "phno": [ 181 | self.from_text(), 182 | ], 183 | "email": [ 184 | self.from_text(), 185 | ], 186 | } 187 | def submit( 188 | self, 189 | dispatcher: CollectingDispatcher, 190 | tracker: Tracker, 191 | domain: Dict[Text, Any], 192 | ) -> List[Dict]: 193 | dispatcher.utter_message("Your booking details are here") 194 | return [] 195 | class BookRoomsDetails(Action): 196 | def name(self): 197 | """name of the custom action""" 198 | return "action_book_rooms_details" 199 | 200 | def run(self,dispatcher,tracker,domain): 201 | check_in=tracker.get_slot("check_in") 202 | check_out=tracker.get_slot("check_out") 203 | adults=tracker.get_slot("adults") 204 | child=tracker.get_slot("child") 205 | room=tracker.get_slot("room") 206 | name=tracker.get_slot("name") 207 | phno=tracker.get_slot("phno") 208 | email=tracker.get_slot("email") 209 | message="BOOKING DETAILS:"+"\n\n"+"Checkin Date:"+check_in+"\n"+"Checkout Date:"+check_out+"\n"+"No. of Adults:"+adults+"\n"+"No. of Children:"+child+"\n"+"No.of Rooms:"+room+"\n"+"Phone Number:"+phno+"\n"+"Email:"+email 210 | dispatcher.utter_message(message) -------------------------------------------------------------------------------- /06_hotel_bot/src/config.yml: -------------------------------------------------------------------------------- 1 | # Configuration for Rasa NLU. 2 | # https://rasa.com/docs/rasa/nlu/components/ 3 | language: en 4 | pipeline: supervised_embeddings 5 | 6 | # Configuration for Rasa Core. 7 | # https://rasa.com/docs/rasa/core/policies/ 8 | policies: 9 | - name: MemoizationPolicy 10 | - name: KerasPolicy 11 | - name: MappingPolicy 12 | - name: FormPolicy 13 | -------------------------------------------------------------------------------- /06_hotel_bot/src/data/nlu.md: -------------------------------------------------------------------------------- 1 | ## intent:greet 2 | - hey 3 | - hello 4 | - hi 5 | - good morning 6 | - good evening 7 | - hey there 8 | 9 | ## intent:nearest_attraction 10 | - nearest attraction 11 | - nearest attractions 12 | - Nearest Attraction 13 | - Nearest Attractions 14 | - NEAREST ATTRACTION 15 | - NEAREST ATTRACTIONS 16 | 17 | ## intent:marine_drive 18 | - Read More 19 | - marine Drive 20 | - Marine Drive 21 | 22 | ## intent:mattancherry 23 | - Read More 24 | - mattancherry 25 | - Mattancherry 26 | 27 | ## intent:fort_kochi 28 | - Read More 29 | - Fort kochi 30 | - fort kochi 31 | 32 | ## intent:book_rooms 33 | - book rooms 34 | - Book Rooms 35 | - book room 36 | - Book Room 37 | 38 | ## intent:dulex_room_details 39 | - Read More 40 | - Dulex Room 41 | - dulex room 42 | 43 | ## intent:junior_suite_details 44 | - Read More 45 | - Junior Suite 46 | - junior suite 47 | 48 | ## intent:club_suite_details 49 | - Read More 50 | - Club Suite 51 | - club suite 52 | 53 | ## intent:book_room_now 54 | - Book Now 55 | - BOOK NOW 56 | - book now 57 | 58 | ## intent:faqbreakfast 59 | - breakfast menu 60 | - can I see your breakfast menu 61 | - please show me the breakfast menu 62 | - show me your breakfast menu 63 | - Breakfast Menu 64 | 65 | ## intent:faqcancellationpolicy 66 | - what is the cancellation policy? 67 | - cancel policy 68 | - what should I do for cancelling the reservation? 69 | - what is the cancellation process 70 | - cancellation policy? 71 | 72 | ## intent:faqcheckin 73 | - What is the check-in time of a hotel? 74 | - What are the standard check-in? 75 | - At what time can I check-in? 76 | - what is the checkin time? 77 | - what is the check-in time? 78 | - Check-in time? 79 | 80 | ## intent:faqcheckinage 81 | - what is the minimum age required to check in? 82 | - check in age 83 | - age for check in 84 | - at what age do you allow me to check in 85 | - minimum age required to check in? 86 | 87 | ## intent:faqcheckout 88 | - what is the check-out time? 89 | - what is the checkout time? 90 | - What is the check-out time of a hotel? 91 | - checkout time? 92 | 93 | ## intent:faqchildrenage 94 | - what is the maximum age for the children to stay for free? 95 | - is it possible for my children to stay for free? 96 | - can children stay for free 97 | - Do children stay for free? 98 | 99 | ## intent:faqearlycheckin 100 | - is it possible for early check in 101 | - will you allow for the early check in? 102 | - early check in 103 | 104 | ## intent:faqlatecheckin 105 | - is it possible for late check in? 106 | - late check-in 107 | - will you allow for the late check in? 108 | 109 | ## intent:faqlatecheckout 110 | - Can I request a late check out? 111 | - is it possible for late check out 112 | - will you allow for the late check out? 113 | - late check out 114 | 115 | ## intent:faqroomcount 116 | - is there a limit for the number of rooms a person can book 117 | - number of rooms a person can reserve 118 | - no.of rooms a person can book 119 | 120 | ## intent:faqbabycot 121 | - what about baby cots 122 | - Do you provide a baby cot? 123 | - will you arrange a bay cot for my baby? 124 | - is there a baby cot in the room 125 | - baby cots provided? 126 | - baby cots 127 | - Are baby cots available at all of your hotels? 128 | - Are baby cots available for the rooms? 129 | 130 | ## intent:faqbreakfasttime 131 | - can you specify the time for the breakfast? 132 | - at what time will you serve the breakfast? 133 | - what is the time for the breakfast? 134 | 135 | ## intent:faqrefundable 136 | - is it possible to get a refund for my room? 137 | - what is the refund policy 138 | - is refund available 139 | - Is my room refundable? 140 | 141 | ## intent:faqreceptiontime 142 | - is reception open now? 143 | - is reception open all the time 144 | - what is the timing of reception? 145 | - Is Reception open 24 hours? 146 | - reception time 147 | - Reception Time 148 | 149 | ## intent:faqparking 150 | - How do I know if the hotel has parking facilities? 151 | - car parking available? 152 | - do you provide car parking? 153 | - is there a parking space 154 | - Does Hotel provide parking? 155 | - is car parking available? 156 | - can I park my car in the hotel car parking 157 | - is there a space for parking my car? 158 | - car parking 159 | - Are there car parking spaces or a car park? 160 | 161 | ## intent:faqparkingcost 162 | - what is the car parking cost? 163 | - parking cost 164 | - Parking Cost 165 | - How much does parking cost? 166 | 167 | ## intent:faqpartialcancel 168 | - Can I cancel only certain parts of my reservation (for example one of the two booked rooms)? 169 | - is it possible for partially cancelling the rooms 170 | - Can I partially cancel my hotel booking? 171 | 172 | ## intent:faq 173 | - FAQ 174 | - faq 175 | - Faq 176 | 177 | ## intent:faqpetpolicy 178 | - Can I bring my pet? 179 | - is it possible to bring my pets with me 180 | - can I bring my pets with me? 181 | - is there a charge for bringing my pets 182 | - Are pets allowed to stay at the hotel? 183 | - pet policy 184 | contact number 185 | ## intent:faqreservaconfirm 186 | - How can I confirm that my reservation has been made? 187 | - can I know is my reservation confirmed? 188 | - how can I confirm that the reservation is complete? 189 | - how to know that the reservation is confirmed? 190 | - How do I know if my reservation is confirmed? 191 | 192 | ## intent:faqnearestairport 193 | - airport? 194 | - where is the nearest airport? 195 | - is there an airport near by? 196 | - is there an airport very close to the hotel? 197 | - which is the nearest airport 198 | 199 | ## intent:faqmodifyreservation 200 | - If I change the dates of my stay, will this influence the price? 201 | - can I modify my reservation 202 | - If I modify my reservation will my rate change? 203 | 204 | ## intent:faqmeetingroom 205 | - which are the meeting equipment available in the hotel? 206 | - I want to arrange a meeting 207 | - what are the available facilities for arranging meeting there? 208 | - meeting arrangements in the hotel 209 | 210 | ## intent:faqsecurity 211 | - tell me about the security services 212 | - tell me the security arrangements of the hotel 213 | - what are the security systems available 214 | - What security arrangements are available in your hotel? 215 | 216 | ## intent:faqluggage 217 | - can you store my luggages? 218 | - will you store my luggages? 219 | - luggage storage facility available? 220 | - is there a place for storing my luggage? 221 | - is it possible to store my luggage when I go out 222 | - store luggages 223 | - can I leave my luggages? 224 | - will you store my luggage? 225 | 226 | ## intent:faqcontactnumber 227 | - What is the customer support number? 228 | - What is your phone number? 229 | - can you give me the hotel contact number 230 | - contact number 231 | - is there a contact number for the hotel? 232 | - What is the contact number of the reception? 233 | 234 | -------------------------------------------------------------------------------- /06_hotel_bot/src/data/stories.md: -------------------------------------------------------------------------------- 1 | ## marine_nearestattra 2 | * greet 3 | - utter_greet 4 | * nearest_attraction 5 | - action_nearest_attractions 6 | * marine_drive 7 | - utter_marine 8 | 9 | ## mattanche_nearestattra 10 | * greet 11 | - utter_greet 12 | * nearest_attraction 13 | - action_nearest_attractions 14 | * mattancherry 15 | - utter_mattancherry 16 | 17 | ## fortkochi_nearestattra 18 | * greet 19 | - utter_greet 20 | * nearest_attraction 21 | - action_nearest_attractions 22 | * fort_kochi 23 | - utter_fortkochi 24 | 25 | ## book_room_dulex_details 26 | * greet 27 | - utter_greet 28 | * book_rooms 29 | - action_book_rooms 30 | * dulex_room_details 31 | - utter_dulexroom_details 32 | 33 | ## book_room_juniorsuite_details 34 | * greet 35 | - utter_greet 36 | * book_rooms 37 | - action_book_rooms 38 | * junior_suite_details 39 | - utter_juniorsuite_details 40 | 41 | ## book_room_clubsuitesuite_details 42 | * greet 43 | - utter_greet 44 | * book_rooms 45 | - action_book_rooms 46 | * club_suite_details 47 | - utter_clubsuite_details 48 | 49 | ## book_room_now 50 | * greet 51 | - utter_greet 52 | * book_rooms 53 | - action_book_rooms 54 | * book_room_now 55 | - book_room_form 56 | - action_book_rooms_details 57 | 58 | ## faqbreakfastmenu 59 | * greet 60 | - utter_greet 61 | * faq 62 | - utter_faq_prompt 63 | * faqbreakfast 64 | - utter_faqbreakfast 65 | 66 | ## cancellationplicyfaq 67 | * greet 68 | - utter_greet 69 | * faq 70 | - utter_faq_prompt 71 | * faqcancellationpolicy 72 | - utter_cancellationpolicy 73 | 74 | ## faqcheckin 75 | * greet 76 | - utter_greet 77 | * faq 78 | - utter_faq_prompt 79 | * faqcheckin 80 | - utter_checkintime 81 | 82 | ## faqminimumage 83 | * greet 84 | - utter_greet 85 | * faq 86 | - utter_faq_prompt 87 | * faqcheckinage 88 | - utter_miminumage 89 | 90 | ## faqcheckouttime 91 | * greet 92 | - utter_greet 93 | * faq 94 | - utter_faq_prompt 95 | * faqcheckout 96 | - utter_checkout 97 | 98 | ## faqchildrenage 99 | * greet 100 | - utter_greet 101 | * faq 102 | - utter_faq_prompt 103 | * faqchildrenage 104 | - utter_childrenage 105 | 106 | ## faqearlycheckin 107 | * greet 108 | - utter_greet 109 | * faq 110 | - utter_faq_prompt 111 | * faqearlycheckin 112 | - utter_earlycheckin 113 | 114 | ## faqlatecheckin 115 | * greet 116 | - utter_greet 117 | * faq 118 | - utter_faq_prompt 119 | * faqlatecheckin 120 | - utter_latecheckin 121 | 122 | ## faqlatecheckout 123 | * faqlatecheckout 124 | - utter_latecheckout 125 | 126 | ## faqroomcountdetails 127 | * greet 128 | - utter_greet 129 | * faq 130 | - utter_faq_prompt 131 | * faqroomcount 132 | - utter_roomcount 133 | 134 | ## babycotfaq 135 | * greet 136 | - utter_greet 137 | * faq 138 | - utter_faq_prompt 139 | * faqbabycot 140 | - utter_babycot 141 | 142 | ## breakfasttime 143 | * greet 144 | - utter_greet 145 | * faq 146 | - utter_faq_prompt 147 | * faqbreakfasttime 148 | - utter_breakfasttime 149 | 150 | ## refundpolicy 151 | * greet 152 | - utter_greet 153 | * faq 154 | - utter_faq_prompt 155 | * faqrefundable 156 | - utter_refundable 157 | 158 | ## receptiontime 159 | * greet 160 | - utter_greet 161 | * faq 162 | - utter_faq_prompt 163 | * faqreceptiontime 164 | - utter_receptiontime 165 | 166 | ## carparking: 167 | * greet 168 | - utter_greet 169 | * faq 170 | - utter_faq_prompt 171 | * faqparking 172 | - utter_carparking 173 | 174 | ## parkingcost 175 | * greet 176 | - utter_greet 177 | * faq 178 | - utter_faq_prompt 179 | * faqparkingcost 180 | - utter_parkingcost 181 | 182 | ## faqpartialcancel 183 | * greet 184 | - utter_greet 185 | * faq 186 | - utter_faq_prompt 187 | * faqpartialcancel 188 | - utter_partialcancel 189 | 190 | ## petpolicyfaq 191 | * greet 192 | - utter_greet 193 | * faq 194 | - utter_faq_prompt 195 | * faqpetpolicy 196 | - utter_petpolicy 197 | 198 | ## reservationconfirm 199 | * greet 200 | - utter_greet 201 | * faq 202 | - utter_faq_prompt 203 | * faqreservaconfirm 204 | - utter_reservationconfirm 205 | 206 | ## nearestairportfaq 207 | * greet 208 | - utter_greet 209 | * faq 210 | - utter_faq_prompt 211 | * faqnearestairport 212 | - utter_nearestairport 213 | 214 | ## modifyreservation 215 | * greet 216 | - utter_greet 217 | * faq 218 | - utter_faq_prompt 219 | * faqmodifyreservation 220 | - utter_modifyreservation 221 | 222 | ## meetingroom 223 | * greet 224 | - utter_greet 225 | * faq 226 | - utter_faq_prompt 227 | * faqmeetingroom 228 | - utter_meetingroom 229 | 230 | ## security 231 | * greet 232 | - utter_greet 233 | * faq 234 | - utter_faq_prompt 235 | * faqsecurity 236 | - utter_security 237 | 238 | ## luggahes 239 | * greet 240 | - utter_greet 241 | * faq 242 | - utter_faq_prompt 243 | * faqluggage 244 | - utter_luggage 245 | 246 | ## contactnumber 247 | * greet 248 | - utter_greet 249 | * faq 250 | - utter_faq_prompt 251 | * faqcontactnumber 252 | - utter_contactnumber -------------------------------------------------------------------------------- /06_hotel_bot/src/domain.yml: -------------------------------------------------------------------------------- 1 | --- 2 | actions: 3 | - utter_greet 4 | - action_nearest_attractions 5 | - utter_marine 6 | - utter_mattancherry 7 | - utter_fortkochi 8 | - action_book_rooms 9 | - utter_dulexroom_details 10 | - utter_juniorsuite_details 11 | - utter_clubsuite_details 12 | - action_book_rooms_details 13 | - utter_faqbreakfast 14 | - utter_cancellationpolicy 15 | - utter_checkintime 16 | - utter_miminumage 17 | - utter_checkout 18 | - utter_childrenage 19 | - utter_earlycheckin 20 | - utter_latecheckin 21 | - utter_latecheckout 22 | - utter_roomcount 23 | - utter_babycot 24 | - utter_breakfasttime 25 | - utter_refundable 26 | - utter_receptiontime 27 | - utter_carparking 28 | - utter_parkingcost 29 | - utter_partialcancel 30 | - utter_faq_prompt 31 | - utter_petpolicy 32 | - utter_reservationconfirm 33 | - utter_nearestairport 34 | - utter_modifyreservation 35 | - utter_meetingroom 36 | - utter_security 37 | - utter_luggage 38 | - utter_contactnumber 39 | forms: 40 | - book_room_form 41 | intents: 42 | - greet 43 | - goodbye 44 | - nearest_attraction 45 | - marine_drive 46 | - mattancherry 47 | - fort_kochi 48 | - book_rooms 49 | - dulex_room_details 50 | - junior_suite_details 51 | - club_suite_details 52 | - book_room_now 53 | - faqbreakfast 54 | - faqcancellationpolicy 55 | - faqcheckin 56 | - faqcheckinage 57 | - faqcheckout 58 | - faqchildrenage 59 | - faqearlycheckin 60 | - faqlatecheckin 61 | - faqlatecheckout 62 | - faqroomcount 63 | - faqbabycot 64 | - faqbreakfasttime 65 | - faqrefundable 66 | - faqreceptiontime 67 | - faqparking 68 | - faqparkingcost 69 | - faqpartialcancel 70 | - faq 71 | - faqpetpolicy 72 | - faqreservaconfirm 73 | - faqnearestairport 74 | - faqmodifyreservation 75 | - faqmeetingroom 76 | - faqsecurity 77 | - faqluggage 78 | - faqcontactnumber 79 | slots: 80 | adults: 81 | auto_fill: false 82 | type: unfeaturized 83 | check_in: 84 | auto_fill: false 85 | type: unfeaturized 86 | check_out: 87 | auto_fill: false 88 | type: unfeaturized 89 | child: 90 | auto_fill: false 91 | type: unfeaturized 92 | email: 93 | auto_fill: false 94 | type: unfeaturized 95 | name: 96 | auto_fill: false 97 | type: unfeaturized 98 | phno: 99 | auto_fill: false 100 | type: unfeaturized 101 | room: 102 | auto_fill: false 103 | type: unfeaturized 104 | templates: 105 | utter_ask_adults: 106 | - 107 | buttons: 108 | - 109 | payload: 1 110 | title: 1 111 | - 112 | payload: 2 113 | title: 2 114 | - 115 | payload: 3 116 | title: 3 117 | text: "How many adults (above 12 years old) are staying?" 118 | utter_ask_check_in: 119 | - 120 | text: "On which date would you like to check in? E.g. July 10" 121 | utter_ask_check_out: 122 | - 123 | text: "When would you like to checkout? E.g. July 12" 124 | utter_ask_child: 125 | - 126 | buttons: 127 | - 128 | payload: 0 129 | title: 0 130 | - 131 | payload: 1 132 | title: 1 133 | - 134 | payload: 2 135 | title: 2 136 | text: "How many children (below 12 years old) are staying?" 137 | utter_ask_email: 138 | - 139 | text: "Please provide us your email" 140 | utter_ask_name: 141 | - 142 | text: "Please provide us your name" 143 | utter_ask_phno: 144 | - 145 | text: "Please provide us your phone number" 146 | utter_ask_room: 147 | - 148 | buttons: 149 | - 150 | payload: 1 151 | title: 1 152 | - 153 | payload: 2 154 | title: 2 155 | - 156 | payload: 3 157 | title: 3 158 | text: "How many rooms would you like to book?" 159 | utter_babycot: 160 | - 161 | text: "Yes.Baby cots are available in our hotel" 162 | utter_breakfasttime: 163 | - 164 | text: "Breakfast is served from 7am to 10am, every day." 165 | utter_cancellationpolicy: 166 | - 167 | text: "If your travel plans change, you can cancel or modify your reservation in accordance with the hotel's cancellation policy as stated during the reservation process." 168 | utter_carparking: 169 | - 170 | text: "Our hotel has a private car parking." 171 | utter_checkintime: 172 | - 173 | text: "The check-in time is after 12 p.m. Let us know your arrival time in case you schedule an early check-in we'll do our best to make your room available." 174 | utter_checkout: 175 | - 176 | text: "Check-out time is 12.00 noon." 177 | utter_childrenage: 178 | - 179 | text: "Yes, children up to the age of 2 stay for free (accompanied by an adult)." 180 | utter_clubsuite_details: 181 | - 182 | text: "An exclusive 600 sqft room that redefines luxury with two bedrooms, walk-in wardrobes, entertainment area, a kitchenette, private balcony and unparalleled views of the City.AMENITIES 55” Smart IPTV Bathrooms with walk-in shower and bathtubHairdryerCoffee Machine Refrigerator,Microwave Oven,Toaster Iron/ironing board In-roomlaptop-sized electronic safeBuilt-In Induction Hob with a Built-In HoodComplimentary Wi-Fi & Two Way Airport TransfersAccess to boardroom, and Grand Club serving breakfast and evening refreshmentsComplimentary bottled mineral water." 183 | utter_contactnumber: 184 | - 185 | text: "The hotel can be contacted directly on 0333 444 5555." 186 | utter_dulexroom_details: 187 | - 188 | text: "These Deluxe Rooms let you relax as you admire a beautiful view of the pool. Stay connected as you enjoy our free WiFi and watch movies with our 32-inch LCD TV and DVD player. Refresh yourself as you take a step into our rain shower.AMENITIES55” Smart IPTV Bathrooms with walk-in shower and bathtubHairdryerCoffee MachineRefrigerator,Microwave Oven,Toaster Iron/ironing board In-roomlaptop-sized electronic safeBuilt-In InductionHob with a Built-In HoodComplimentary Wi-Fi & Two Way Airport TransfersAccess to the boardroom, and Grand Club serving breakfast and evening refreshmentsComplimentary bottled mineral water." 189 | utter_earlycheckin: 190 | - 191 | text: "Early check-in is possible subjected to the availability." 192 | utter_faq_prompt: 193 | - 194 | text: "OK.you can ask me anything you would like to know" 195 | utter_faqbreakfast: 196 | - 197 | text: |- 198 | Buffet breakfast, fee from 899.00 INR 199 | Continental breakfast, fee from 475.00 INR 200 | Full American breakfast, fee from 625.00 INR 201 | utter_fortkochi: 202 | - 203 | text: "Fort Kochi is a destination of immense historical interest and a jewel in the crown of Kerala with its European heritage and true cosmopolitan temperament." 204 | utter_greet: 205 | - 206 | buttons: 207 | - 208 | payload: /nearest_attraction 209 | title: "Nearest Attraction" 210 | - 211 | payload: /book_rooms 212 | title: "Book Rooms" 213 | - 214 | payload: /faq 215 | title: FAQ 216 | text: "Hi , Welcome to Hotel Presidency!☺️" 217 | utter_juniorsuite_details: 218 | - 219 | text: "An exclusive 400 sqft room that redefines luxury with two bedrooms, walk-in wardrobes, entertainment area, a kitchenette, private balcony and unparalleled views of the City. AMENITIES55” Smart IPTVBathrooms with walk-in shower and bathtubHairdryerCoffee MachineRefrigerator,Microwave Oven,Toaster Iron/ironing boardIn-room laptop-sized electronic safeBuilt-In Induction Hob with a Built-In HoodComplimentary Wi-Fi & Two Way Airport TransfersAccess to boardroom, and Grand Club serving breakfast and evening refreshmentsComplimentary bottled mineral water." 220 | utter_latecheckin: 221 | - 222 | text: "We hold rooms until 7 am the next morning. If you are going to be late, call the hotel and they will hold your room." 223 | utter_latecheckout: 224 | - 225 | text: "Yes, our guests can request for late check out but it will be subject to availability.and a supplementary charge." 226 | utter_luggage: 227 | - 228 | text: "Yes, We can look after your luggage. If your room is not ready for check-in or in case of early check out we will store your luggage free of charge and also on the days between your check-in and check-out" 229 | utter_marine: 230 | - 231 | text: "Marine Drive is a buzzing waterfront district known for the Marine Walkway, popular for evening strolls, and leafy Subhash Bose Park. The modern Rainbow and Kettuvallam bridges offer backwater views, and cruises leave from jetties by the water." 232 | utter_mattancherry: 233 | - 234 | text: "Historic Mattancherry is known for 16th-century Mattancherry Palace, built by the Portuguese in traditional Keralan style. Jew Town, the atmospheric area around the 1500s Jewish Synagogue, has charming cafes and shops selling antiques, crafts, and spices on Synagogue Lane and Jew Town Road." 235 | utter_meetingroom: 236 | - 237 | text: |- 238 | 11 Event Room 25,962 sq ft 239 | Total Event Space 1,600 240 | utter_miminumage: 241 | - 242 | text: "The hotel has a minimum age requirement of 21 years old. Please call the hotel directly prior to your arrival to make any necessary arrangements. Hotel direct phone numbers can be found on your confirmation email or on the Hotel Information page" 243 | utter_modifyreservation: 244 | - 245 | text: "Possibly. Rates are set by factors such as time of year, day of the week, length of stay, room type, number of individuals in the room, etc. Modification of any of these items may result in changes to the room rate. Please be sure to re-enter any special rate types to ensure that your search checks availability for those special rates." 246 | utter_nearestairport: 247 | - 248 | text: "Cochin (Airport Code: COK) has regular domestic and international flights to most major destinations in the world. The airport is 23 kms ( 35 mins drive) from the Hotel." 249 | utter_parkingcost: 250 | - 251 | text: "The car park costs is included in the room rate." 252 | utter_partialcancel: 253 | - 254 | text: "A hotel booking cannot be partially cancelled. On cancellation all rooms booked will get cancelled." 255 | utter_petpolicy: 256 | - 257 | text: "Pets are not allowed in the hotel" 258 | utter_receptiontime: 259 | - 260 | text: "Reception service is available 24 hours." 261 | utter_refundable: 262 | - 263 | text: "Most hotel rooms are fully refundable if you cancel before the hotel's cancellation deadline, which varies across accommodations.Some hotel rooms are non-refundable.If you cancel a non-refundable accommodation booking, or cancel your booking after the accommodation's cancellation deadline, you are not eligible for a refund, regardless of the payment method used." 264 | utter_reservationconfirm: 265 | - 266 | text: "As soon as you have completed the booking process, you will receive an ID number as confirmation. We will also send you a confirmation email and voucher with all your booking information." 267 | utter_roomcount: 268 | - 269 | text: "A person can book as many number of rooms needed ." 270 | utter_security: 271 | - 272 | text: |- 273 | The Hotel has the following Security Arrangements: 274 | Fire Safety 275 | Wet Riser System 276 | Alarm Syste 277 | CCTV Cameras 278 | 24-hours Control Room to monitor the security cameras 279 | Door Metal Detector 280 | Hand Metal Detector 281 | Mirror Metal Detector 282 | EVD Machine to scan the luggage 283 | 24-hours fire fighting & first aid trained security guards 284 | 2 nursing homes at a ½ km distance 285 | -------------------------------------------------------------------------------- /06_hotel_bot/src/endpoints.yml: -------------------------------------------------------------------------------- 1 | # This file contains the different endpoints your bot can use. 2 | 3 | # Server where the models are pulled from. 4 | # https://rasa.com/docs/rasa/user-guide/running-the-server/#fetching-models-from-a-server/ 5 | 6 | #models: 7 | # url: http://my-server.com/models/default_core@latest 8 | # wait_time_between_pulls: 10 # [optional](default: 100) 9 | 10 | # Server which runs your custom actions. 11 | # https://rasa.com/docs/rasa/core/actions/#custom-actions/ 12 | 13 | action_endpoint: 14 | url: "http://localhost:5055/webhook" 15 | 16 | # Tracker store which is used to store the conversations. 17 | # By default the conversations are stored in memory. 18 | # https://rasa.com/docs/rasa/api/tracker-stores/ 19 | 20 | #tracker_store: 21 | # type: redis 22 | # url: 23 | # port: 24 | # db: 25 | # password: 26 | # use_ssl: 27 | 28 | #tracker_store: 29 | # type: mongod 30 | # url: 31 | # db: 32 | # username: 33 | # password: 34 | 35 | # Event broker which all conversation events should be streamed to. 36 | # https://rasa.com/docs/rasa/api/event-brokers/ 37 | 38 | #event_broker: 39 | # url: localhost 40 | # username: username 41 | # password: password 42 | # queue: queue 43 | -------------------------------------------------------------------------------- /07_survey_bot/README.md: -------------------------------------------------------------------------------- 1 | # Survey Chatbot Template 2 | 3 | ### How to use it? 4 | Please follow the steps [as mentioned here](https://github.com/cedextech/Rasa-Chatbot-Templates/blob/master/README.md) 5 | 6 | ### Screenshots 7 | ![screenshot_1.png](screenshot_1.png)![screenshot_2.png](screenshot_2.png)![screenshot_3.png](screenshot_3.png)![screenshot_4.png](screenshot_4.png) 8 | -------------------------------------------------------------------------------- /07_survey_bot/compressed.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cedextech/rasa-chatbot-templates/074aadfc06dcffd63575a54285cbceae8c326ac5/07_survey_bot/compressed.zip -------------------------------------------------------------------------------- /07_survey_bot/screenshot_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cedextech/rasa-chatbot-templates/074aadfc06dcffd63575a54285cbceae8c326ac5/07_survey_bot/screenshot_1.png -------------------------------------------------------------------------------- /07_survey_bot/screenshot_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cedextech/rasa-chatbot-templates/074aadfc06dcffd63575a54285cbceae8c326ac5/07_survey_bot/screenshot_2.png -------------------------------------------------------------------------------- /07_survey_bot/screenshot_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cedextech/rasa-chatbot-templates/074aadfc06dcffd63575a54285cbceae8c326ac5/07_survey_bot/screenshot_3.png -------------------------------------------------------------------------------- /07_survey_bot/screenshot_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cedextech/rasa-chatbot-templates/074aadfc06dcffd63575a54285cbceae8c326ac5/07_survey_bot/screenshot_4.png -------------------------------------------------------------------------------- /07_survey_bot/src/actions.py: -------------------------------------------------------------------------------- 1 | 2 | from typing import Dict, Text, Any, List, Union, Optional 3 | 4 | from rasa_sdk import Tracker 5 | from rasa_sdk.executor import CollectingDispatcher 6 | 7 | from rasa_sdk import Action 8 | from rasa_sdk.forms import FormAction 9 | 10 | 11 | 12 | 13 | class SurveyForm(FormAction): 14 | def name(self): 15 | return "survey_form" 16 | 17 | def required_slots(self,tracker) -> List[Text]: 18 | return ["first_reply","rate_quality","innovative","price_service","buy_service","replace_service","rate_service","like_most","improve_service"] 19 | def slot_mappings(self) -> Dict[Text, Union[Dict, List[Dict]]]: 20 | return { 21 | "first_reply": [ 22 | self.from_text(), 23 | ], 24 | "rate_quality": [ 25 | self.from_text(), 26 | ], 27 | 28 | "innovative": [ 29 | self.from_text(), 30 | ], 31 | "price_service": [ 32 | self.from_text(), 33 | ], 34 | "buy_service": [ 35 | self.from_text(), 36 | ], 37 | "replace_service": [ 38 | self.from_text(), 39 | ], 40 | "rate_service": [ 41 | self.from_text(), 42 | ], 43 | "like_most": [ 44 | self.from_text(), 45 | ], 46 | "improve_service": [ 47 | self.from_text(), 48 | ], 49 | } 50 | def submit( 51 | self, 52 | dispatcher: CollectingDispatcher, 53 | tracker: Tracker, 54 | domain: Dict[Text, Any], 55 | ) -> List[Dict]: 56 | dispatcher.utter_message("Thank you for your patience") 57 | return [] 58 | -------------------------------------------------------------------------------- /07_survey_bot/src/config.yml: -------------------------------------------------------------------------------- 1 | # Configuration for Rasa NLU. 2 | # https://rasa.com/docs/rasa/nlu/components/ 3 | language: en 4 | pipeline: supervised_embeddings 5 | 6 | # Configuration for Rasa Core. 7 | # https://rasa.com/docs/rasa/core/policies/ 8 | policies: 9 | - name: MemoizationPolicy 10 | - name: KerasPolicy 11 | - name: MappingPolicy 12 | - name: FormPolicy 13 | -------------------------------------------------------------------------------- /07_survey_bot/src/data/nlu.md: -------------------------------------------------------------------------------- 1 | ## intent:greet 2 | - hey 3 | - hello 4 | - hi 5 | - good morning 6 | - good evening 7 | - hey there 8 | 9 | ## intent:goodbye 10 | - bye 11 | - goodbye 12 | - bye bye 13 | -------------------------------------------------------------------------------- /07_survey_bot/src/data/stories.md: -------------------------------------------------------------------------------- 1 | ## happy path 2 | * greet 3 | - utter_greet 4 | - survey_form 5 | - form{"name":"survey_form"} 6 | - form{"name":"null"} 7 | 8 | ## bye 9 | * goodbye 10 | - utter_goodbye -------------------------------------------------------------------------------- /07_survey_bot/src/domain.yml: -------------------------------------------------------------------------------- 1 | --- 2 | actions: 3 | - utter_greet 4 | - utter_goodbye 5 | intents: 6 | - greet 7 | - bye 8 | slots: 9 | first_reply: 10 | auto_fill: false 11 | type: unfeaturized 12 | rate_quality: 13 | auto_fill: false 14 | type: unfeaturized 15 | innovative: 16 | auto_fill: false 17 | type: unfeaturized 18 | price_service: 19 | auto_fill: false 20 | type: unfeaturized 21 | buy_service: 22 | auto_fill: false 23 | type: unfeaturized 24 | replace_service: 25 | auto_fill: false 26 | type: unfeaturized 27 | rate_service: 28 | auto_fill: false 29 | type: unfeaturized 30 | like_most: 31 | auto_fill: false 32 | type: unfeaturized 33 | improve_service: 34 | auto_fill: false 35 | type: unfeaturized 36 | forms: 37 | - survey_form 38 | templates: 39 | utter_ask_buy_service: 40 | - 41 | buttons: 42 | - 43 | payload: "Yes" 44 | title: "Yes" 45 | - 46 | payload: "NO" 47 | title: "NO" 48 | text: "If the service were available today, will you buy the service?" 49 | utter_ask_first_reply: 50 | - 51 | buttons: 52 | - 53 | payload: Positive 54 | title: Positive 55 | - 56 | payload: Negative 57 | title: Negative 58 | - 59 | payload: Neutral 60 | title: Neutral 61 | text: "Tell us about your first reaction to the service" 62 | utter_greet: 63 | - 64 | text: "Hey! I am Survey Bot,Please answer the following questions to proceed the survey" 65 | utter_ask_innovative: 66 | - 67 | buttons: 68 | - 69 | payload: Innovative 70 | title: Innovative 71 | - 72 | payload: "Somewhat innovative" 73 | title: "Somewhat innovative" 74 | - 75 | payload: "Not innovative" 76 | title: "Not innovative" 77 | text: "How innovative is the service?" 78 | utter_ask_price_service: 79 | - 80 | buttons: 81 | - 82 | payload: Excellent 83 | title: Excellent 84 | - 85 | payload: Average 86 | title: Average 87 | - 88 | payload: Poor 89 | title: Poor 90 | text: "Are you satisfied with price of the service?" 91 | utter_ask_rate_quality: 92 | - 93 | buttons: 94 | - 95 | payload: "High quality" 96 | title: "High quality" 97 | - 98 | payload: "Low quality" 99 | title: "Low quality" 100 | - 101 | payload: "Neither high nor low quality" 102 | title: "Neither high nor low quality" 103 | text: "Please rate the quality of the service" 104 | utter_ask_replace_service: 105 | - 106 | buttons: 107 | - 108 | payload: "Very likely" 109 | title: "Very likely" 110 | - 111 | payload: "Somewhat likely" 112 | title: "Somewhat likely" 113 | - 114 | payload: "Not so likely" 115 | title: "Not so likely" 116 | text: "How often will you replace your current service with the service" 117 | utter_ask_rate_service: 118 | - 119 | buttons: 120 | - 121 | payload: "Very likely" 122 | title: "Very likely" 123 | - 124 | payload: "Somewhat likely" 125 | title: "Somewhat likely" 126 | - 127 | payload: "Not so likely" 128 | title: "Not so likely" 129 | text: "How likely is that you would recommend our service" 130 | utter_ask_like_most: 131 | - text: "Write brefly about the things that you like most about the new service" 132 | utter_ask_improve_service: 133 | - text: "Write brefly about the things that you would like to improve in new service" 134 | utter_goodbye: 135 | - text: "Bye" 136 | -------------------------------------------------------------------------------- /07_survey_bot/src/endpoints.yml: -------------------------------------------------------------------------------- 1 | # This file contains the different endpoints your bot can use. 2 | 3 | # Server where the models are pulled from. 4 | # https://rasa.com/docs/rasa/user-guide/running-the-server/#fetching-models-from-a-server/ 5 | 6 | #models: 7 | # url: http://my-server.com/models/default_core@latest 8 | # wait_time_between_pulls: 10 # [optional](default: 100) 9 | 10 | # Server which runs your custom actions. 11 | # https://rasa.com/docs/rasa/core/actions/#custom-actions/ 12 | 13 | action_endpoint: 14 | url: "http://localhost:5055/webhook" 15 | 16 | # Tracker store which is used to store the conversations. 17 | # By default the conversations are stored in memory. 18 | # https://rasa.com/docs/rasa/api/tracker-stores/ 19 | 20 | #tracker_store: 21 | # type: redis 22 | # url: 23 | # port: 24 | # db: 25 | # password: 26 | # use_ssl: 27 | 28 | #tracker_store: 29 | # type: mongod 30 | # url: 31 | # db: 32 | # username: 33 | # password: 34 | 35 | # Event broker which all conversation events should be streamed to. 36 | # https://rasa.com/docs/rasa/api/event-brokers/ 37 | 38 | #event_broker: 39 | # url: localhost 40 | # username: username 41 | # password: password 42 | # queue: queue 43 | -------------------------------------------------------------------------------- /08_travel_agency_bot/README.md: -------------------------------------------------------------------------------- 1 | # Travel Agency Chatbot Template 2 | 3 | ### How to use it? 4 | Please follow the steps [as mentioned here](https://github.com/cedextech/Rasa-Chatbot-Templates/blob/master/README.md) 5 | 6 | ### Screenshots 7 | ![screenshot_1.png](screenshot_1.png)![screenshot_2.png](screenshot_2.png)![screenshot_3.png](screenshot_3.png)![screenshot_4.png](screenshot_4.png)![screenshot_5.png](screenshot_5.png)![screenshot_6.png](screenshot_6.png)![screenshot_7.png](screenshot_7.png)![screenshot_8.png](screenshot_8.png)![screenshot_9.png](screenshot_9.png) 8 | -------------------------------------------------------------------------------- /08_travel_agency_bot/compressed.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cedextech/rasa-chatbot-templates/074aadfc06dcffd63575a54285cbceae8c326ac5/08_travel_agency_bot/compressed.zip -------------------------------------------------------------------------------- /08_travel_agency_bot/screenshot_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cedextech/rasa-chatbot-templates/074aadfc06dcffd63575a54285cbceae8c326ac5/08_travel_agency_bot/screenshot_1.png -------------------------------------------------------------------------------- /08_travel_agency_bot/screenshot_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cedextech/rasa-chatbot-templates/074aadfc06dcffd63575a54285cbceae8c326ac5/08_travel_agency_bot/screenshot_2.png -------------------------------------------------------------------------------- /08_travel_agency_bot/screenshot_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cedextech/rasa-chatbot-templates/074aadfc06dcffd63575a54285cbceae8c326ac5/08_travel_agency_bot/screenshot_3.png -------------------------------------------------------------------------------- /08_travel_agency_bot/screenshot_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cedextech/rasa-chatbot-templates/074aadfc06dcffd63575a54285cbceae8c326ac5/08_travel_agency_bot/screenshot_4.png -------------------------------------------------------------------------------- /08_travel_agency_bot/screenshot_5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cedextech/rasa-chatbot-templates/074aadfc06dcffd63575a54285cbceae8c326ac5/08_travel_agency_bot/screenshot_5.png -------------------------------------------------------------------------------- /08_travel_agency_bot/screenshot_6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cedextech/rasa-chatbot-templates/074aadfc06dcffd63575a54285cbceae8c326ac5/08_travel_agency_bot/screenshot_6.png -------------------------------------------------------------------------------- /08_travel_agency_bot/screenshot_7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cedextech/rasa-chatbot-templates/074aadfc06dcffd63575a54285cbceae8c326ac5/08_travel_agency_bot/screenshot_7.png -------------------------------------------------------------------------------- /08_travel_agency_bot/screenshot_8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cedextech/rasa-chatbot-templates/074aadfc06dcffd63575a54285cbceae8c326ac5/08_travel_agency_bot/screenshot_8.png -------------------------------------------------------------------------------- /08_travel_agency_bot/screenshot_9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cedextech/rasa-chatbot-templates/074aadfc06dcffd63575a54285cbceae8c326ac5/08_travel_agency_bot/screenshot_9.png -------------------------------------------------------------------------------- /08_travel_agency_bot/src/actions.py: -------------------------------------------------------------------------------- 1 | from typing import Dict, Text, Any, List, Union, Optional 2 | 3 | from rasa_sdk import Tracker 4 | from rasa_sdk.executor import CollectingDispatcher 5 | 6 | from rasa_sdk import Action 7 | from rasa_sdk.forms import FormAction 8 | 9 | 10 | 11 | 12 | class TripplanForm(FormAction): 13 | def name(self): 14 | return "trip_plan_form" 15 | 16 | def required_slots(self,tracker) -> List[Text]: 17 | return ["travel_date","travel_period","trip_type","adults","child","budget","email","phno"] 18 | def slot_mappings(self) -> Dict[Text, Union[Dict, List[Dict]]]: 19 | return { 20 | "travel_date": [ 21 | self.from_text(), 22 | ], 23 | "travel_period": [ 24 | self.from_text(), 25 | ], 26 | 27 | "trip_type": [ 28 | self.from_text(), 29 | ], 30 | "adults": [ 31 | self.from_text(), 32 | ], 33 | "child": [ 34 | self.from_text(), 35 | ], 36 | "budget": [ 37 | self.from_text(), 38 | ], 39 | "email": [ 40 | self.from_text(), 41 | ], 42 | "phno": [ 43 | self.from_text(), 44 | ], 45 | } 46 | def submit( 47 | self, 48 | dispatcher: CollectingDispatcher, 49 | tracker: Tracker, 50 | domain: Dict[Text, Any], 51 | ) -> List[Dict]: 52 | dispatcher.utter_message("❤️❤️❤️Thank you so much for showing your intrest in traveling with us") 53 | return [] 54 | 55 | class ActivitiesOffered(Action): 56 | def name(self): 57 | """name of the custom action""" 58 | return "action_activities_offerd" 59 | 60 | def run(self,dispatcher,tracker,domain): 61 | gt = { 62 | "attachment": { 63 | "type": "template", 64 | "payload": { 65 | "template_type": "generic", 66 | "elements": [ 67 | { 68 | "title": "Zipline Tour", 69 | "image_url":"http://teatownkerala.com/wp-content/uploads/2018/03/WNDZIPLINE3.png", 70 | "subtitle": "A canopy tour (sometimes called a zip-line tour) provides a route through a wooded and often mountainous landscape making primary use of zip-lines and aerial bridges between platforms built in trees.", 71 | "buttons": [ 72 | { 73 | "type": "postback", 74 | "payload": "/more_info_zipline_tour", 75 | "title": "📄 More Information" 76 | }, 77 | { 78 | "type": "postback", 79 | "payload": "/tour_details_zipline", 80 | "title": "🔍 Tour Details" 81 | }, 82 | { 83 | "type": "postback", 84 | "payload": "/add_to_mytrip", 85 | "title": "✔️ Add to my trip" 86 | }, 87 | 88 | 89 | ] 90 | }, 91 | { 92 | "title": "Natural Exploration", 93 | "image_url":"https://media-cdn.tripadvisor.com/media/attractions-splice-spp-540x360/07/6f/41/76.jpg", 94 | "subtitle": "A true paradise for those searching for jungles with feantastic beach", 95 | "buttons": [ 96 | { 97 | "type": "postback", 98 | "payload": "/more_info_natural_exploration", 99 | "title": "📄 More Information" 100 | }, 101 | { 102 | "type": "postback", 103 | "payload": "/tour_details_natural_exploration", 104 | "title": "🔍 Tour Details" 105 | }, 106 | { 107 | "type": "postback", 108 | "payload": "/add_to_mytrip", 109 | "title": "✔️ Add to my trip" 110 | }, 111 | 112 | 113 | ] 114 | }, 115 | { 116 | "title": "Subwing Costa Rica", 117 | "image_url":"https://siquijor-island.com/wp-content/uploads/2016/05/13112975_10209553223846197_5242194890031217041_o-702x336.jpg", 118 | "subtitle": "Enjoy doing the subwing our main feature", 119 | "buttons": [ 120 | { 121 | "type": "postback", 122 | "payload": "/more_info_subwing", 123 | "title": "📄 More Information" 124 | }, 125 | { 126 | "type": "postback", 127 | "payload": "/tour_details_subwing", 128 | "title": "🔍 Tour Details" 129 | }, 130 | { 131 | "type": "postback", 132 | "payload": "/add_to_mytrip", 133 | "title": "✔️ Add to my trip" 134 | }, 135 | 136 | 137 | ] 138 | }, 139 | ] 140 | } 141 | } 142 | } 143 | dispatcher.utter_custom_json(gt) 144 | return [] 145 | class testimonials(Action): 146 | def name(self): 147 | """name of the custom action""" 148 | return "action_testimonials" 149 | def run(self,dispatcher,tracker,domain): 150 | gt = { 151 | "attachment": { 152 | "type": "template", 153 | "payload": { 154 | "template_type": "generic", 155 | "elements": [ 156 | { 157 | "title": "Daniel⭐⭐⭐⭐⭐", 158 | "image_url":"https://devilonwheels.com/wp-content/uploads/2016/01/Zanskar-Changthang-615-2.jpg", 159 | "subtitle": "Great team, safety was never an issue even with rainy tough condition ", 160 | 161 | }, 162 | { 163 | "title": "Sophie⭐⭐⭐⭐⭐", 164 | "image_url":"https://amp.businessinsider.com/images/5b32aa651ae6623f008b492e-750-500.jpg", 165 | "subtitle": "Appreciate your encouragement and patience at various times. never forget", 166 | 167 | }, 168 | 169 | ] 170 | } 171 | } 172 | } 173 | dispatcher.utter_custom_json(gt) 174 | return [] 175 | class AboutCostaRica(Action): 176 | def name(self): 177 | """name of the custom action""" 178 | return "action_about_costa_rica" 179 | def run(self,dispatcher,tracker,domain): 180 | gt = { 181 | "attachment": { 182 | "type": "template", 183 | "payload": { 184 | "template_type": "generic", 185 | "elements": [ 186 | { 187 | "title": "Widely recognized as the world's foremost", 188 | "image_url":"https://www.nationalgeographic.com/content/dam/travel/Guide-Pages/north-america/caribbean/costa-rica/costa-rica-travel.adapt.1900.1.jpg", 189 | 190 | }, 191 | { 192 | "title": "ecotourism destination Costa Rica is small", 193 | "image_url":"https://www.euromoney.com/v-fde9e1a6c163377d323d3801f726e2fe/Media/images/euromoney/magazine/oct-19-1/costa%20rica%20sloth%20780.jpg", 194 | 195 | }, 196 | { 197 | "title": "but beautiful country with truly dramatic", 198 | "image_url":"https://www.maupintravel.com/blog/wp-content/uploads/2019/03/gardens-costa-rica-arenal-volcano-in-costa-rica-hero.jpg", 199 | 200 | }, 201 | 202 | 203 | ] 204 | } 205 | } 206 | } 207 | dispatcher.utter_custom_json(gt) 208 | return [] 209 | class OtherActivitiesCostRica(Action): 210 | def name(self): 211 | """name of the custom action""" 212 | return "action_otherActivities_costa_rica" 213 | def run(self,dispatcher,tracker,domain): 214 | gt = { 215 | "attachment": { 216 | "type": "template", 217 | "payload": { 218 | "template_type": "generic", 219 | "elements": [ 220 | { 221 | "title": "Bioluminescent Water", 222 | "image_url":"http://www.thetraveltwo.com/wp-content/uploads/2017/10/Photo-09-10-2017-22-44-30.jpg", 223 | "subtitle":"On the entire planet there are five locations to see vibrant bioluminescent water, of those Costa Rica’s Bahia Beach is number one." 224 | }, 225 | { 226 | "title": "Go paragliding", 227 | "image_url":"http://www.thetraveltwo.com/wp-content/uploads/2017/10/Photo-14-10-2017-15-50-06.jpg", 228 | "subtitle":"Arguably one of the most beautiful places in the world to throw yourself off the side of a mountain to fly like a bird? We twisted and spin 2500ft over Dominical rainforest and beach eye to eye with hawks." 229 | }, 230 | { 231 | "title": "Visit rio celeste", 232 | "image_url":"http://www.thetraveltwo.com/wp-content/uploads/2017/10/Photo-03-10-2017-11-44-01.jpg", 233 | "subtitle":"Waterfalls, hot springs and the most delicious turquoise water you’ll ever lay your eyes on! The source of this river’s distinctive colour is not a due to chemicals or manipulation but to a physical phenomenon known as Mie scattering." 234 | }, 235 | 236 | 237 | ] 238 | } 239 | } 240 | } 241 | dispatcher.utter_custom_json(gt) 242 | return [] 243 | -------------------------------------------------------------------------------- /08_travel_agency_bot/src/config.yml: -------------------------------------------------------------------------------- 1 | # Configuration for Rasa NLU. 2 | # https://rasa.com/docs/rasa/nlu/components/ 3 | language: en 4 | pipeline: supervised_embeddings 5 | 6 | # Configuration for Rasa Core. 7 | # https://rasa.com/docs/rasa/core/policies/ 8 | policies: 9 | - name: MemoizationPolicy 10 | - name: KerasPolicy 11 | - name: MappingPolicy 12 | - name: FormPolicy 13 | -------------------------------------------------------------------------------- /08_travel_agency_bot/src/data/nlu.md: -------------------------------------------------------------------------------- 1 | ## intent:greet 2 | - hey 3 | - hello 4 | - hi 5 | - good morning 6 | - good evening 7 | - hey there 8 | 9 | ## intent:main_menu 10 | - Let's see 11 | - Main menu 12 | - menu 13 | 14 | ## intent:plan_my_trip 15 | - Plan My Trip 16 | - plan my tip 17 | - PLAN MY TRIP 18 | 19 | ## intent:activities_offered 20 | - Activities Offered 21 | - activities offered 22 | - activities 23 | - Activities 24 | 25 | ## intent:more_info_zipline_tour 26 | - More Information 27 | - About Zipline Tour 28 | - zipline tour 29 | 30 | ## intent:more_info_natural_exploration 31 | - More Information 32 | - About Natural Exploration 33 | - about natural exploration 34 | 35 | ## intent:more_info_subwing 36 | - More Information 37 | - About subwing 38 | - subwing 39 | 40 | ## intent:tour_details_zipline 41 | - Tour details 42 | - Tour details zipline tour 43 | 44 | ## intent:tour_details_natural_exploration 45 | - Tour Details 46 | - tour details natural exploration 47 | 48 | 49 | ## intent:tour_details_subwing 50 | - Tour Details 51 | - tour details subwing 52 | 53 | ## intent:add_to_mytrip 54 | - Add to My trip 55 | - add to my trip 56 | 57 | ## intent:contact_us 58 | - Contact Us 59 | - contact us 60 | 61 | ## intent:testimonials 62 | - Testimonials 63 | - testimonials 64 | - TESTIMONIALS 65 | 66 | ## intent:about_costa_rica 67 | - About Costa Rica 68 | - costa rica 69 | - about costa rica 70 | 71 | ## intent:tips_and_tricks 72 | - Tips And Tricks 73 | - tips and tricks 74 | 75 | ## intent:tips_1 76 | - Tips1 77 | - tips1 78 | 79 | ## intent:tips_2 80 | - Tips1 81 | - tips1 82 | 83 | ## intent:tips_3 84 | - Tips3 85 | - tips3 86 | 87 | ## intent:other_activities 88 | - Other Activities 89 | - other activities 90 | - OTHER ACTIVITIES -------------------------------------------------------------------------------- /08_travel_agency_bot/src/data/stories.md: -------------------------------------------------------------------------------- 1 | ## happy path 2 | * greet 3 | - utter_greet 4 | - utter_first_message 5 | * main_menu 6 | - utter_welcome_message 7 | * plan_my_trip 8 | - utter_plan_trip_one 9 | - trip_plan_form 10 | - form{"name":"trip_plan_form"} 11 | - form{"name":"null"} 12 | 13 | ## activities 14 | * greet 15 | - utter_greet 16 | - utter_first_message 17 | * main_menu 18 | - utter_welcome_message 19 | * activities_offered 20 | - utter_activities 21 | - action_activities_offerd 22 | * more_info_zipline_tour 23 | - utter_zipline_tour 24 | * other_activities 25 | - action_otherActivities_costa_rica 26 | 27 | ## activities_natural_exploration 28 | * greet 29 | - utter_greet 30 | - utter_first_message 31 | * main_menu 32 | - utter_welcome_message 33 | * activities_offered 34 | - utter_activities 35 | - action_activities_offerd 36 | * more_info_natural_exploration 37 | - utter_natural_exploration 38 | * other_activities 39 | - action_otherActivities_costa_rica 40 | 41 | 42 | ## activities_subwing 43 | * greet 44 | - utter_greet 45 | - utter_first_message 46 | * main_menu 47 | - utter_welcome_message 48 | * activities_offered 49 | - utter_activities 50 | - action_activities_offerd 51 | * more_info_subwing 52 | - utter_subwing 53 | * other_activities 54 | - action_otherActivities_costa_rica 55 | 56 | 57 | ## tourdetails_zipline 58 | * greet 59 | - utter_greet 60 | - utter_first_message 61 | * main_menu 62 | - utter_welcome_message 63 | * activities_offered 64 | - utter_activities 65 | - action_activities_offerd 66 | * tour_details_zipline 67 | - utter_zipline_tour_details 68 | * other_activities 69 | - action_otherActivities_costa_rica 70 | 71 | 72 | 73 | ## tourdetails_natural 74 | * greet 75 | - utter_greet 76 | - utter_first_message 77 | * main_menu 78 | - utter_welcome_message 79 | * activities_offered 80 | - utter_activities 81 | - action_activities_offerd 82 | * tour_details_natural_exploration 83 | - utter_natural_tour_details 84 | * other_activities 85 | - action_otherActivities_costa_rica 86 | 87 | 88 | ## tourdetails_subwing 89 | * greet 90 | - utter_greet 91 | - utter_first_message 92 | * main_menu 93 | - utter_welcome_message 94 | * activities_offered 95 | - utter_activities 96 | - action_activities_offerd 97 | * tour_details_subwing 98 | - utter_subwing_tour_details 99 | * other_activities 100 | - action_otherActivities_costa_rica 101 | 102 | ## add_trip 103 | * greet 104 | - utter_greet 105 | - utter_first_message 106 | * main_menu 107 | - utter_welcome_message 108 | * activities_offered 109 | - utter_activities 110 | - action_activities_offerd 111 | * add_to_mytrip 112 | - utter_add_trip 113 | 114 | 115 | ## contacts 116 | * greet 117 | - utter_greet 118 | - utter_first_message 119 | * main_menu 120 | - utter_welcome_message 121 | * contact_us 122 | - utter_contact 123 | 124 | ## testimonials 125 | * greet 126 | - utter_greet 127 | - utter_first_message 128 | * main_menu 129 | - utter_welcome_message 130 | * testimonials 131 | - utter_testimonials 132 | - action_testimonials 133 | 134 | ## about_costa_rica 135 | * greet 136 | - utter_greet 137 | - utter_first_message 138 | * main_menu 139 | - utter_welcome_message 140 | * about_costa_rica 141 | - utter_about 142 | - action_about_costa_rica 143 | - utter_costa_rica 144 | 145 | ## tips1 146 | * greet 147 | - utter_greet 148 | - utter_first_message 149 | * main_menu 150 | - utter_welcome_message 151 | * tips_and_tricks 152 | - utter_tips_tricks 153 | * tips_1 154 | - utter_tip1 155 | 156 | ## tips2 157 | * greet 158 | - utter_greet 159 | - utter_first_message 160 | * main_menu 161 | - utter_welcome_message 162 | * tips_and_tricks 163 | - utter_tips_tricks 164 | * tips_2 165 | - utter_tips2 166 | 167 | ## tips2 168 | * greet 169 | - utter_greet 170 | - utter_first_message 171 | * main_menu 172 | - utter_welcome_message 173 | * tips_and_tricks 174 | - utter_tips_tricks 175 | * tips_3 176 | - utter_tips3 -------------------------------------------------------------------------------- /08_travel_agency_bot/src/domain.yml: -------------------------------------------------------------------------------- 1 | --- 2 | actions: 3 | - utter_greet 4 | - utter_first_message 5 | - utter_welcome_message 6 | - utter_plan_trip_one 7 | - utter_activities 8 | - action_activities_offerd 9 | - utter_zipline_tour 10 | - utter_natural_exploration 11 | - utter_subwing 12 | - utter_zipline_tour_details 13 | - utter_natural_tour_details 14 | - utter_subwing_tour_details 15 | - utter_add_trip 16 | - utter_contact 17 | - utter_testimonials 18 | - action_testimonials 19 | - utter_about 20 | - action_about_costa_rica 21 | - utter_costa_rica 22 | - utter_tips_tricks 23 | - utter_tip1 24 | - utter_tips2 25 | - utter_tips3 26 | - action_otherActivities_costa_rica 27 | forms: 28 | - trip_plan_form 29 | intents: 30 | - greet 31 | - main_menu 32 | - plan_my_trip 33 | - activities_offered 34 | - more_info_zipline_tour 35 | - more_info_natural_exploration 36 | - more_info_subwing 37 | - tour_details_zipline 38 | - tour_details_natural_exploration 39 | - tour_details_subwing 40 | - add_to_mytrip 41 | - contact_us 42 | - testimonials 43 | - about_costa_rica 44 | - tips_and_tricks 45 | - tips_1 46 | - tips_2 47 | - tips_3 48 | - other_activities 49 | slots: 50 | adults: 51 | auto_fill: false 52 | type: unfeaturized 53 | budget: 54 | auto_fill: false 55 | type: unfeaturized 56 | child: 57 | auto_fill: false 58 | type: unfeaturized 59 | email: 60 | auto_fill: false 61 | type: unfeaturized 62 | phno: 63 | auto_fill: false 64 | type: unfeaturized 65 | travel_date: 66 | auto_fill: false 67 | type: unfeaturized 68 | travel_period: 69 | auto_fill: false 70 | type: unfeaturized 71 | trip_type: 72 | auto_fill: false 73 | type: unfeaturized 74 | templates: 75 | utter_activities: 76 | - 77 | text: |- 78 | 🚣 We offer a wide range of adventure and nature activities that will always take place in in private mode, using our own equipment and guides 79 | 80 | please choose an option to get started 81 | utter_ask_adults: 82 | - 83 | buttons: 84 | - 85 | payload: 1-3 86 | title: 1-3 87 | - 88 | payload: 3-5 89 | title: 3-5 90 | - 91 | payload: 5+ 92 | title: 5+ 93 | text: "How many adults are coming?" 94 | utter_ask_budget: 95 | - 96 | buttons: 97 | - 98 | payload: "Less than $2000" 99 | title: "Less than $2000" 100 | - 101 | payload: $2000-$5000 102 | title: $2000-$5000 103 | - 104 | payload: "More than $5000" 105 | title: "More than $5000" 106 | text: "What's an estimated budget per person(excluding airfare)?" 107 | utter_ask_child: 108 | - 109 | buttons: 110 | - 111 | payload: "No" 112 | title: "No" 113 | - 114 | payload: "1-3 children" 115 | title: "1-3 children" 116 | - 117 | payload: "3+ children" 118 | title: "3+ children" 119 | text: "Are children traveling with you?" 120 | utter_ask_email: 121 | - 122 | text: "What's your best email address, so we can send you details?" 123 | utter_ask_phno: 124 | - 125 | text: "What's your best phone number📲 to reach you at?" 126 | utter_ask_travel_date: 127 | - 128 | text: "When are you planning to travel?" 129 | utter_ask_travel_period: 130 | - 131 | buttons: 132 | - 133 | payload: "5-10 days" 134 | title: "5-10 days" 135 | - 136 | payload: "10+ days" 137 | title: "10+ days" 138 | - 139 | payload: "Not sure yet" 140 | title: "Not sure yet" 141 | text: "How long are you planning to travel?" 142 | utter_ask_trip_type: 143 | - 144 | buttons: 145 | - 146 | payload: "Adventure - Adrenaline" 147 | title: "Adventure - Adrenaline" 148 | - 149 | payload: Nature 150 | title: Nature 151 | - 152 | payload: Relaxation 153 | title: Relaxation 154 | text: "What kind of trip are you looking for?" 155 | utter_first_message: 156 | - 157 | buttons: 158 | - 159 | payload: /main_menu 160 | title: "Let's see" 161 | text: "I'm VIP concierge and i'wiil help you to make your Costa Rica vacation to be perfect ⭐⭐⭐⭐⭐ right after you click the button below" 162 | utter_greet: 163 | - 164 | text: |- 165 | Hello Guest! 166 | 167 | Welcome to Costa Rica Adventure, where your comfrot, personal safety and total satisfaction is the highest priority 168 | utter_natural_exploration: 169 | - 170 | buttons: 171 | - 172 | payload: /other_activities 173 | title: "Oher Activities" 174 | text: "Many speceis of flora and fauna are unique to the park and found nowhere else on the earth\n\n\ 175 | \x20upon arrival at the park,your guide will slowly walk in search of wildlife " 176 | utter_natural_tour_details: 177 | - 178 | buttons: 179 | - 180 | payload: /other_activities 181 | title: "Oher Activities" 182 | text: |- 183 | 🕛 Lenght of the tour: full day 184 | 185 | Minpeople: 4 186 | 187 | Includes: transprotation round trip,fruit snacks,experience guides,lunch,entrence ticket and water 188 | 189 | Recommendations: light cloth,bathing suit,sneakers 190 | 191 | 192 | 💵:$ 120 per person 193 | utter_plan_trip_one: 194 | - 195 | text: "🙋 We look forward to assisting you with your travel planning needs" 196 | utter_subwing: 197 | - 198 | buttons: 199 | - 200 | payload: /other_activities 201 | title: "Oher Activities" 202 | text: "🏝️ Enjoy a full day adventure on the gorgeous Tortuga Island, We cater to groups of up to 8 people maximum" 203 | utter_subwing_tour_details: 204 | - 205 | buttons: 206 | - 207 | payload: /other_activities 208 | title: "Oher Activities" 209 | text: |- 210 | 🕛 Lenght of the tour: full day 211 | 212 | min.people: 2 213 | 214 | Includes: transprotation round trip,safety equipment,experience guides and insured vechicles 215 | 216 | Recommendations: swing suits,towel,sun screen and loads of energy 217 | 218 | 219 | 💵:$ 125 per person 220 | utter_welcome_message: 221 | - 222 | buttons: 223 | - 224 | payload: /plan_my_trip 225 | title: "📅Plan My Trip" 226 | - 227 | payload: /activities_offered 228 | title: "Activities Offered" 229 | - 230 | payload: /contact_us 231 | title: "📞 Contact Us" 232 | - 233 | payload: /testimonials 234 | title: "⭐ Testimoials" 235 | - 236 | payload: /about_costa_rica 237 | title: "🌅 About Costa Rica" 238 | - 239 | payload: /tips_and_tricks 240 | title: "👍 Tips And Tricks" 241 | text: "Ready to make your Costa Rica trip planning easy, make it worry-free and seamless?!\n\ 242 | \x20Click " 243 | utter_zipline_tour: 244 | - 245 | buttons: 246 | - 247 | payload: /other_activities 248 | title: "Oher Activities" 249 | text: "🚀 Costa Rica Zipline tour begins with a 10-minute ride up the hill aboard our specially designed 40 passenger tracker. Once at the top of the moutain we will start to descend" 250 | utter_zipline_tour_details: 251 | - 252 | buttons: 253 | - 254 | payload: /other_activities 255 | title: "Oher Activities" 256 | text: |- 257 | 🕛 Lenght of the tour: 2 hours 258 | 259 | 🌎 Location: 15 minute away from Jaco Beach 260 | 261 | Includes: transprotation round trip,safety equipment,experience guides and insured vechicles 262 | 263 | Recommendations: confortable clothing,sun glasses,camera and sun block 264 | 265 | 266 | 💵:$ 70 per person 267 | utter_add_trip: 268 | - text: "Well done,trip is added sucessfully" 269 | utter_contact: 270 | - text: "🕐 our office is open monday-friday 8 am- 5 pm , local costa rica time" 271 | utter_testimonials: 272 | - text: "We are so exited to share with these testimonials from our clients👇" 273 | utter_about: 274 | - text: "From vast stretches of Caribbean and pacific coastline, wild rainforest and wide open savannas, to imposing mountains,lush river valleys and beguiling cloud forests..." 275 | utter_costa_rica: 276 | - text: "...Costa Rica is a country that is as appealing to families and honeymooners as it is to luxery travelers and adventure seekers\nEven though Costa Rica is 8 degree above the equator, Costa Rica is much more 'tempreture' than most North American locations" 277 | utter_tips_tricks: 278 | - 279 | buttons: 280 | - 281 | payload: /tips_1 282 | title: "Tips1" 283 | - 284 | payload: /tips_2 285 | title: "Tips2" 286 | - 287 | payload: /tips_3 288 | title: "Tips3" 289 | text: "🏝️ Even though Costa Rica is one of the most popular and visited countries in Central America, 💡there are a few things many things travelers aren't aware" 290 | utter_tip1: 291 | - text: "🍛 Street food is the best food in Costa Rica, Costa Rican cuisine is delicious and some of the best eating spots are littile roadside local restaurents and 'sodas'" 292 | utter_tips2: 293 | - text: "🍀🍀 Costa Rica is considered the 'greenest' country in the world and it ranked first in the Happy Planet Index\n" 294 | utter_tips3: 295 | - text: "Costa Rica is very creative when its comes to driving. They usually pay no attention to traffic laws and drive like they are 'kings of the road'🚗\nIf you rent a car, you should know there are few or no street signs in most part of the country, so getting around will be a bit of a challenge" -------------------------------------------------------------------------------- /08_travel_agency_bot/src/endpoints.yml: -------------------------------------------------------------------------------- 1 | # This file contains the different endpoints your bot can use. 2 | 3 | # Server where the models are pulled from. 4 | # https://rasa.com/docs/rasa/user-guide/running-the-server/#fetching-models-from-a-server/ 5 | 6 | #models: 7 | # url: http://my-server.com/models/default_core@latest 8 | # wait_time_between_pulls: 10 # [optional](default: 100) 9 | 10 | # Server which runs your custom actions. 11 | # https://rasa.com/docs/rasa/core/actions/#custom-actions/ 12 | 13 | action_endpoint: 14 | url: "http://localhost:5055/webhook" 15 | 16 | # Tracker store which is used to store the conversations. 17 | # By default the conversations are stored in memory. 18 | # https://rasa.com/docs/rasa/api/tracker-stores/ 19 | 20 | #tracker_store: 21 | # type: redis 22 | # url: 23 | # port: 24 | # db: 25 | # password: 26 | # use_ssl: 27 | 28 | #tracker_store: 29 | # type: mongod 30 | # url: 31 | # db: 32 | # username: 33 | # password: 34 | 35 | # Event broker which all conversation events should be streamed to. 36 | # https://rasa.com/docs/rasa/api/event-brokers/ 37 | 38 | #event_broker: 39 | # url: localhost 40 | # username: username 41 | # password: password 42 | # queue: queue 43 | -------------------------------------------------------------------------------- /09_news_api/README.md: -------------------------------------------------------------------------------- 1 | # News Api Chatbot Template 2 | 3 | ### How to use it? 4 | Please follow the steps [as mentioned here](https://github.com/cedextech/Rasa-Chatbot-Templates/blob/master/README.md) 5 | 6 | ### Screenshots 7 | ![screenshot_1.png](screenshot_1.png)![screenshot_2.png](screenshot_2.png)![screenshot_3.png](screenshot_3.png)![screenshot_4.png](screenshot_4.png) 8 | -------------------------------------------------------------------------------- /09_news_api/compressed.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cedextech/rasa-chatbot-templates/074aadfc06dcffd63575a54285cbceae8c326ac5/09_news_api/compressed.zip -------------------------------------------------------------------------------- /09_news_api/screenshot_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cedextech/rasa-chatbot-templates/074aadfc06dcffd63575a54285cbceae8c326ac5/09_news_api/screenshot_1.png -------------------------------------------------------------------------------- /09_news_api/screenshot_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cedextech/rasa-chatbot-templates/074aadfc06dcffd63575a54285cbceae8c326ac5/09_news_api/screenshot_2.png -------------------------------------------------------------------------------- /09_news_api/screenshot_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cedextech/rasa-chatbot-templates/074aadfc06dcffd63575a54285cbceae8c326ac5/09_news_api/screenshot_3.png -------------------------------------------------------------------------------- /09_news_api/screenshot_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cedextech/rasa-chatbot-templates/074aadfc06dcffd63575a54285cbceae8c326ac5/09_news_api/screenshot_4.png -------------------------------------------------------------------------------- /09_news_api/src/actions.py: -------------------------------------------------------------------------------- 1 | from typing import Dict, Text, Any, List, Union, Optional 2 | 3 | from rasa_sdk import Tracker 4 | from rasa_sdk.executor import CollectingDispatcher 5 | 6 | from rasa_sdk import Action 7 | from rasa_sdk.forms import FormAction 8 | 9 | import requests 10 | from dotenv import load_dotenv 11 | from pathlib import Path 12 | import os 13 | env_path = Path('.') / '.env' 14 | load_dotenv(dotenv_path=env_path) 15 | '''os.getenv() used to read varibles from .env file''' 16 | urlcountry = os.getenv("url") 17 | apikey=os.getenv("apiKey") 18 | urlsource=os.getenv("urlsources") 19 | urltop=os.getenv("urltopic") 20 | 21 | 22 | 23 | 24 | def newsapi(country): 25 | """api call for getting top news hedline based on country """ 26 | urlnews=urlcountry 27 | url=urlnews+country 28 | urlapi=url+'&'+'apiKey=' 29 | urlcoun=urlapi+apikey 30 | response=requests.get(urlcoun) 31 | data=response.json() 32 | return data 33 | 34 | 35 | def sourcenews(source): 36 | """api call for getting hedlines from specific source""" 37 | urlnews=urlsource 38 | url=urlnews+source 39 | urlapi=url+'&'+'apiKey=' 40 | urlsour=urlapi+apikey 41 | response=requests.get(urlsour) 42 | data=response.json() 43 | return data 44 | 45 | def topicnews(topic): 46 | """api call for getting news based on specific topic""" 47 | urlnews=urltop 48 | url=urlnews+topic 49 | urlapi=url+'&'+'apiKey=' 50 | urlcoun=urlapi+apikey 51 | response=requests.get(urlcoun) 52 | data=response.json() 53 | return data 54 | 55 | 56 | 57 | 58 | class NewsBBc(Action): 59 | """example of custom action""" 60 | def name(self): 61 | """name of the custom action""" 62 | return "action_news_bbc" 63 | 64 | def run(self,dispatcher,tracker,domain): 65 | """disply news headlines from bbc news""" 66 | data=sourcenews("bbc-news") 67 | leng=len(data) 68 | for i in range(leng): 69 | gt = { 70 | "attachment": { 71 | "type": "template", 72 | "payload": { 73 | "template_type": "generic", 74 | "elements": [ 75 | { 76 | "title": data['articles'][i]['title'], 77 | "image_url":data['articles'][i]['urlToImage'], 78 | "subtitle": data['articles'][i]['description'], 79 | "buttons": [ 80 | { 81 | "type": "web_url", 82 | "url": data['articles'][i]['url'], 83 | "title": "Read More" 84 | }, 85 | ] 86 | }, 87 | ] 88 | } 89 | } 90 | } 91 | dispatcher.utter_custom_json(gt) 92 | return [] 93 | 94 | class NewsABC(Action): 95 | """example of custom action""" 96 | def name(self): 97 | """name of the custom action""" 98 | return "action_news_abc" 99 | 100 | def run(self,dispatcher,tracker,domain): 101 | """display news headlines from abc news""" 102 | data=sourcenews("abc-news") 103 | leng=len(data) 104 | for i in range(leng): 105 | gt = { 106 | "attachment": { 107 | "type": "template", 108 | "payload": { 109 | "template_type": "generic", 110 | "elements": [ 111 | { 112 | "title": data['articles'][i]['title'], 113 | "image_url":data['articles'][i]['urlToImage'], 114 | "subtitle": data['articles'][i]['description'], 115 | "buttons": [ 116 | { 117 | "type": "web_url", 118 | "url": data['articles'][i]['url'], 119 | "title": "Read More" 120 | }, 121 | ] 122 | }, 123 | ] 124 | } 125 | } 126 | } 127 | dispatcher.utter_custom_json(gt) 128 | return [] 129 | 130 | 131 | class NewsABC(Action): 132 | """example of custom action""" 133 | def name(self): 134 | """name of the custom action""" 135 | return "action_news_cnn" 136 | 137 | def run(self,dispatcher,tracker,domain): 138 | """display news headlines from cnn news""" 139 | data=sourcenews("cnn") 140 | leng=len(data) 141 | for i in range(leng): 142 | gt = { 143 | "attachment": { 144 | "type": "template", 145 | "payload": { 146 | "template_type": "generic", 147 | "elements": [ 148 | { 149 | "title": data['articles'][i]['title'], 150 | "image_url":data['articles'][i]['urlToImage'], 151 | "subtitle": data['articles'][i]['description'], 152 | "buttons": [ 153 | { 154 | "type": "web_url", 155 | "url": data['articles'][i]['url'], 156 | "title": "Read More" 157 | }, 158 | ] 159 | }, 160 | ] 161 | } 162 | } 163 | } 164 | dispatcher.utter_custom_json(gt) 165 | return [] 166 | class newsHeadlineus(Action): 167 | """example of custom action""" 168 | def name(self): 169 | """name of the custom action""" 170 | return "action_news_headline_us" 171 | 172 | def run(self,dispatcher,tracker,domain): 173 | """displaying news headlines of us""" 174 | data=newsapi("us") 175 | leng=len(data) 176 | for i in range(leng): 177 | gt = { 178 | "attachment": { 179 | "type": "template", 180 | "payload": { 181 | "template_type": "generic", 182 | "elements": [ 183 | { 184 | "title": data['articles'][i]['title'], 185 | "image_url":data['articles'][i]['urlToImage'], 186 | "subtitle": data['articles'][i]['description'], 187 | "buttons": [ 188 | { 189 | "type": "web_url", 190 | "url": data['articles'][i]['url'], 191 | "title": "Read More" 192 | }, 193 | ] 194 | }, 195 | ] 196 | } 197 | } 198 | } 199 | dispatcher.utter_custom_json(gt) 200 | return [] 201 | class NewsheadlineIndia(Action): 202 | """example of custom action""" 203 | def name(self): 204 | """name of the custom action""" 205 | return "action_news_headline_india" 206 | 207 | def run(self,dispatcher,tracker,domain): 208 | """displaying news headlines of india""" 209 | data=newsapi("in") 210 | leng=len(data) 211 | for i in range(leng): 212 | gt = { 213 | "attachment": { 214 | "type": "template", 215 | "payload": { 216 | "template_type": "generic", 217 | "elements": [ 218 | { 219 | "title": data['articles'][i]['title'], 220 | "image_url":data['articles'][i]['urlToImage'], 221 | "subtitle": data['articles'][i]['description'], 222 | "buttons": [ 223 | { 224 | "type": "web_url", 225 | "url": data['articles'][i]['url'], 226 | "title": "Read More" 227 | }, 228 | ] 229 | }, 230 | ] 231 | } 232 | } 233 | } 234 | dispatcher.utter_custom_json(gt) 235 | return [] 236 | 237 | class NewsHeadlineAustralia(Action): 238 | """example of custom action""" 239 | def name(self): 240 | """name of the custom action australia""" 241 | return "action_news_headline_au" 242 | 243 | def run(self,dispatcher,tracker,domain): 244 | """displaying news headlines of """ 245 | data=newsapi("au") 246 | leng=len(data) 247 | for i in range(leng): 248 | gt = { 249 | "attachment": { 250 | "type": "template", 251 | "payload": { 252 | "template_type": "generic", 253 | "elements": [ 254 | { 255 | "title": data['articles'][i]['title'], 256 | "image_url":data['articles'][i]['urlToImage'], 257 | "subtitle": data['articles'][i]['description'], 258 | "buttons": [ 259 | { 260 | "type": "web_url", 261 | "url": data['articles'][i]['url'], 262 | "title": "Read More" 263 | }, 264 | ] 265 | }, 266 | ] 267 | } 268 | } 269 | } 270 | dispatcher.utter_custom_json(gt) 271 | return [] 272 | class SearchForm(FormAction): 273 | """Example of a custom form action""" 274 | def name(self): 275 | """Unique identifier of the form""" 276 | return "search_form" 277 | 278 | def required_slots(self,tracker) -> List[Text]: 279 | """A list of required slots that the form has to fill""" 280 | return ["topic"] 281 | def slot_mappings(self) -> Dict[Text, Union[Dict, List[Dict]]]: 282 | """A dictionary to map required slots to 283 | - an extracted entity 284 | - intent: value pairs 285 | - a whole message 286 | or a list of them, where a first match will be picked""" 287 | return { 288 | "topic": [ 289 | self.from_text(), 290 | ], 291 | } 292 | def submit( 293 | self, 294 | dispatcher: CollectingDispatcher, 295 | tracker: Tracker, 296 | domain: Dict[Text, Any], 297 | ) -> List[Dict]: 298 | """Define what the form has to do 299 | after all required slots are filled"" 300 | dispatcher.utter_message("here is related news")""" 301 | return [] 302 | 303 | class NewsTopic(Action): 304 | def name(self): 305 | """name of the custom action""" 306 | return "action_news_search" 307 | 308 | def run(self,dispatcher,tracker,domain): 309 | """displaying news headlines based on specfic topic""" 310 | topics=tracker.get_slot("topic") 311 | data=topicnews(topics) 312 | leng=len(data) 313 | for i in range(leng): 314 | gt = { 315 | "attachment": { 316 | "type": "template", 317 | "payload": { 318 | "template_type": "generic", 319 | "elements": [ 320 | { 321 | "title": data['articles'][i]['title'], 322 | "image_url":data['articles'][i]['urlToImage'], 323 | "subtitle": data['articles'][i]['description'], 324 | "buttons": [ 325 | { 326 | "type": "web_url", 327 | "url": data['articles'][i]['url'], 328 | "title": "Read More" 329 | }, 330 | ] 331 | }, 332 | ] 333 | } 334 | } 335 | } 336 | dispatcher.utter_custom_json(gt) 337 | return [] -------------------------------------------------------------------------------- /09_news_api/src/config.yml: -------------------------------------------------------------------------------- 1 | # Configuration for Rasa NLU. 2 | # https://rasa.com/docs/rasa/nlu/components/ 3 | language: en 4 | pipeline: supervised_embeddings 5 | 6 | # Configuration for Rasa Core. 7 | # https://rasa.com/docs/rasa/core/policies/ 8 | policies: 9 | - name: MemoizationPolicy 10 | - name: KerasPolicy 11 | - name: MappingPolicy 12 | - name: FormPolicy 13 | -------------------------------------------------------------------------------- /09_news_api/src/data/nlu.md: -------------------------------------------------------------------------------- 1 | ## intent:greet 2 | - hey 3 | - hello 4 | - hi 5 | - good morning 6 | - good evening 7 | - hey there 8 | 9 | ## intent:news_headline 10 | - News Headline 11 | - news headline 12 | - News Headlines 13 | - news headlines 14 | 15 | ## intent:news_us 16 | - News Headline US 17 | - news headline us 18 | - us news headlines 19 | 20 | ## intent:news_india 21 | - News Headline India 22 | - news headline india 23 | - india news headline 24 | 25 | ## intent:news_australia 26 | - News Headline Australia 27 | - news headline Australia 28 | - Australia news headline 29 | 30 | ## intent:news_from_source 31 | - NEWS from Specefic Source 32 | - news from specefic source 33 | 34 | ## intent:bbc_news 35 | - BBC NEWS 36 | - bbc news 37 | - BBC news 38 | 39 | ## intent:abc_news 40 | - ABC NEWS 41 | - abc news 42 | - ABC news 43 | 44 | ## intent:cnn_news 45 | - CNN NEWS 46 | - cnn news 47 | 48 | ## intent:search_news 49 | - Search News 50 | - search news 51 | -------------------------------------------------------------------------------- /09_news_api/src/data/stories.md: -------------------------------------------------------------------------------- 1 | ## news_us 2 | * greet 3 | - utter_greet 4 | * news_headline 5 | - utter_newsheadline 6 | * news_us 7 | - action_news_headline_us 8 | 9 | ## news_india 10 | * greet 11 | - utter_greet 12 | * news_headline 13 | - utter_newsheadline 14 | * news_india 15 | - action_news_headline_india 16 | 17 | ## news_australia 18 | * greet 19 | - utter_greet 20 | * news_headline 21 | - utter_newsheadline 22 | * news_australia 23 | - action_news_headline_au 24 | 25 | ## bbc_news 26 | * greet 27 | - utter_greet 28 | * news_from_source 29 | - utter_newssource 30 | * bbc_news 31 | - action_news_bbc 32 | 33 | 34 | ## abc_news 35 | * greet 36 | - utter_greet 37 | * news_from_source 38 | - utter_newssource 39 | * abc_news 40 | - action_news_abc 41 | 42 | 43 | 44 | ## cnn_news 45 | * greet 46 | - utter_greet 47 | * news_from_source 48 | - utter_newssource 49 | * cnn_news 50 | - action_news_cnn 51 | 52 | ## search_news: 53 | * greet 54 | - utter_greet 55 | * search_news 56 | - search_form 57 | - action_news_search 58 | -------------------------------------------------------------------------------- /09_news_api/src/domain.yml: -------------------------------------------------------------------------------- 1 | intents: 2 | - greet 3 | - news_headline 4 | - bbc_news 5 | - news_us 6 | - news_india 7 | - news_australia 8 | - news_from_source 9 | - abc_news 10 | - cnn_news 11 | - search_news 12 | 13 | 14 | 15 | actions: 16 | - utter_greet 17 | - action_news_headline_us 18 | - action_news_bbc 19 | - utter_newsheadline 20 | - action_news_headline_india 21 | - action_news_headline_au 22 | - utter_newssource 23 | - action_news_abc 24 | - action_news_cnn 25 | - action_news_search 26 | 27 | forms: 28 | - search_form 29 | 30 | slots: 31 | topic: 32 | auto_fill: false 33 | type: unfeaturized 34 | 35 | templates: 36 | utter_greet: 37 | - 38 | buttons: 39 | - 40 | payload: /news_headline 41 | title: "News Headline" 42 | - 43 | payload: /news_from_source 44 | title: "NEWS from Specefic Source" 45 | - 46 | payload: /search_news 47 | title: "Search News" 48 | 49 | text: "Hi! To know about latest news please select an option" 50 | utter_newsheadline: 51 | - 52 | buttons: 53 | - 54 | payload: /news_us 55 | title: "News Headline US" 56 | - 57 | payload: /news_india 58 | title: "News Headline India" 59 | - 60 | payload: /news_australia 61 | title: "News Headline Australia" 62 | text: "Please select an option from below" 63 | utter_newssource: 64 | - 65 | buttons: 66 | - 67 | payload: /bbc_news 68 | title: "BBC NEWS" 69 | - 70 | payload: /abc_news 71 | title: "ABC NEWS" 72 | - 73 | payload: /cnn_news 74 | title: "CNN NEWS" 75 | text: "Please select an source from below" 76 | utter_ask_topic: 77 | - text: "Please enter a topic to search" 78 | 79 | -------------------------------------------------------------------------------- /09_news_api/src/endpoints.yml: -------------------------------------------------------------------------------- 1 | # This file contains the different endpoints your bot can use. 2 | 3 | # Server where the models are pulled from. 4 | # https://rasa.com/docs/rasa/user-guide/running-the-server/#fetching-models-from-a-server/ 5 | 6 | #models: 7 | # url: http://my-server.com/models/default_core@latest 8 | # wait_time_between_pulls: 10 # [optional](default: 100) 9 | 10 | # Server which runs your custom actions. 11 | # https://rasa.com/docs/rasa/core/actions/#custom-actions/ 12 | 13 | action_endpoint: 14 | url: "http://localhost:5055/webhook" 15 | 16 | # Tracker store which is used to store the conversations. 17 | # By default the conversations are stored in memory. 18 | # https://rasa.com/docs/rasa/api/tracker-stores/ 19 | 20 | #tracker_store: 21 | # type: redis 22 | # url: 23 | # port: 24 | # db: 25 | # password: 26 | # use_ssl: 27 | 28 | #tracker_store: 29 | # type: mongod 30 | # url: 31 | # db: 32 | # username: 33 | # password: 34 | 35 | # Event broker which all conversation events should be streamed to. 36 | # https://rasa.com/docs/rasa/api/event-brokers/ 37 | 38 | #event_broker: 39 | # url: localhost 40 | # username: username 41 | # password: password 42 | # queue: queue 43 | -------------------------------------------------------------------------------- /10_freshdesk_customer_support_bot/README.md: -------------------------------------------------------------------------------- 1 | # Freshdesk Customer Support Chatbot Template 2 | 3 | ### How to use it? 4 | Please follow the steps [as mentioned here](https://github.com/cedextech/Rasa-Chatbot-Templates/blob/master/README.md) 5 | 6 | ### Screenshots 7 | ![screenshot_1.png](screenshot_1.png)![screenshot_2.png](screenshot_2.png)![screenshot_3.png](screenshot_3.png)![screenshot_4.png](screenshot_4.png)![screenshot_5.png](screenshot_5.png)![screenshot_6.png](screenshot_6.png)![screenshot_7.png](screenshot_7.png)![screenshot_8.png](screenshot_8.png) 8 | -------------------------------------------------------------------------------- /10_freshdesk_customer_support_bot/compressed.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cedextech/rasa-chatbot-templates/074aadfc06dcffd63575a54285cbceae8c326ac5/10_freshdesk_customer_support_bot/compressed.zip -------------------------------------------------------------------------------- /10_freshdesk_customer_support_bot/screenshot_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cedextech/rasa-chatbot-templates/074aadfc06dcffd63575a54285cbceae8c326ac5/10_freshdesk_customer_support_bot/screenshot_1.png -------------------------------------------------------------------------------- /10_freshdesk_customer_support_bot/screenshot_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cedextech/rasa-chatbot-templates/074aadfc06dcffd63575a54285cbceae8c326ac5/10_freshdesk_customer_support_bot/screenshot_2.png -------------------------------------------------------------------------------- /10_freshdesk_customer_support_bot/screenshot_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cedextech/rasa-chatbot-templates/074aadfc06dcffd63575a54285cbceae8c326ac5/10_freshdesk_customer_support_bot/screenshot_3.png -------------------------------------------------------------------------------- /10_freshdesk_customer_support_bot/screenshot_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cedextech/rasa-chatbot-templates/074aadfc06dcffd63575a54285cbceae8c326ac5/10_freshdesk_customer_support_bot/screenshot_4.png -------------------------------------------------------------------------------- /10_freshdesk_customer_support_bot/screenshot_5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cedextech/rasa-chatbot-templates/074aadfc06dcffd63575a54285cbceae8c326ac5/10_freshdesk_customer_support_bot/screenshot_5.png -------------------------------------------------------------------------------- /10_freshdesk_customer_support_bot/screenshot_6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cedextech/rasa-chatbot-templates/074aadfc06dcffd63575a54285cbceae8c326ac5/10_freshdesk_customer_support_bot/screenshot_6.png -------------------------------------------------------------------------------- /10_freshdesk_customer_support_bot/screenshot_7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cedextech/rasa-chatbot-templates/074aadfc06dcffd63575a54285cbceae8c326ac5/10_freshdesk_customer_support_bot/screenshot_7.png -------------------------------------------------------------------------------- /10_freshdesk_customer_support_bot/screenshot_8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cedextech/rasa-chatbot-templates/074aadfc06dcffd63575a54285cbceae8c326ac5/10_freshdesk_customer_support_bot/screenshot_8.png -------------------------------------------------------------------------------- /10_freshdesk_customer_support_bot/src/actions.py: -------------------------------------------------------------------------------- 1 | from typing import Dict, Text, Any, List, Union, Optional 2 | 3 | from rasa_sdk import Tracker 4 | from rasa_sdk.executor import CollectingDispatcher 5 | 6 | from rasa_sdk import Action 7 | from rasa_sdk.forms import FormAction 8 | import json 9 | 10 | import requests 11 | from dotenv import load_dotenv 12 | from pathlib import Path 13 | import os 14 | env_path = Path('.') / '.env' 15 | load_dotenv(dotenv_path=env_path) 16 | '''os.getenv() used to read varibles from .env file''' 17 | ticket_url = os.getenv("all_tikcket_url") 18 | apikey=os.getenv("api_key") 19 | 20 | def show_all(): 21 | response = requests.get(ticket_url,auth=(apikey, 'X')) 22 | return response.json() 23 | class AllTickets(Action): 24 | """example of custom action""" 25 | def name(self): 26 | """name of the custom action""" 27 | return "action_all_tickets" 28 | 29 | def run(self,dispatcher,tracker,domain): 30 | """action for display all tickets in freshdesk""" 31 | data=show_all() 32 | leng=len(data) 33 | for i in range(leng): 34 | message=str((i+1))+'.'+data[i]['subject']+'\n'+'Created Date:'+data[i]['created_at'] 35 | dispatcher.utter_message(message) 36 | def CreateTicket(description,subject,email,priority,status): 37 | """api call for create aticket in freshdesk help desk""" 38 | headers = { 39 | 'Content-Type': 'application/json', 40 | } 41 | 42 | data = { "description": description, "subject": subject, "email": email, "priority": priority, "status": status} 43 | json_data=json.dumps(data); 44 | 45 | response = requests.post(ticket_url, headers=headers, data=json_data, auth=(apikey, 'X')) 46 | 47 | return response 48 | class createTicketForm(FormAction): 49 | """Example of a custom form action""" 50 | def name(self): 51 | """Unique identifier of the form""" 52 | return "create_ticket_form" 53 | 54 | def required_slots(self,tracker) -> List[Text]: 55 | """A list of required slots that the form has to fill""" 56 | return ["description","subject","email","priority","status"] 57 | def slot_mappings(self) -> Dict[Text,Union[Dict, List[Dict]]]: 58 | """A dictionary to map required slots to 59 | - an extracted entity 60 | - intent: value pairs 61 | - a whole message 62 | or a list of them, where a first match will be picked""" 63 | 64 | 65 | return { 66 | "description": [ 67 | self.from_text(), 68 | ], 69 | "subject": [ 70 | self.from_text(), 71 | ], 72 | "email": [ 73 | self.from_text(), 74 | ], 75 | "priority": [ 76 | self.from_text(), 77 | ], 78 | "status": [ 79 | self.from_text(), 80 | ], 81 | 82 | 83 | } 84 | def submit( 85 | self, 86 | dispatcher: CollectingDispatcher, 87 | tracker: Tracker, 88 | domain: Dict[Text, Any], 89 | ) -> List[Dict]: 90 | """Define what the form has to do 91 | after all required slots are filled""" 92 | dispatcher.utter_message("Your ticket creation status in freshdesk") 93 | return [] 94 | 95 | class CreatenewTicket(Action): 96 | """example of custom action""" 97 | def name(self): 98 | """name of the custom action""" 99 | return "action_create_tickets" 100 | def run(self,dispatcher,tracker,domain): 101 | """action for create ticket in freshdesk""" 102 | descri=tracker.get_slot("description") 103 | sub=tracker.get_slot("subject") 104 | email=tracker.get_slot("email") 105 | prio=tracker.get_slot("priority") 106 | sta=tracker.get_slot("status") 107 | priority_type=int(prio) 108 | status_code=int(sta) 109 | data=CreateTicket(descri,sub,email,priority_type,status_code) 110 | if(data.status_code==201): 111 | dispatcher.utter_message('The ticket is sucessfully created in freshdesk') 112 | else: 113 | dispatcher.utter_message('Something bad happend while ticket creation') 114 | 115 | class UpdateTicket(Action): 116 | """example of custom action""" 117 | def name(self): 118 | """name of the custom action""" 119 | return "action_update_tickets" 120 | def run(self,dispatcher,tracker,domain): 121 | data=show_all() 122 | leng=len(data) 123 | dispatcher.utter_message("Here is your Ticket details") 124 | for i in range(leng): 125 | message="Ticket Id:"+str(data[i]['id'])+"\n"+"Ticket Subject:"+data[i]['subject'] 126 | dispatcher.utter_message(message) 127 | 128 | class updateTicketForm(FormAction): 129 | """Example of a custom form action""" 130 | def name(self): 131 | """Unique identifier of the form""" 132 | return "update_ticket_form" 133 | 134 | def required_slots(self,tracker) -> List[Text]: 135 | """A list of required slots that the form has to fill""" 136 | return ["priority-up","status-up","ticket_id"] 137 | def slot_mappings(self) -> Dict[Text,Union[Dict, List[Dict]]]: 138 | """A dictionary to map required slots to 139 | - an extracted entity 140 | - intent: value pairs 141 | - a whole message 142 | or a list of them, where a first match will be picked""" 143 | 144 | 145 | return { 146 | "priority-up": [ 147 | self.from_text(), 148 | ], 149 | "status-up": [ 150 | self.from_text(), 151 | ], 152 | "ticket_id": [ 153 | self.from_text(), 154 | ], 155 | 156 | 157 | } 158 | def submit( 159 | self, 160 | dispatcher: CollectingDispatcher, 161 | tracker: Tracker, 162 | domain: Dict[Text, Any], 163 | ) -> List[Dict]: 164 | """Define what the form has to do 165 | after all required slots are filled""" 166 | dispatcher.utter_message("Here is the update information") 167 | return [] 168 | def updateticket(ticket,priority,status): 169 | """api call for update a tiket in freshdesk""" 170 | headers = { 171 | 'Content-Type': 'application/json', 172 | } 173 | data = { "priority": priority, "status": status } 174 | json_data=json.dumps(data); 175 | url=ticket_url+'/'+str(ticket) 176 | 177 | response = requests.put(url, headers=headers, data=json_data, auth=(apikey, 'X')) 178 | return response 179 | 180 | class UpdatedTicket(Action): 181 | """example of custom action""" 182 | def name(self): 183 | """name of the custom action""" 184 | return "action_updatedtickets" 185 | def run(self,dispatcher,tracker,domain): 186 | """action for update ticket in freshdesk""" 187 | tick=tracker.get_slot("ticket_id") 188 | prio=tracker.get_slot("priority-up") 189 | sta=tracker.get_slot("status-up") 190 | priority_type=int(prio) 191 | status_code=int(sta) 192 | data=updateticket(tick,priority_type,status_code) 193 | if(data.status_code==200): 194 | dispatcher.utter_message('The ticket is sucessfully updated in freshdesk') 195 | else: 196 | dispatcher.utter_message('Something bad happend while ticket updation') 197 | -------------------------------------------------------------------------------- /10_freshdesk_customer_support_bot/src/config.yml: -------------------------------------------------------------------------------- 1 | # Configuration for Rasa NLU. 2 | # https://rasa.com/docs/rasa/nlu/components/ 3 | language: en 4 | pipeline: supervised_embeddings 5 | 6 | # Configuration for Rasa Core. 7 | # https://rasa.com/docs/rasa/core/policies/ 8 | policies: 9 | - name: MemoizationPolicy 10 | - name: KerasPolicy 11 | - name: MappingPolicy 12 | - name: FormPolicy 13 | 14 | -------------------------------------------------------------------------------- /10_freshdesk_customer_support_bot/src/data/nlu.md: -------------------------------------------------------------------------------- 1 | ## intent:greet 2 | - hey 3 | - hello 4 | - hi 5 | - good morning 6 | - good evening 7 | - hey there 8 | 9 | ## intent: show_all_tickets 10 | - Show All Tickets 11 | - show all tickets 12 | - SHOW ALL TICKETS 13 | 14 | ## intent: create_ticket 15 | - Create Tickets 16 | - create tickets 17 | 18 | ## intent: update_ticket 19 | - Update Ticket 20 | - update ticket 21 | 22 | -------------------------------------------------------------------------------- /10_freshdesk_customer_support_bot/src/data/stories.md: -------------------------------------------------------------------------------- 1 | ## show all tickets 2 | * greet 3 | - utter_greet 4 | * show_all_tickets 5 | - action_all_tickets 6 | 7 | ## create tickets 8 | * greet 9 | - utter_greet 10 | * create_ticket 11 | - create_ticket_form 12 | - form{"name":"create_ticket_form"} 13 | - form{"name":"null"} 14 | - action_create_tickets 15 | 16 | ## update ticket 17 | * greet 18 | - utter_greet 19 | * update_ticket 20 | - action_update_tickets 21 | - update_ticket_form 22 | - action_updatedtickets -------------------------------------------------------------------------------- /10_freshdesk_customer_support_bot/src/domain.yml: -------------------------------------------------------------------------------- 1 | --- 2 | actions: 3 | - utter_greet 4 | - action_all_tickets 5 | - action_create_tickets 6 | - action_update_tickets 7 | - action_updatedtickets 8 | forms: 9 | - create_ticket_form 10 | - update_ticket_form 11 | intents: 12 | - greet 13 | - show_all_tickets 14 | - create_ticket 15 | - update_ticket 16 | slots: 17 | description: 18 | auto_fill: false 19 | type: unfeaturized 20 | email: 21 | auto_fill: false 22 | type: unfeaturized 23 | priority: 24 | auto_fill: false 25 | type: unfeaturized 26 | priority-up: 27 | auto_fill: false 28 | type: unfeaturized 29 | status: 30 | auto_fill: false 31 | type: unfeaturized 32 | status-up: 33 | auto_fill: false 34 | type: unfeaturized 35 | subject: 36 | auto_fill: false 37 | type: unfeaturized 38 | ticket_id: 39 | auto_fill: false 40 | type: unfeaturized 41 | templates: 42 | utter_ask_description: 43 | - 44 | text: "Please provide description to your ticket" 45 | utter_ask_email: 46 | - 47 | text: "Email address of the requester. If no contact exists with this email address in Freshdesk, it will be added as a new contact." 48 | utter_ask_priority: 49 | - 50 | buttons: 51 | - 52 | payload: 1 53 | title: "Low " 54 | - 55 | payload: 3 56 | title: High 57 | - 58 | payload: 4 59 | title: Urgent 60 | text: "Priority of the ticket" 61 | utter_ask_priority-up: 62 | - 63 | buttons: 64 | - 65 | payload: 1 66 | title: "Low " 67 | - 68 | payload: 3 69 | title: High 70 | - 71 | payload: 4 72 | title: Urgent 73 | text: "Please select a priority to update" 74 | utter_ask_status: 75 | - 76 | buttons: 77 | - 78 | payload: 2 79 | title: "Open " 80 | - 81 | payload: 3 82 | title: Pending 83 | - 84 | payload: 5 85 | title: Closed 86 | text: "Status of the ticket" 87 | utter_ask_status-up: 88 | - 89 | buttons: 90 | - 91 | payload: 2 92 | title: "Open " 93 | - 94 | payload: 3 95 | title: Pending 96 | - 97 | payload: 5 98 | title: Closed 99 | text: "Please select a status to update" 100 | utter_ask_subject: 101 | - 102 | text: "subject of ticket" 103 | utter_greet: 104 | - 105 | buttons: 106 | - 107 | payload: /show_all_tickets 108 | title: "Show All Tickets " 109 | - 110 | payload: /create_ticket 111 | title: "Create Tickets" 112 | - 113 | payload: /update_ticket 114 | title: "Update Tickets" 115 | text: "Hey! I am avirtual assistant. I can help you with Ticket Creation, Update Ticket, Show All Tickets in Freshdesk(Help Desk)" 116 | utter_ask_ticket_id: 117 | - 118 | text: "Please enter ticket id " 119 | -------------------------------------------------------------------------------- /10_freshdesk_customer_support_bot/src/endpoints.yml: -------------------------------------------------------------------------------- 1 | # This file contains the different endpoints your bot can use. 2 | 3 | # Server where the models are pulled from. 4 | # https://rasa.com/docs/rasa/user-guide/running-the-server/#fetching-models-from-a-server/ 5 | 6 | #models: 7 | # url: http://my-server.com/models/default_core@latest 8 | # wait_time_between_pulls: 10 # [optional](default: 100) 9 | 10 | # Server which runs your custom actions. 11 | # https://rasa.com/docs/rasa/core/actions/#custom-actions/ 12 | 13 | action_endpoint: 14 | url: "http://localhost:5055/webhook" 15 | 16 | # Tracker store which is used to store the conversations. 17 | # By default the conversations are stored in memory. 18 | # https://rasa.com/docs/rasa/api/tracker-stores/ 19 | 20 | #tracker_store: 21 | # type: redis 22 | # url: 23 | # port: 24 | # db: 25 | # password: 26 | # use_ssl: 27 | 28 | #tracker_store: 29 | # type: mongod 30 | # url: 31 | # db: 32 | # username: 33 | # password: 34 | 35 | # Event broker which all conversation events should be streamed to. 36 | # https://rasa.com/docs/rasa/api/event-brokers/ 37 | 38 | #event_broker: 39 | # url: localhost 40 | # username: username 41 | # password: password 42 | # queue: queue 43 | -------------------------------------------------------------------------------- /10_freshdesk_customer_support_bot/src/env: -------------------------------------------------------------------------------- 1 | all_tikcket_url="https://yourdomain.freshdesk.com/api/v2/tickets" 2 | api_key=yourapikey 3 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 Cedex Technologies LLP 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Rasa Chatbot Templates 2 | 3 |

4 | 5 | ### Introduction 6 | A collection of boilerplate templates for different chatbot usecases on RASA platform. 7 | 8 | ### Installation & Configuration 9 | Here are the simple steps that you can follow to use a template: 10 | * Install RASA https://rasa.com/docs/rasa-x/installation-and-setup/ 11 | * Create a `project_directory` for your project 12 | * initialize RASA within your `project_directory` by running command `rasa init` 13 | * Replace the files in the `project_directory` with the ones from downloaded template 14 | * Train the bot with command `rasa train` 15 | * Evaluate the bot in terminal with command `rasa test` 16 | * OPTIONAL: If you find a file called `actions.py` in your template directory, run this command in a new terminal `rasa run actions` 17 | * Start talking to the bot in terminal with command `rasa shell` 18 | 19 | ### Important 20 | Being boilerplates, the bots does contain minimal training data for `stories` just enough to structure the conversation skeleton. Please don't forget to improve the conversations with `rasa interactive` command. 21 | 22 | ### Templates 23 | - **[Smalltalk](https://github.com/cedextech/Rasa-Chatbot-Templates/tree/master/01_smalltalk_bot)** 24 | - **[Lead Generation](https://github.com/cedextech/Rasa-Chatbot-Templates/tree/master/02_lead_bot)** 25 | - **[Real Estate](https://github.com/cedextech/Rasa-Chatbot-Templates/tree/master/03_real_estate_bot)** 26 | - **[Feedback Collection](https://github.com/cedextech/Rasa-Chatbot-Templates/tree/master/04_feedback_bot)** 27 | - **[Event Concierge](https://github.com/cedextech/Rasa-Chatbot-Templates/tree/master/05_event_bot)** 28 | - **[Hotel](https://github.com/cedextech/Rasa-Chatbot-Templates/tree/master/06_hotel_bot)** 29 | - **[Survey](https://github.com/cedextech/Rasa-Chatbot-Templates/tree/master/07_survey_bot)** 30 | - **[Travel Agency](https://github.com/cedextech/Rasa-Chatbot-Templates/tree/master/08_travel_agency_bot)** 31 | - **[News with API](https://github.com/cedextech/rasa-chatbot-templates/tree/master/09_news_api)** 32 | - **[Freshdesk API for Customer Support](https://github.com/cedextech/rasa-chatbot-templates/tree/master/10_freshdesk_customer_support_bot)** 33 | 34 | ### Contributing 35 | Feel free to dive in! Open an issue or submit PRs. 36 | -------------------------------------------------------------------------------- /_config.yml: -------------------------------------------------------------------------------- 1 | theme: jekyll-theme-cayman --------------------------------------------------------------------------------