Skip to content

think-ke/mpsr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 

Repository files navigation

MPSR Bot

This project is for the MPSR project.

Setup

First, create a virtual environment by either running

python -m venv venv

or

going to VS Code and opening the command palette(Ctrl+shift+P) then typing Python: Create Environment to search and then select the command. You may then select Venv or Conda.

Second, do an installation:

pip install rasa

Third, run a rasa initialization by

rasa init

this should be in the(root) folder you would like your rasa project to be.

now, you can

rasa shell

and see how the chatbot does.

b)Existing projects

Note

If you haven't set up your ssh keys, follow this.

First, clone the said repo, for this case,

git clone git@github.com:think-ke/mpsr.git

then create a virtual environment by

python -m venv venv

or

going to VS Code and opening the command palette(Ctrl+shift+P) then typing Python: Create Environment to search and then select the command. You may then select Venv or Conda.

Second, do a rasa installation in your root folder of said project. I am assuming pip is already installed, if not, follow this.

Thirdly, begin chatting with your bot by:

rasa shell

Django Folders

For this, you have to run the command pip install django

then, to create your project run django-admin startproject mysite e.g, for this project:

django-admin startproject chatui

For more on Django, follow this.

For Testing

On the script.js, you change the url from whatever it is to your local host one or what rasa is running on. For my case, I changed it to

'http://127.0.0.1:5005/webhooks/rest/webhook

For the local testing, make sure you run two seperate instances for django, and for rasa.

python manage.py runserver

rasa run --enable-api --cors "*"

Make sure you run those commands on the said projects location. For my case, I ran them on:

(.venv) D:\think\mpsr\bot-mpsr>

and

(.venv) D:\think\mpsr\chatui>

respectively.

Deploying

To do this, follow the commands in the start_rasa.sh file, and the Dockerfile too. Additionally, this document might help.

Note:

Always run project(s) in a virtual environment for easy installation of (needed) packages/dependencies.