This system allows users to create and comunicate with the chatbots through chat and voice and video channels. It was developed using the RASA framework and has a custom API developed with FAST-API. The created chatbots uses a Whisper model for audio synthesis.
- In DOC folder is hosted my thesis and some helpful documents to this proyect.
- In sgav folder we have the frontend code of the Virtual Assistants Management System
- In Web folder we have the code of a chat interface, for users to prove the created asistants using text, voice and video channels
- Software Python 3.10 version or later node js 18 version or later visual studio code or pycharm editors docker (This is optional if you have mongodb alredy installed natively in your pc) mongodb 4 version or later
- Hardware 6GB ram minimun CPU with 2 cores minimun GPU (this is optional but it helps a lot when you are using LLMs locally, they perform better with GPU) Storage 15 GB aproximately, can change according to the llm that you are using
You can try this algorithm in google collab using this Notebook have in count that you have to upload a pdf file and specify the location of the file in google collab
The installation process has 3 important steps
- Backend setup
- Frontend setup
First of all you need a LLM alredy downloaded, when you have one, put it on sgav_backend folder and change model path in sgav_backend/models/llm.py
Then we have to install the database in this case MongoDB, you can use the docker-compose.yml
Important
If you are using docker in a blocked country you should see this article for using it without any problems docker a lo cubano
Starting the service in detached mode, this is useful for querying the db using mongosh
docker-compose up -d
Note
Db credentials Username: root Password: root
note: You can change credentials config in docker-compose.yml
If you want to down the docker container service you have to use this command
docker-compose down
Next we need to install the python deps
- We have to change the current dir
cd sgav_backend/
-
This is an optional step but is a good practice to create a virtual environment to this dependencies see pip or conda documentation to do this and then follow the steps
-
install deps
Note
If you are using Windows comment this lines in the requirements.txt: uvloop==0.19.0 triton==2.1.0 then execute the following command
pip install -r requirements.txt
- Set up your env variables If you not change anything in docker compose your credentials have to look like this
DB_USER="root"
DB_PASSWORD="root"
DB_HOST="localhost"
DB_PORT="27017"
DB_NAME="sgav"
- run server with the following command
python main.py
We have to move to the project directory
cd sgav
Then to install the dependencies execute the command this command can change depending on what node package manager you are using i.e: yarn, bun or pnpm see the oficial documentation of theese package managers for more info
npm install
in sgav folder
Then to run the proyect we can run the following command if you are using npm:
npm run dev
Important
A very important consideration is when you download a created assistant it comes with a docker-compose file that allows you to build an image an run all the services of the container in order to use it without worrying about installing deps and stuff.
In this rar file is an aproach to achieve it.