A modern, feature-rich web interface for Ollama that provides a beautiful chat experience with local AI models. Built with Node.js, Express, and vanilla JavaScript.
- Connect to any Ollama model (gemma3, llama, mistral, etc.)
- Automatic model detection and listing
- Model information display (size, capabilities)
- Upload images for AI analysis
- Support for models like
gemma3:12b,llava, and other vision models - Image preview and removal
- Smart context management to avoid image confusion
- User login with name-based identification
- Isolated conversation history per user
- Persistent conversations with SQLite database
- User statistics and conversation management
- Intelligent conversation memory
- Context-aware responses
- Smart filtering to prevent image confusion
- Export conversation history
- Dark/Light theme support
- Responsive design for mobile and desktop
- Markdown rendering with syntax highlighting
- Real-time character count and typing indicators
- Input suggestions and quick actions
- Temperature, Top P, and Max Tokens controls
- Model selection and information
- Connection status monitoring
- Recent messages history
-
Clone the repository
git clone https://github.com/zetakai/llm-chat.git cd llm-chat -
Install dependencies
npm install
-
Start the server
npm start
-
Open your browser Navigate to
http://localhost:3000
- Enter your name in the login modal
- Select a model from the dropdown in the sidebar
- Start chatting! π
gemma3:12b(recommended)llavaand variantsbakllava- Other vision-capable models
- Select a supported model
- Click the camera icon in the input area
- Choose an image file (JPEG, PNG, under 10MB)
- Add a prompt or let the AI describe the image
- Send your message
Create a .env file in the root directory:
PORT=3000
OLLAMA_URL=http://localhost:11434The application uses SQLite for data persistence:
- File:
chat_history.db(created automatically) - Tables:
users,conversations - Features: Automatic backup and recovery
llm-chat/
βββ public/
β βββ index.html # Main HTML file
β βββ styles.css # CSS styles
β βββ script.js # Frontend JavaScript
βββ server.js # Express server
βββ database.js # SQLite database operations
βββ package.json # Dependencies and scripts
βββ README.md # This file
npm run devThe application automatically handles:
- User creation and management
- Conversation storage and retrieval
- Context building for AI responses
- Image data management
GET /- Main web interfacePOST /api/user/login- User authenticationGET /api/models- List available modelsPOST /api/generate- Generate AI responsesGET /api/conversations/:userName- Get user conversationsDELETE /api/conversations/:userName- Clear user historyGET /api/health- Health check
- Text Conversations: Full context from previous chats
- Image Conversations: Isolated context to prevent confusion
- Mixed Context: Intelligent filtering based on request type
- Auto-login: Remembers your session
- Conversation Export: Download chat history as JSON
- Real-time Updates: Live connection status and notifications
- Mobile Responsive: Works on all device sizes
- Input Validation: Secure file uploads and data handling
- Error Handling: Graceful error recovery
- Memory Management: Efficient conversation storage
- Rate Limiting: Built-in protection against abuse
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
Developed by zetakai
- Ollama for the amazing local AI platform
- Express.js for the web framework
- SQLite for data persistence
- Font Awesome for icons
- Marked for markdown rendering
If you encounter any issues or have questions:
- Check the Issues page
- Create a new issue with detailed information
- Include your Ollama version and model information
Made with β€οΈ by zetakai