# ChatAI Streamlit App (with Admin, OpenAI & Ollama) A Streamlit app that provides: - Rounded chat interface with **+** button to upload **files** or **images** - Supports **OpenAI** and **Ollama** providers - **Admin** role can manage user accounts - Conversation history (SQLite) - Export chat to Markdown ## Quickstart 1) **Create a virtual environment (recommended)** ```bash python -m venv .venv source .venv/bin/activate # On Windows: .venv\Scripts\activate ``` 2) **Install dependencies** ```bash pip install -r requirements.txt ``` 3) **Run the app** ```bash streamlit run app.py ``` 4) **Login** On first run, a default admin account is created: - **username**: `admin` - **password**: `admin123` 👉 Immediately change this in **Admin > Users**. ## Providers - **OpenAI**: Set your key in the sidebar **(OpenAI API Key)** or via env var `OPENAI_API_KEY`. - **Ollama**: Make sure Ollama is running locally (default endpoint `http://localhost:11434`). You can change endpoint in the sidebar. ## Notes - This is a reference implementation for local use. For production: - Use a proper auth service (e.g., OAuth), secure key storage (e.g., Vault/KMS) - Harden the admin endpoints and network access - Add request limits, logging, and encryption-at-rest