This project is an application designed to enhance the use of local and cloud-based Large Language Models (LLMs), including OpenAI and Grok, integrated with a Retrieval-Augmented Generation (RAG) system. It offers a user-friendly interface developed in Streamlit, with advanced capabilities for:
-
Managing AI models through a dynamic selector.
-
Incorporating vector databases for efficient information storage and retrieval.
-
Ensuring security and ease of use with secure tunneling and customizable configurations.
This app helps experiment with various models to determine the best action based on resources, model choice, budget, and cloud services.
-
Main Framework:
- Pure Python along with Streamlit for the user-friendly interface.
-
Databases:
- Firebase:To store email validation in the account page.
- Chromadb: Vector databases that store embeddings represented as numeric vectors.
-
Models:
- OpenAI Embeddings: Vector database for embeddings generated by OpenAI.
- Ollama Embeddings: Embeddings generated by local Ollama models.
-
🔒 Secure Tunneling:
- Ngrok: Creation of a secure tunnel (puerto
4040) to share the application without vulnerabilities.
- Ngrok: Creation of a secure tunnel (puerto
-
Model Selector:
- Option to choose from:
- OpenAI
- Grok
- Custom local models.
- Option to choose from:
-
Customization:
- Easy update of the Ngrok token in Ngrok
ngrok.ymlfile. - Selection of default models from the
.envfile.
- Easy update of the Ngrok token in Ngrok
-
Configure environment variables
- Edit the
.envfile with the following content:MODEL_LIST=Meta models that suit you
- Edit the
-
Configure Ngrok:
- Edith the archivo
ngrok.ymlwith your token:authtoken: YOUR_NGROK_TOKEN
- Edith the archivo
This guide provides step-by-step instructions for setting up Omnia Open Source using Docker, Nginx, and Certbot for SSL. Copy the commands directly to your terminal to streamline the installation.
- Ensure you have
sudoprivileges on your system. - Verify you are running a supported Linux distribution (e.g., Ubuntu).
docker-compose updf -hsudo apt updatesudo apt install docker.iosudo systemctl start docker
sudo systemctl enable dockersudo 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
docker-compose --version
whoami # Identify the user
sudo usermod -aG docker user
exitsudo apt install -y gitgit clone https://github.com/Josh1313/OmniaOpenSource.git
cd OmniaOpenSourcedocker-compose up
or
docker-compose up -d
docker-compose down
docker-compose start
docker-compose stopsudo apt install -y nginxsudo nano /etc/nginx/sites-available/OmniaOpenSourceserver {
server_name YOUR-DOMAIN-NAME;
location / {
proxy_pass http://localhost:8080;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
Save and exit: CTRL+O, ENTER, CTRL+Xsudo ln -s /etc/nginx/sites-available/OmniaOpenSource /etc/nginx/sites-enabled/
sudo nginx -tsudo apt install -y certbot python3-certbot-nginxsudo certbot --nginx -d YOUR-DOMAIN-NAMEsudo nano /etc/nginx/sites-available/OmniaOpenSource
server {
listen 443 ssl;
server_name YOUR-DOMAIN-NAME;
#ssl_certificate /etc/letsencrypt/live/YOUR-DOMAIN-NAME/fullchain.pem;
#ssl_certificate_key /etc/letsencrypt/live/YOUR-DOMAIN-NAME/privkey.pem;
include /etc/letsencrypt/options-ssl-nginx.conf;
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
location / {
proxy_pass http://localhost:8080;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
server {
listen 80;
server_name YOUR-DOMAIN-NAME;
return 301 https://$host$request_uri; # Redirigir HTTP a HTTPS
}
sudo nginx -t
sudo systemctl restart nginxhttp://YOUR EXTERNAL API:8080
sudo nano .env
sudo nano ngrok.yml