Spaces:
Running
Running
|
Download index.md from thebear135/LLMUI-Core: direct link, hf CLI and curl.
- Browser
- Download file 12.5 kB
-
https://huggingface.co/spaces/thebear135/LLMUI-Core/resolve/main/index.md
- Command line
-
hf download hf://spaces/thebear135/LLMUI-Core/index.md
-
curl -L -o index.md https://huggingface.co/spaces/thebear135/LLMUI-Core/resolve/main/index.md
12.5 kB
| # LLMUI Core v0.5.0 | |
| [](https://www.gnu.org/licenses/agpl-3.0) | |
| [](LICENSE) | |
| [](ENTERPRISE_CLAUSE_EXPLAINED.md) | |
| [](https://python.org) | |
| [](https://kernel.org) | |
| > **Multi-model AI consensus platform with digital sovereignty** | |
| Developed by **Francois Chalut** - A Quebec solution for local and ethical artificial intelligence. | |
| --- | |
| ## ๐ฏ Overview | |
| LLMUI Core is an innovative consensus platform between multiple language models (LLMs), allowing you to: | |
| - **Orchestrate multiple AI models** in parallel (workers + mergers) | |
| - **Obtain consensus responses** for superior quality | |
| - **Ensure digital sovereignty** - local hosting, no cloud | |
| - **Integrate advanced memory systems** (RAG, hybrid) | |
| - **Process files** (PDF, DOCX, images, etc.) | |
| - **Maintain complete history** with SQLite | |
| ### Architecture | |
| ``` | |
| โโโโโโโโโโโโโโโ | |
| โ Nginx โ โ Web interface (port 80/443) | |
| โโโโโโโโฌโโโโโโโ | |
| โ | |
| โโโโโโโโผโโโโโโโ | |
| โ llmui-proxy โ โ Session management, auth (port 8080) | |
| โโโโโโโโฌโโโโโโโ | |
| โ | |
| โโโโโโโโผโโโโโโโ | |
| โllmui-backendโ โ LLM orchestration (port 5000) | |
| โโโโโโโโฌโโโโโโโ | |
| โ | |
| โโโโโโโโผโโโโโโโ | |
| โ Ollama โ โ Local models (port 11434) | |
| โโโโโโโโโโโโโโโ | |
| โข phi3:3.8b (worker) | |
| โข gemma2:2b (worker) | |
| โข granite4:micro-h (merger) | |
| ``` | |
| --- | |
| ## ๐ Prerequisites | |
| ### Recommended Hardware | |
| - **CPU**: 4 cores minimum, 8+ recommended | |
| - **RAM**: 8GB minimum, 16GB+ recommended | |
| - **Disk**: 20GB minimum, 50GB+ recommended | |
| - **GPU**: Optional but greatly improves performance | |
| ### Operating System | |
| #### Native Linux | |
| - Debian 11/12 | |
| - Ubuntu 20.04/22.04/24.04 | |
| - Rocky Linux 8/9 | |
| - RHEL 8/9 | |
| #### Windows via WSL | |
| - Windows 10/11 with WSL2 enabled | |
| - Ubuntu 20.04/22.04/24.04 distribution in WSL | |
| - 16GB RAM recommended for Windows + WSL | |
| ### Software | |
| - Python 3.8+ | |
| - Root access (sudo) | |
| - Git | |
| --- | |
| ## ๐ช Installation on Windows (WSL) | |
| ### Step 1: Enable WSL2 | |
| Open PowerShell as administrator: | |
| ```powershell | |
| # Enable WSL | |
| wsl --install | |
| # Or if already installed, upgrade to WSL2 | |
| wsl --set-default-version 2 | |
| # Install Ubuntu | |
| wsl --install -d Ubuntu-22.04 | |
| ``` | |
| Restart your computer after installation. | |
| ### Step 2: WSL Configuration | |
| Launch Ubuntu from the Start menu and configure your user. | |
| ```bash | |
| # Update the system | |
| sudo apt update && sudo apt upgrade -y | |
| # Install prerequisites | |
| sudo apt install -y git python3 python3-pip | |
| ``` | |
| ### Step 3: Install LLMUI Core in WSL | |
| ```bash | |
| # Clone the repository | |
| git clone https://github.com/GenAICos/llmui-core.git | |
| cd llmui-core | |
| # Launch installation with Andy | |
| sudo bash andy_setup.sh | |
| ``` | |
| ### Access from Windows | |
| Once installed in WSL, access the interface via: | |
| ``` | |
| http://localhost/ | |
| ``` | |
| Windows browser can directly access WSL services! | |
| ### Important Notes for WSL | |
| - **Performance**: WSL2 offers excellent performance but will consume Windows RAM | |
| - **Files**: Access WSL files from Windows via `\\wsl$\Ubuntu-22.04\` | |
| - **Network**: WSL ports are automatically forwarded to Windows | |
| - **Memory**: Configure `.wslconfig` to limit RAM usage if needed | |
| #### .wslconfig Configuration (optional) | |
| Create `C:\Users\YourName\.wslconfig`: | |
| ```ini | |
| [wsl2] | |
| memory=8GB | |
| processors=4 | |
| swap=4GB | |
| ``` | |
| --- | |
| ## ๐ Quick Installation with Andy | |
| **Andy** is the autonomous DevOps assistant that automates the complete installation of LLMUI Core. | |
| ### One-Command Installation | |
| ```bash | |
| # Clone repository | |
| git clone https://github.com/GenAICos/llmui-core.git | |
| cd llmui-core | |
| # Launch interactive installation | |
| sudo bash andy_setup.sh | |
| ``` | |
| ### Complete Automatic Installation | |
| ```bash | |
| # Installation in 3 automated steps | |
| sudo python3 andy_installer.py # Step 1: System base | |
| sudo python3 andy_deploy_source.py # Step 2: Source files | |
| sudo python3 andy_start_services.py # Step 3: Services | |
| ``` | |
| Andy will automatically: | |
| - โ Update OS | |
| - โ Install Ollama + 3 LLM models | |
| - โ Configure Python + dependencies | |
| - โ Create systemd services | |
| - โ Configure Nginx + SSL | |
| - โ Configure firewall | |
| - โ Verify installation | |
| > **Note**: Andy will only ask you for the username and password for the LLMUI interface. | |
| ### What Andy Does | |
| 1. **Base Installation** (`andy_installer.py`) | |
| - Automatic system detection (apt/dnf/yum) | |
| - System dependency installation | |
| - Ollama installation and model download | |
| - Python virtual environment creation | |
| - Systemd service configuration | |
| - Nginx and firewall configuration | |
| 2. **Source Deployment** (`andy_deploy_source.py`) | |
| - Git repository clone (or manual copy) | |
| - File installation in `/opt/llmui-core/` | |
| - Permission configuration | |
| 3. **Service Startup** (`andy_start_services.py`) | |
| - Systemd service activation | |
| - Backend โ proxy โ nginx startup | |
| - Service status verification | |
| - HTTP test and access URL display | |
| ### Interactive Menu (andy_setup.sh) | |
| ``` | |
| โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ | |
| โ MAIN MENU โ | |
| โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ | |
| [1] Complete installation (recommended) | |
| [2] Base installation only | |
| [3] Deploy source files | |
| [4] Start services | |
| [5] Verify installation | |
| [6] View logs | |
| [7] Read documentation | |
| [Q] Quit | |
| ``` | |
| --- | |
| ## ๐ฆ Project Structure | |
| ``` | |
| llmui-core/ | |
| โโโ andy_setup.sh # Interactive menu | |
| โโโ andy_installer.py # System base installation | |
| โโโ andy_deploy_source.py # Source deployment | |
| โโโ andy_start_services.py # Service startup | |
| โโโ README.md # This file | |
| โโโ README_ANDY.md # Andy documentation | |
| โโโ INSTALL.md # Detailed installation guide | |
| โโโ LICENSE # Proprietary license | |
| โ | |
| โโโ src/ # Backend source code | |
| โ โโโ llmui_backend.py # Main FastAPI server | |
| โ โโโ llmui_proxy.py # Proxy server | |
| โ โโโ auth.py # Authentication | |
| โ โโโ database.py # SQLite management | |
| โ โโโ memory.py # Memory system | |
| โ โโโ file_processor.py # File processing | |
| โ | |
| โโโ web/ # Web interface | |
| โ โโโ index.html | |
| โ โโโ css/ | |
| โ โโโ js/ | |
| โ โโโ assets/ | |
| โ | |
| โโโ config.yaml # Main configuration | |
| โโโ requirements.txt # Python dependencies | |
| โ | |
| โโโ docs/ # Documentation | |
| โโโ ARCHITECTURE.md | |
| โโโ API.md | |
| โโโ CONFIGURATION.md | |
| โโโ TROUBLESHOOTING.md | |
| ``` | |
| --- | |
| ## ๐ง Configuration | |
| ### Main File: `config.yaml` | |
| ```yaml | |
| server: | |
| host: "0.0.0.0" | |
| port: 5000 | |
| ssl_enabled: false | |
| ollama: | |
| base_url: "http://localhost:11434" | |
| models: | |
| workers: | |
| - "phi3:3.8b" | |
| - "gemma2:2b" | |
| merger: "granite4:micro-h" | |
| database: | |
| path: "/opt/llmui-core/data/llmui.db" | |
| security: | |
| jwt_secret: "auto-generated" | |
| session_timeout: 3600 | |
| ``` | |
| ### Ports Used | |
| | Service | Port | Description | | |
| |---------|------|-------------| | |
| | Nginx | 80/443 | Web interface | | |
| | llmui-proxy | 8080 | Proxy + auth | | |
| | llmui-backend | 5000 | Backend API | | |
| | Ollama | 11434 | LLM server | | |
| --- | |
| ## ๐ฎ Usage | |
| ### Interface Access | |
| Once installed, access LLMUI Core via your browser: | |
| **Linux:** | |
| ``` | |
| http://YOUR_IP/ | |
| ``` | |
| **Windows (WSL):** | |
| ``` | |
| http://localhost/ | |
| ``` | |
| The server IP is displayed at the end of Andy's installation. | |
| ### Service Management | |
| ```bash | |
| # Service status | |
| sudo systemctl status llmui-backend | |
| sudo systemctl status llmui-proxy | |
| sudo systemctl status nginx | |
| # Restart services | |
| sudo systemctl restart llmui-backend | |
| sudo systemctl restart llmui-proxy | |
| sudo systemctl restart nginx | |
| # Real-time logs | |
| sudo journalctl -u llmui-backend -f | |
| sudo journalctl -u llmui-proxy -f | |
| ``` | |
| ### REST API | |
| Complete API documentation available in [`docs/API.md`](docs/API.md). | |
| Endpoint examples: | |
| ```bash | |
| # Health check | |
| curl http://localhost:5000/api/health | |
| # Model list | |
| curl http://localhost:5000/api/models | |
| # New conversation | |
| curl -X POST http://localhost:5000/api/chat \ | |
| -H "Content-Type: application/json" \ | |
| -d '{"message": "Hello!", "user_id": "user123"}' | |
| ``` | |
| --- | |
| ## ๐ Features | |
| ### โจ Multi-Model Consensus | |
| LLMUI core uses a unique approach: | |
| 1. **Workers analyze** the prompt in parallel | |
| 2. **Merger synthesizes** responses into consensus | |
| 3. **Superior quality** thanks to model diversity | |
| ### ๐ง Advanced Memory System | |
| - **Short-term memory**: Conversation context | |
| ### ๐ File Processing | |
| Supported formats: | |
| - **Documents**: PDF, DOCX, TXT, MD | |
| - **Images**: PNG, JPG, WEBP | |
| - **Data**: CSV, JSON, YAML | |
| - **Code**: Python, JavaScript, etc. | |
| ### ๐ Security | |
| - **JWT authentication** | |
| - **Session encryption** | |
| - **Configured firewall** | |
| - **Nginx security headers** | |
| - **Service isolation** | |
| - **Strict permissions** | |
| --- | |
| ## ๐ Complete Documentation | |
| - **[INSTALL.md](INSTALL.md)** - Detailed installation guide | |
| - **[README_ANDY.md](README_ANDY.md)** - Andy documentation | |
| - **[ARCHITECTURE.md](docs/ARCHITECTURE.md)** - Technical architecture | |
| - **[API.md](docs/API.md)** - REST API documentation | |
| - **[CONFIGURATION.md](docs/CONFIGURATION.md)** - Advanced configuration | |
| - **[TROUBLESHOOTING.md](docs/TROUBLESHOOTING.md)** - Troubleshooting | |
| --- | |
| ## ๐ Quick Troubleshooting | |
| ### Services Won't Start | |
| ```bash | |
| # Check logs | |
| sudo journalctl -u llmui-backend -n 50 | |
| sudo journalctl -u llmui-proxy -n 50 | |
| # Check permissions | |
| ls -la /opt/llmui-core/ | |
| # Check Python environment | |
| /opt/llmui-core/venv/bin/python --version | |
| /opt/llmui-core/venv/bin/pip list | |
| ``` | |
| ### Nginx Error 502 | |
| Backend not started: | |
| ```bash | |
| sudo systemctl status llmui-backend | |
| sudo systemctl start llmui-backend | |
| ``` | |
| ### Ollama Not Responding | |
| ```bash | |
| ollama list | |
| ollama ps | |
| sudo systemctl status ollama | |
| sudo systemctl restart ollama | |
| ``` | |
| ### WSL-Specific Issues | |
| ```bash | |
| # Restart WSL from PowerShell (Windows) | |
| wsl --shutdown | |
| wsl | |
| # Check WSL version | |
| wsl --list --verbose | |
| # Free up memory | |
| sudo sh -c "echo 3 > /proc/sys/vm/drop_caches" | |
| ``` | |
| ### View Andy Logs | |
| ```bash | |
| # Installation log | |
| less /tmp/andy_install.log | |
| # SQLite database | |
| sqlite3 /tmp/andy_installation.db | |
| ``` | |
| --- | |
| ## ๐ Update | |
| ```bash | |
| # Backup configuration | |
| sudo cp /opt/llmui-core/config.yaml /opt/llmui-core/config.yaml.bak | |
| # Stop services | |
| sudo systemctl stop llmui-backend llmui-proxy | |
| # Update code | |
| cd /path/to/llmui-core | |
| git pull origin main | |
| # Redeploy | |
| sudo python3 andy_deploy_source.py | |
| # Restart | |
| sudo python3 andy_start_services.py | |
| ``` | |
| --- | |
| ## ๐ค Contribution | |
| This project is developed by **Francois Chalut** | |
| For any questions or contributions: | |
| - **Email**: francois.chalut@gmail.com | |
| - **Issues**: [GitHub Issues](https://github.com/GenAICos/llmui-core/issues) | |
| --- | |
| ## ๐ License | |
| ยฉ 2025 Francois Chalut. | |
| AGPLv3 + common clause | |
| See [LICENSE](LICENSE) for more details. | |
| --- | |
| ## ๐ Project Philosophy | |
| LLMUI Core is part of a vision of **Quebec digital sovereignty**: | |
| - ๐จ๐ฆ **Local first**: Complete hosting and control | |
| - ๐ **Open Architecture**: Extensible and adaptable | |
| - ๐ก๏ธ **Security by design**: Data protection | |
| - ๐ค **Ethical AI**: Transparency and consensus | |
| - ๐ฑ **Technological autonomy**: Independence from GAFAM | |
| --- | |
| ## ๐ Support | |
| **Documentation**: [GitHub Wiki](https://github.com/GenAICos/llmui-core/wiki) | |
| **Andy Logs**: `/tmp/andy_install.log` | |
| **Andy Database**: `/tmp/andy_installation.db` | |
| **Installation**: `/opt/llmui-core/` | |
| --- | |
| **Developed with ๐ in Quebec by Francois Chalut** | |