Repo for API server of swedenmentor.github.io, a chatbot for international students in Sweden. This is a Retrieval Augmented Generation (RAG) application. It uses the data from skatteverket.se, migrationverket.se, studyinsweden.se
4
stars
227
commits
Python
primary language
Nov 29, 2023
updated
Demo: swedenmentor.github.io
Frontend repo: Link

conda create --name rag python=3.10 -y
conda activate rag
sudo apt-get install python3-pip
pip install -r requirements.txt
Rename .env.example to .env and provide the corresponding API keys.
sh build_knowledge.sh
sh serve.sh
The server runs at localhost:8000. From browser, go to localhost:8000/q, you should see It is working.
Replace the following occurences of _SITE_ with the intended domain.
Point api._SITE_ to server IP. Open port 8000 for TCP requests.
api._SITE_sudo apt install nginx
sudo apt install certbot python3-certbot-nginx
sudo certbot --nginx -d api._SITE_
sudo certbot renew --dry-run
cp /etc/letsencrypt/live/api._SITE_/fullchain.pem cert.pem
cp /etc/letsencrypt/live/api._SITE_/privkey.pem key.pem
The frontend server should also have SSL certificate.
sudo apt install software-properties-common -y
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt update
sudo apt install python3.10
sudo apt install python3-pip
pip install -r requirements.txt
sh build_knowledge.sh
sh serve.sh
Python
93.5%
Jupyter Notebook
6.0%
Repo for API server of swedenmentor.github.io, a chatbot for international students in Sweden. This is a Retrieval Augmented Generation (RAG) application. It uses the data from skatteverket.se, migrationverket.se, studyinsweden.se
4
stars
227
commits
Python
primary language
Nov 29, 2023
updated
Demo: swedenmentor.github.io
Frontend repo: Link

conda create --name rag python=3.10 -y
conda activate rag
sudo apt-get install python3-pip
pip install -r requirements.txt
Rename .env.example to .env and provide the corresponding API keys.
sh build_knowledge.sh
sh serve.sh
The server runs at localhost:8000. From browser, go to localhost:8000/q, you should see It is working.
Replace the following occurences of _SITE_ with the intended domain.
Point api._SITE_ to server IP. Open port 8000 for TCP requests.
api._SITE_sudo apt install nginx
sudo apt install certbot python3-certbot-nginx
sudo certbot --nginx -d api._SITE_
sudo certbot renew --dry-run
cp /etc/letsencrypt/live/api._SITE_/fullchain.pem cert.pem
cp /etc/letsencrypt/live/api._SITE_/privkey.pem key.pem
The frontend server should also have SSL certificate.
sudo apt install software-properties-common -y
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt update
sudo apt install python3.10
sudo apt install python3-pip
pip install -r requirements.txt
sh build_knowledge.sh
sh serve.sh
Python
93.5%
Jupyter Notebook
6.0%