A chatbot that answers OpenStreetMap related queries. It is powered by Rasa Open Source.
🙌 🙌 Now OSM Chatbot is also integrated on OSM Nepal Tasking Manager .
Have a look at our blog post: https://blog.kathmandulivinglabs.org/introducing-a-new-member-to-the-openstreetmap-community/
Have a conversation with chatbot at: https://www.facebook.com/osmchatbot
Contributions are always welcome!
To contribute to this project you can add/update Natural Language Understanding Data and bot responses.
Clone this project
git clone https://github.com/KathmanduLivingLabs/OSM-chatbot.gitGo to the project directory
cd OSM-chatbotRasa Open Source uses YAML as a unified and extendable way to manage all training data, including NLU data, stories and rules. You can split the training data over any number of YAML files, and each file can contain any combination of NLU(Natural Language Understanding) data, stories, and rules. The training data parser determines the training data type using top level keys.
To add training data you must have to add intent on one of the nlu files inside data folder. For example if i want to add chatbot support for iD editor info:
- Open faq.yml located inside data folder
- Add intent as
faq/iDeditor_infowherefaqis our retrieval intent. What is retreival intent? - Add at least 5 examples for this intent. This is where our model learns to predict user intent (e.g. What is iDeditor?)
- Add response for this intent on
responses.ymlpresent inside/data/resposnesand ondomain.ymlfile.
Clone the project
git clone https://github.com/KathmanduLivingLabs/OSM-chatbot.gitGo to the project directory
cd OSM-chatbotCreate virtual environment
python3 -m venv ./venvActivate environment
source venv/bin/activateInstall dependencies
pip install -r requirements.txtTo train model
rasa trainTo chat with bot on command line
rasa shellTo start rasa server
rasa runor to run rasa with api enabled
rasa run --enable-apiCustom action server are required to fetch dynamic response from api's or web scrapping. We have used custom actions to fetch user statistics and tag information in this project.
To run custom action server
cd actions
pip install -r requirements.txt
rasa run actionsTo run on interactive mode on web browser:
- Make sure you have RasaX installed on your environment, Then run
rasa x- Currently the chatbot only supports English language, we want to extend its support for as many languages as possible.
- This chatbot model is trained on a very limited set of training data. We want to add support for more user queries.
- We want to add support for more OSM tools like running an Overpass query in natural language through chatbot, generating before-after maps, connecting users to local OSM-communities by accessing their location and others.