A complete ChatGPT-like offline AI assistant powered by Ollama and a modern frontend interface.
This project runs fully offline using local LLMs — no OpenAI API or internet connection required after setup.
- 🌐 Modern ChatGPT-style UI
- 🧠 Fully Offline AI using Ollama
- ⚡ Fast local response generation
- 🗂️ Chat history sidebar
- ➕ New Chat support
- 🤖 Multiple model selection
- 📎 File upload button (UI)
- 🎤 Microphone button (UI)
- 🔄 Real-time chat rendering
- 📱 Responsive design
- 🔌 Backend-ready architecture
- 📳 Models-used:-mistral,gemma and ph6
- HTML5
- CSS3
- JavaScript
- Python / Flask
- Ollama
Offline_AI_Assistant/
│
├── backend/
│ ├── app.py
│ ├── requirements.txt
│ └── routes/
│
├── frontend/
│ ├── index.html
│ ├── style.css
│ ├── script.js
│ └── assets/
│
│
├── README.md
└── .gitignoregit clone https://github.com/Anuj04432/Offline_AI_Assistant.git
cd Offline_AI_AssistantDownload and install Ollama from:
Verify installation:
ollama --versionExample:
ollama pull mistralOther supported models:
ollama pull llama2
ollama pull phi3
ollama pull gemmapython -m venv myvenvmyvenv\Scripts\activatepip install -r requirements.txtpython app.pyOpen:
frontend/index.htmlor run using Live Server extension in VS Code.
In script.js update backend URL if needed:
const API_URL = "http://localhost:5000/chat";Start Ollama:
ollama serveRun backend server:
python app.pyOpen frontend in browser.
import requests
response = requests.post(
"http://localhost:11434/api/generate",
json={
"model": "mistral",
"prompt": "Hello"
}
)
print(response.json())- ChatGPT-like layout
- Sidebar navigation
- Smooth scrolling
- Typing animation
- Markdown-style messages
- Mobile responsive UI
- Dynamic chat rendering
- ✅ Voice input support
- ✅ File processing
- ✅ Chat export
- ✅ Markdown rendering
- ✅ Streaming responses
- ✅ Local database storage
- ✅ Multi-chat sessions
- ✅ Syntax highlighting
- ✅ Electron desktop app
- ✅️ Multiple devices UI
This project is completely offline.
- No cloud API
- No data collection
- No internet dependency
- Full local execution
Your chats never leave your device.
Pull requests are welcome.
For major changes, open an issue first to discuss improvements.
This project is licensed under the MIT License.
If you like this project:
- ⭐ Star the repository
- 🍴 Fork the project
- 🧠 Improve the UI
- 🚀 Add new features
GitHub: https://github.com/Anuj04432
Run powerful AI models locally with complete privacy and zero API costs.