A bot for enviroCar android application part of Google Summer of Code 2022 project: voice command.
Before installation, please make sure you have already installed the following tool:
pip install pipenv
We will use pipenv to easily manage and setup a working environment.
Once you have cloned the project follow these steps to install:
- Initialize a virtual environment and install dependencies via use pipenv
cd envirocar-rasa-bot
pipenv install
- Train bot
rasa train
- Test bot on terminal
rasa shell
- start
rasa serverand test locally
rasa run --enable-api --port 5005
- start
rasa serverto use the custom channels
rasa run --credentials credentials.yml --enable-api --port 5005
- start
actionsserver
rasa run actions -p 5055
Once the server is up and running, test the bot directly via postman
Here's a blog to explore the rasa apis with postman
But here are some of the common apis to use:
- Testing the bot
Send aPOSTrequest to a particular channel http://localhost:5005/webhooks/<channel_name>/webhook with the body. This project provides 2 channels.
a.restchannel
This Channel is given by the rasa itself, and we cannot add extra functionalities to it. E.g. We cannot send extra data likemetadatain the request.
b.envirocarchannel
This Channel is a custom channel created to use the extra functionalities and send extra data likemetadataor somecredentialsin the request.
Learn more about the Custom Channels from here
{
"message": <your message>
}
- Check rasa version
A
GETrequest to http://localhost:5005/version without the body.
You could also explore the apis with postman via video.