An open API service indexing awesome lists of open source software.

https://github.com/kmanadkat/rasa-wellness-bot

Rasa Wellness Form Chatbot
https://github.com/kmanadkat/rasa-wellness-bot

chatbot rasa rasa-chatbot

Last synced: 4 months ago
JSON representation

Rasa Wellness Form Chatbot

Awesome Lists containing this project

README

          

# Wellness Check Rasa ChatBot
[![Python](https://img.shields.io/badge/Python-3.7.9-blue.svg?style=?style=flat-square&logo=python)](https://www.python.org/downloads/release/python-379)
[![Rasa](https://img.shields.io/badge/Rasa%20Open%20Source-2.4.3-purple.svg?style=flat-square)](https://rasa.com/docs/rasa/)

This is rasa based chatbot. User is asked several health related questions and at the end the logs are shared back to the user. This project demonstrates how easy it is to create NLP based chatbots with rasa opensource sdk. It mainly consists of a Form and Custom Actions. A beginner friendly scope was kept so that any one looking for getting started, could refer this.

[Demo](https://kmanadkat.github.io/rasa-wellness-bot/)

## Setup and Installation
It is recommended to use Python 3.6 or Python 3.7 with rasa framework. Below are the steps to run this project.

1. Clone master branch of this repository & open root directory in terminal.
2. Create virtual env with python: `python3.7 -m venv ./venv` and activate it by `source ./venv/bin/activate`
3. Install rasa `pip install rasa`, with this you can now run rasa commands described below.

### Generating Trained Model
Make sure python virtual env is active in terminal. Change directory to `backend` & run rasa train like below. After training is done, you will find `models` directory at `backend/models` this is the result of rasa NLU training & rasa Core training.

```shell
cd backend
rasa train
```

### Running Actions Server
After training is done, you need to run server to serve custom actions related computation. Open another terminal instance, activate virtual env and open `backend` directory.

```shell
rasa run actions
```

### Running Rasa Chatbot in Shell
Below command loads the trained model, opens communication to custom actions running server & provides REPL to interact with chatbot.

```shell
rasa shell
```

Once you have developed your bot and you are ready to integrate the bot with the UI, you can start the Rasa server using the below command
```shell
rasa run -m models --enable-api --cors "*" --debug
```

If you have custom actions, you can start the action server using the below command
```shell
rasa run actions --cors "*" --debug
```
Once you have you Rasa server up and running, you can test the bot by running the index.html file in the browser.

## Chatbot Screenshots

**rasa train**

01 rasa-train-success

**rasa run actions**

02 rasa-run-actions-success

**rasa shell - happy flow 1 - affirmed for exercise**

03 rasa-shell-happy-flow

**rasa shell - happy flow 2 - denied for exercise**

04 rasa-shell-happy-flow-no-exercise

**rasa shell - sad flow 1 - going out of scope & coming back**

05 rasa-shell-sad-path-1

**rasa shell - sad flow 2 - going out of scope & denied to proceed**

06 rasa-shell-sad-path-2