Live at: 💸 banqstream.com
This is an attempt to create a finance/budgeting assistant. This will be using LLMs to parse raw text coming from account statements and feeding this into a database used for further analysis. Among the features on this app:
The application is all built using docker containers. There are 3 containers, where pdadmin is only used for development.
Run:
Clone this repo
Create .env file with the following format in the root directory:
OPENAI_API_KEY="..."
POSTGRES_PASSWORD="..."
POSTGRES_USER=".."
PGADMIN_DEFAULT_EMAIL="..."
PGADMIN_DEFAULT_PASSWORD="..."
DISCORD_BOT_TOKEN=".."
DISCORD_GUILD_ID=..
OPENAI_MODEL_NAME="gpt-3.5-turbo"
ENVIRONMENT="PROD"
docker-compose --profile (dev or prod) up -d --build --force-recreate
If you need to clean up the volumes to reset database, run:
docker-compose down
docker volume rm llm-budget-assistant_pgadmin
sudo apt-get update -y
sudo apt-get upgrade
Install Docker
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
sudo usermod -aG docker {user}
newgrp docker
Installing docker-compose
sudo curl -L "https://github.com/docker/compose/releases/latest/download/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
Add firewall rule
Making custom domain to work
Instal nginx (for more reference):
sudo apt-get install nginx
sudo nano /etc/nginx/sites-available/default
listen 80;
server_name 47.74.21.181; # Domain name or IP address
location / {
proxy_pass http://0.0.0.0:8501/; # Route from HTTP port 80 to Streamlit port 8501
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
}```
Installing SSL:
sudo apt install certbot python3-certbot-nginx
sudo certbot --nginx -d <Domain>
To make sure new changes in dependencies are correctly added to requirements ( and are easily usable afterwards..):
After new additions run:
pip list --format=freeze > requirements.txt
For fresh enviroment installations:
pip install -r requirements.txt