[Twitch Stream] Building a Meetup chatbot using Rasa Stack
In release 0.12, Rasa introduced a new TensorFlow-based pipeline for NLU models. This repository contains the code which was used during our Twitch live coding stream on 28/06/2018. During the stream we built a Meetup chatbot, capable of recommending meetups to attend, make RSVPs for the events and recommend public transport routes to get to the venue. The goal of building this chatbot is to demonstrate how we can use Rasa NLU TensorFlow pipeline to build intelligent chatbots which can understand multiple intents per input. The recording of the stream can be found here.
User: Hello.
Bot: Hey, how can I help you?
User: I am new to London and I am looking for fitness meetups to attend. Any suggestions?
Bot: Sure. There is a 'Tennis in Central London' meetup happening in London. They are having an event 'Social Tennis' on 2018-07-05. Would you like to join the meetup?
User: Yes, please.
Bot: Done! You have joined the meetup. Would you like to attend their nearest event?
User: Yes. Can you also tell me how can I get to the venue from Baker Street?
Bot: All done. I have booked you a spot at 'Social Tennis' which is happening on 2018-07-05. Here are the directions for getting to the venue using a public transport: Walk to Baker Street Underground. Catch a Bakerloo line to Piccadilly Circus. Change to Piccadilly line to Knightsbridge. Walk to Hyde Park.
User: Thanks a lot! Goodbye.
Bot: You are very welcome!
Bot: Bye bye.
The chatbot includes live data APIs. In order to access the data yourself, you will need to get the API keys and store them as environmental variables. Below are instructions on how to do it:
-
Meetup API:
- Get the API key here
- Copy the key, open your command line and execute:
- Ubuntu and Mac OS:
export MEETUP_KEY=*your_api_key*
- Windows:
set MEETUP_KEY=*your_api_key*
- Ubuntu and Mac OS:
-
Google Directions API:
- Get the API key by following the instructions written in a section Activate the API and get an API key
- Copy the key and in your command line execute:
- Ubuntu and Mac OS:
export GOOGLE_KEY=*your_api_key*
- Windows:
set GOOGLE_KEY=*your_api_key*
- Ubuntu and Mac OS:
Versions of the software used in this tutorial:
- Python 3.6
- Rasa NLU 0.12.3
- Rasa Core 0.9.6
How to use this repository:
- Clone or download the repository and install Rasa NLU and Rasa Core:
pip install -r requirements.txt
- Install a spacy language model:
python -m spacy download en
-
Watch the stream and implement a bot from scratch by using the code inside the directory called 'Stream_Code'.
-
You can load and chat with the bot at any time by executing the following command inside the main directory of this repository (don't forget to set the API keys):
python -m rasa_core.run -d models/current/dialogue -u models/current/nlu_model
Useful resources:
- Rasa NLU installation - guidelines on how to install Rasa NLU.
- Rasa Core installation - guidelines on how to install Rasa Core.
- Supervised Word Vectors from Scratch in Rasa NLU - Rasa blog post on the new TensorFlow pipeline.
- How to handle multiple intents per input using Rasa NLU TensorFlow pipeline - A step-by-step tutorial on how to build chatbots using Rasa NLU TensorFlow pipeline.
- Docs: Processing Pipeline - Official Rasa documentation on processing pipelines.
- Rasa NLU Gitter and Rasa Core Gitter - Places where Rasa community hangs out.