Skip to content

Latest commit

Β 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Ollama Web Interface

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.

Ollama Web Interface License Version

✨ Features

πŸ€– Multi-Model Support

  • Connect to any Ollama model (gemma3, llama, mistral, etc.)
  • Automatic model detection and listing
  • Model information display (size, capabilities)

πŸ–ΌοΈ Image Interpretation

  • 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

πŸ‘₯ Multi-User System

  • User login with name-based identification
  • Isolated conversation history per user
  • Persistent conversations with SQLite database
  • User statistics and conversation management

πŸ’¬ Conversation Context

  • Intelligent conversation memory
  • Context-aware responses
  • Smart filtering to prevent image confusion
  • Export conversation history

🎨 Modern UI/UX

  • 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

βš™οΈ Advanced Settings

  • Temperature, Top P, and Max Tokens controls
  • Model selection and information
  • Connection status monitoring
  • Recent messages history

πŸš€ Quick Start

Prerequisites

  • Node.js (v18 or higher)
  • Ollama installed and running
  • At least one Ollama model downloaded

Installation

  1. Clone the repository

    git clone https://github.com/zetakai/llm-chat.git
    cd llm-chat
  2. Install dependencies

    npm install
  3. Start the server

    npm start
  4. Open your browser Navigate to http://localhost:3000

First Time Setup

  1. Enter your name in the login modal
  2. Select a model from the dropdown in the sidebar
  3. Start chatting! πŸŽ‰

πŸ“Έ Image Upload Guide

Supported Models

  • gemma3:12b (recommended)
  • llava and variants
  • bakllava
  • Other vision-capable models

How to Use

  1. Select a supported model
  2. Click the camera icon in the input area
  3. Choose an image file (JPEG, PNG, under 10MB)
  4. Add a prompt or let the AI describe the image
  5. Send your message

πŸ› οΈ Configuration

Environment Variables

Create a .env file in the root directory:

PORT=3000
OLLAMA_URL=http://localhost:11434

Database

The application uses SQLite for data persistence:

  • File: chat_history.db (created automatically)
  • Tables: users, conversations
  • Features: Automatic backup and recovery

πŸ“ Project Structure

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

πŸ”§ Development

Running in Development Mode

npm run dev

Database Operations

The application automatically handles:

  • User creation and management
  • Conversation storage and retrieval
  • Context building for AI responses
  • Image data management

API Endpoints

  • GET / - Main web interface
  • POST /api/user/login - User authentication
  • GET /api/models - List available models
  • POST /api/generate - Generate AI responses
  • GET /api/conversations/:userName - Get user conversations
  • DELETE /api/conversations/:userName - Clear user history
  • GET /api/health - Health check

🎯 Features in Detail

Smart Context Management

  • Text Conversations: Full context from previous chats
  • Image Conversations: Isolated context to prevent confusion
  • Mixed Context: Intelligent filtering based on request type

User Experience

  • 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

Security & Performance

  • 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

🀝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Development Setup

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Test thoroughly
  5. Submit a pull request

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ‘¨β€πŸ’» Developer

Developed by zetakai

πŸ™ Acknowledgments

πŸ“ž Support

If you encounter any issues or have questions:

  1. Check the Issues page
  2. Create a new issue with detailed information
  3. Include your Ollama version and model information

Made with ❀️ by zetakai

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages