# Environment Configuration Guide This project uses a `.env` file to manage configuration for local and remote testing. ## Quick Start 1. **Install python-dotenv**: ```bash pip install python-dotenv ``` 2. **Edit `.env` file**: ```bash nano .env ``` 3. **Toggle between local/remote**: ```bash ./toggle_env.sh ``` ## Configuration Options ### Ollama Server Settings - `OLLAMA_HOST` - Server hostname (default: `localhost`) - `OLLAMA_PORT` - Server port (default: `11434`) - `OLLAMA_MODEL` - Default model name (default: `llama3:latest`) - `OLLAMA_WORK_MODEL` - Work agent model (default: `llama3:latest`) - `OLLAMA_FAMILY_MODEL` - Family agent model (default: `llama3:latest`) ### Environment Toggle - `ENVIRONMENT` - Set to `local` or `remote` (default: `local`) ### Feature Flags - `ENABLE_DASHBOARD` - Enable web dashboard (default: `true`) - `ENABLE_ADMIN_PANEL` - Enable admin panel (default: `true`) - `ENABLE_LOGGING` - Enable structured logging (default: `true`) ## Local Testing Setup For local testing with Ollama running on your machine: ```env OLLAMA_HOST=localhost OLLAMA_PORT=11434 OLLAMA_MODEL=llama3:latest OLLAMA_WORK_MODEL=llama3:latest OLLAMA_FAMILY_MODEL=llama3:latest ENVIRONMENT=local ``` ## Remote (GPU VM) Setup For production/testing with remote GPU VM: ```env OLLAMA_HOST=10.0.30.63 OLLAMA_PORT=11434 OLLAMA_MODEL=llama3.1:8b OLLAMA_WORK_MODEL=llama3.1:8b OLLAMA_FAMILY_MODEL=phi3:mini-q4_0 ENVIRONMENT=remote ``` ## Using the Toggle Script The `toggle_env.sh` script automatically switches between local and remote configurations: ```bash # Switch to remote ./toggle_env.sh # Switch back to local ./toggle_env.sh ``` ## Manual Configuration You can also edit `.env` directly: ```bash # Edit the file nano .env # Or use environment variables (takes precedence) export OLLAMA_HOST=localhost export OLLAMA_MODEL=llama3:latest ``` ## Files - `.env` - Main configuration file (not committed to git) - `.env.example` - Example template (safe to commit) - `toggle_env.sh` - Quick toggle script ## Notes - Environment variables take precedence over `.env` file values - The `.env` file is loaded automatically by `config.py` and `router.py` - Make sure `python-dotenv` is installed: `pip install python-dotenv` - Restart services after changing `.env` to load new values