{"repo":"wsvincent/djangoforai","free":true,"listed":false,"github":"https://github.com/wsvincent/djangoforai","clone":"git clone https://github.com/wsvincent/djangoforai.git","description":"Django + local LLM + server side events + HTMX demo","language":"Python","stars":66,"topics":["ai","django","htmx","llm","python"],"license":null,"category":"ai-agents","readme_excerpt":"Django AI Chat with Ollama and HTMX A real-time streaming chat application built with Django, HTMX, and Server-Sent Events (SSE) to mimic popular LLMs like ChatGPT, Claude, etc. It integrates with local LLMs via Ollama. This was demonstrated during a talk at DjangoCon US 2025. You can see the video version here or the text-based version here](https://wsvincent.com/django-for-ai-djangocon/). Features - 🚀 Real-time streaming responses using Server-Sent Events (SSE) - 🤖 Local LLM integration via Ollama (Gemma 3:4B) - 📝 Markdown support with syntax highlighting - 💬 Conversation history and context management - 🎨 Clean, responsive UI with HTMX Installation 1. Install and Configure Ollama Download and install the Ollama desktop app for your platform. Once installed, pull the Gemma 3:4B model (3.3GB): Ensure Ollama is running in the background (it runs on http://localhost:11434 by default). 2. Set Up with uv uv is a fast Python package manager. Install it if you haven't already: Then run the project: Usage 1. Open your browser and navigate to http://127.0.0.1:8000/ 2. Type a message in the input field 3. Watch as the AI response streams in real-time 4. Previous conversations are saved and accessible from the homepage and the admin at http://127.0.0.1:8000/admin/ Project Structure","default_branch":null,"files":null,"tree":[],"storefront":"/r/wsvincent","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/wsvincent/djangoforai/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}