A privacy-focused, client-side multi-LLM chat application with support for local models via Ollama. This fork extends the original ChatMeld with the ability to run AI conversations entirely on your machine using open-source models like Qwen, Llama, and Mistral.
- Local Model Support: Run conversations using Ollama with models like Qwen 2.5, Llama 3.2, Mistral, and more
- Multi-Model Chat: Chat with different AI models simultaneously
- AI-to-AI Conversations: Watch AI models interact with each other
- Customizable AI Personalities: Create agents with specific traits and behaviors
- Full Conversation Control: Pause, rewind, edit, and remove AI responses
- Privacy-First: All data stored locally in your browser using IndexedDB
- No Server Required: Direct API integration - your keys never leave your browser
- Hybrid Mode: Mix local Ollama models with cloud providers (OpenAI, Google AI)
-
Install Ollama
# macOS brew install ollama # Linux curl -fsSL https://ollama.com/install.sh | sh # Windows - Download from https://ollama.com/download
-
Start Ollama Service
# macOS brew services start ollama # Linux/macOS alternative ollama serve
-
Pull Models
# Recommended starter models ollama pull qwen2.5:7b # 4.7GB - Great general purpose ollama pull llama3.2 # 2.0GB - Fast and capable # Optional larger/specialized models ollama pull qwen2.5:14b # Better quality, requires more RAM ollama pull mistral # Good for creative tasks ollama pull codellama # Optimized for code generation
- Node.js v18 or higher
- npm or yarn
# Clone the repository
git clone https://github.com/YOUR_USERNAME/ChatMeld-Ollama.git
cd ChatMeld-Ollama
# Install dependencies
npm install
# Start development server
npm run devOpen http://localhost:5173 in your browser.
- Navigate to Settings in the app
- Scroll to Ollama (Local Models) section
- Check Enable Ollama
- The default URL
http://localhost:11434works for standard setups - For remote Ollama instances, update the Base URL accordingly
- OpenAI: Settings → API Keys → OpenAI API Key
- Google AI Studio: Settings → API Keys → Google AI Studio API Key
- Click New Conversation from the dashboard
- Select 2-4 agents (each can use a different model)
- Give your conversation a title
- Click Start Chat
- Go to Agents → My Custom Agents
- Click Create New Agent
- Configure:
- Name: Display name for the agent
- Description: Personality and role description (used as system prompt context)
- Default Model: Select from available models
- Temperature: Controls creativity (0.0 = deterministic, 1.0 = creative)
- Click Save
| Control | Description |
|---|---|
| Auto-advance | Agents automatically take turns responding |
| Advance one message | Manually trigger the next response |
| Click agent avatar | Force that agent to speak next |
| Edit message | Modify any message in the conversation |
| Restart | Clear conversation and start fresh |
| Model | Size | Use Case |
|---|---|---|
qwen2.5:7b |
4.7GB | General purpose, balanced quality/speed |
qwen2.5:14b |
9GB | Higher quality, requires 16GB+ RAM |
qwen2.5:32b |
20GB | Best quality, requires 32GB+ RAM |
llama3.2 |
2.0GB | Fast responses, efficient |
mistral |
4.1GB | Creative writing, roleplay |
codellama |
3.8GB | Code generation and review |
To add more models, pull them with Ollama and update src/lib/llm-providers.ts.
- OpenAI: GPT-4o, GPT-4o-mini, GPT-4.1 series
- Google AI: Gemini 2.5 Flash, Gemini 2.5 Pro
┌─────────────────────────────────────────────────────┐
│ Browser │
│ ┌───────────────────────────────────────────────┐ │
│ │ ChatMeld Frontend │ │
│ │ ┌─────────┐ ┌─────────┐ ┌──────────────┐ │ │
│ │ │ React │ │ Zustand │ │ Dexie.js │ │ │
│ │ │ UI │ │ State │ │ (IndexedDB) │ │ │
│ │ └────┬────┘ └────┬────┘ └──────────────┘ │ │
│ │ │ │ │ │
│ │ ┌────▼────────────▼────┐ │ │
│ │ │ LLM Provider Layer │ │ │
│ │ └──────────┬───────────┘ │ │
│ └─────────────┼─────────────────────────────────┘ │
└────────────────┼────────────────────────────────────┘
│
┌────────────┼────────────┐
│ │ │
▼ ▼ ▼
┌────────┐ ┌────────┐ ┌──────────┐
│ Ollama │ │ OpenAI │ │ Google │
│ (Local)│ │ API │ │ AI API │
└────────┘ └────────┘ └──────────┘
- All data is stored locally in your browser's IndexedDB
- API keys are stored locally and only sent to their respective API providers
- No telemetry or tracking - no external requests except to configured LLM providers
- Ollama runs locally - conversations with local models never leave your machine
- Never commit API keys to version control
- Use the
.gitignore- it already excludes.envfiles - Clear browser data when using shared computers
- Review network settings if exposing Ollama to other machines
- Default binding:
localhost:11434(not network-exposed) - Development server proxies requests to avoid CORS issues
- For production with remote Ollama, configure CORS:
OLLAMA_ORIGINS="https://yourdomain.com" ollama serve
src/
├── components/ # React UI components
│ └── sidebar/ # Chat sidebar components
├── db/ # Dexie.js database configuration
├── hooks/ # Custom React hooks
│ └── useChatConductor.ts # AI conversation orchestration
├── lib/ # Core business logic
│ ├── llm-providers.ts # LLM provider configurations
│ ├── llm-api.ts # Unified API abstraction
│ ├── chat-logic.ts # Turn-taking and response logic
│ └── prompts.ts # System prompt templates
├── store/ # Zustand state management
├── types/ # TypeScript type definitions
└── views/ # Page-level components
- Pull the model:
ollama pull model-name:tag - Edit
src/lib/llm-providers.ts:
{
id: 'ollama',
apiKeyName: 'ollamaEnabled',
defaultModel: 'qwen2.5:7b',
models: [
{ id: 'qwen2.5:7b', label: 'Qwen 2.5 7B' },
{ id: 'llama3.2:latest', label: 'Llama 3.2' },
// Add your model:
{ id: 'model-name:tag', label: 'Display Name' },
],
call: ollamaCall,
},npm run dev # Start development server
npm run build # Build for production (outputs to docs/)
npm run preview # Preview production build# Check if Ollama is running
curl http://localhost:11434/api/tags
# Test a model directly
curl http://localhost:11434/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{"model": "qwen2.5:7b", "messages": [{"role": "user", "content": "Hi"}]}'
# Restart Ollama
brew services restart ollama # macOS
systemctl restart ollama # Linux with systemd- Verify Ollama is enabled in Settings
- Check installed models:
ollama list - Ensure model IDs in
llm-providers.tsmatch exactly (including tags) - Clear browser cache and refresh
- Open browser DevTools (F12) → Console tab
- Look for
[Conductor]or[LLM API]log messages - Check for error messages about missing API keys or failed requests
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Make your changes following the existing code style
- Test thoroughly with both Ollama and cloud providers
- Commit with clear messages:
git commit -m 'Add amazing feature' - Push to your fork:
git push origin feature/amazing-feature - Open a Pull Request
- Original ChatMeld by Balazs Piller
- Ollama integration by this fork
- Built with React, Vite, Zustand, Dexie.js, and Tailwind CSS
MIT License - see LICENSE for details.
This is a fork of ChatMeld with added Ollama support for local model inference. For the original project, visit balazspiller/ChatMeld.