A lightweight local chatbot that sends prompts directly to Ollama.
- Direct model chat (no retrieval, no vector database)
- Web UI for chatting
- Conversation history: create, resume, rename, delete, export
- Per-conversation context profile overrides
- CLI chat mode
- Ollama running locally
- Python 3.8+
python3 -m venv env
source env/bin/activate
pip install -r requirements.txt
cp .env.example .env
ollama pull llama3.1:8bpython scripts/chat.py --question "Hello"
python scripts/chat.pypython scripts/server.pyOpen: http://localhost:8000
- Docker + Docker Compose
- Ollama running on your host machine
If your app runs in Docker and Ollama runs on your host, set:
OLLAMA_BASE_URL=http://host.docker.internal:11434
GENERATION_MODEL=llama3.1:8b
GENERATION_TEMPERATURE=0.2
GENERATION_TOP_P=0.9docker compose up --buildOpen: http://localhost:8000
docker compose downNotes:
./dataand./configare mounted into the container, so conversations/profiles persist.- On Linux,
host.docker.internalis mapped viaextra_hostsindocker-compose.yml.
Edit .env:
OLLAMA_BASE_URL=http://localhost:11434
GENERATION_MODEL=llama3.1:8b
GENERATION_TEMPERATURE=0.2
GENERATION_TOP_P=0.9Profiles are in config/chat_profiles.json.
Each profile supports:
system_promptanswer_instructionhistory_turns
GET /- Web UIPOST /query- Ask a questionGET /chat/profiles- List profilesPOST /conversations- Create conversationGET /conversations- List conversationsGET /conversations/{conversation_id}- Load conversationPATCH /conversations/{conversation_id}/context- Update profile/history/prompt overridesPATCH /conversations/{conversation_id}- Rename conversationDELETE /conversations/{conversation_id}- Delete conversationGET /conversations/{conversation_id}/export- Export conversation JSONGET /health- Health check


