This repository contains the code for the tutorial over at Medium. The tutorial covers how to make a chabot which can answer questions from users through the command line, much like Amazon Alexa or Google Assistant. Rasa is used as the conversational AI framework and Fetchable is used as the source of information.
Some of the code was omitted in the tutorial for brevity, but is included here.
As per the tutorial, you can install Rasa with:
$ pip3 install rasa
$ pip3 install rasa_sdk
the language model with:
$ pip3 install rasa[spacy]
$ python3 -m spacy download en_core_web_md
$ python3 -m spacy link en_core_web_md en
and the Fetchable Python client-side SDK with:
$ pip3 install fetchable
You'll also need to # for a Fetchable account, download your API keys and export an environment variable with the absolute path to the file containing them with:
$ export FETCHABLE_AUTH_FILE=/path/to/fetchable_auth_keys.json
Assuming you have the requirements installed - if you would like to run the code without going through the tutorial and building it from scratch run the following commands:
- Train the chatbot:
$ rasa train
- Launch the action server:
$ rasa run actions
- Launch the chatbot in a different terminal:
$ rasa shell --endpoint endpoints.yml
Licensed under Apache Version 2.0.
See the LICENSE file for more information.