[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-73722":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":16,"stars7d":17,"stars30d":18,"stars90d":16,"forks30d":16,"starsTrendScore":16,"compositeScore":19,"rankGlobal":10,"rankLanguage":10,"license":20,"archived":21,"fork":21,"defaultBranch":22,"hasWiki":23,"hasPages":21,"topics":24,"createdAt":10,"pushedAt":10,"updatedAt":25,"readmeContent":26,"aiSummary":27,"trendingCount":16,"starSnapshotCount":16,"syncStatus":17,"lastSyncTime":28,"discoverSource":29},73722,"chat-ollama","sugarforever\u002Fchat-ollama","sugarforever","ChatOllama is an open-source AI chatbot that brings cutting-edge language models to your fingertips while keeping your data private and secure.","https:\u002F\u002Fchatollama.cloud",null,"TypeScript",3493,564,32,242,0,2,5,30.26,"Other",false,"main",true,[],"2026-06-12 02:03:17","English | [简体中文](README.zh-Hans.md)\n\n# ChatOllama + Deep Agents\n\n> **🔐 New ACL Feature (2025-08-25):** Access Control Lists (ACL) for MCP server management! Control who can configure MCP servers with `ACL_ENABLED` environment variable. [Learn more about ACL configuration →](#mcp-server-management-permissions)\n\n> **🤖 Deep Agents Support (2025-08-19):** ChatOllama now supports AI Agents with tool access! Currently requires Anthropic API key. Please refer to `.env.example` and set `ANTHROPIC_API_KEY` in `.env`. Tools are configured through MCP settings. Visit `\u002Fagents` to get started.\n\n> **📢 Database Migration Notice (2025-08-14):** ChatOllama has moved from SQLite to PostgreSQL as the primary database provider for better performance and scalability.\n\n`ChatOllama` is an open source chatbot platform built with Nuxt 3, supporting a wide range of language models and advanced features including knowledge bases, realtime voice chat, and Model Context Protocol (MCP) integration.\n\n## Supported Language Models\n\n- **OpenAI** \u002F **Azure OpenAI**\n- **Anthropic**\n- **Google Gemini**\n- **Groq**\n- **Moonshot**\n- **Ollama**\n- **OpenAI API compatible service providers**\n\n## Key Features\n\n- **AI Agents** - Intelligent agents with tool access for research and task execution\n- **Multi-modal Chat** - Text and image input support\n- **Knowledge Bases** - RAG (Retrieval Augmented Generation) with document upload\n- **Realtime Voice Chat** - Voice conversations with Gemini 2.0 Flash\n- **Model Context Protocol (MCP)** - Extensible tool integration\n- **Vector Databases** - Chroma and Milvus support\n- **Docker Support** - Easy deployment with Docker Compose\n- **Internationalization** - Multi-language support\n\n## Quick Start\n\nChoose your preferred deployment method:\n\n### Option 1: Docker (Recommended)\n\nThe easiest way to get started. Download [docker-compose.yaml](.\u002Fdocker-compose.yaml) and run:\n\n```bash\ndocker compose up\n```\n\nAccess ChatOllama at http:\u002F\u002Flocalhost:3000\n\n### Option 2: Development Setup\n\nFor development or customization:\n\n1. **Prerequisites**\n   - Node.js 18+ and pnpm\n   - Local PostgreSQL database server\n   - Ollama server running on http:\u002F\u002Flocalhost:11434\n   - ChromaDB or Milvus vector database\n\n2. **Installation**\n   ```bash\n   git clone git@github.com:sugarforever\u002Fchat-ollama.git\n   cd chat-ollama\n   cp .env.example .env\n   pnpm install\n   ```\n\n3. **Database Setup**\n   - Create a PostgreSQL database\n   - Configure the database URL in `.env`\n   - Run migrations: `pnpm prisma migrate deploy`\n\n4. **Start Development**\n   ```bash\n   pnpm dev\n   ```\n\n## Data Migration from SQLite to PostgreSQL\n\nIf you're upgrading from a previous version that used SQLite, follow these steps to migrate your data:\n\n### For Docker Users\n\n**No action required!** Docker deployments handle the migration automatically:\n- The PostgreSQL service starts automatically\n- Database migrations run on container startup\n- Your existing data will be preserved\n\n### For Development Users\n\n1. **Backup your existing SQLite data** (if you have important chat history):\n   ```bash\n   cp chatollama.sqlite chatollama.sqlite.backup\n   ```\n\n2. **Install and setup PostgreSQL**:\n   ```bash\n   # macOS with Homebrew\n   brew install postgresql\n   brew services start postgresql\n   \n   # Create database and user\n   psql postgres\n   CREATE DATABASE chatollama;\n   CREATE USER chatollama WITH PASSWORD 'your_password';\n   GRANT ALL PRIVILEGES ON DATABASE chatollama TO chatollama;\n   \\q\n   ```\n\n3. **Update your `.env` file**:\n   ```bash\n   # Replace SQLite URL with PostgreSQL\n   DATABASE_URL=\"postgresql:\u002F\u002Fchatollama:your_password@localhost:5432\u002Fchatollama\"\n   ```\n\n4. **Run database migrations**:\n   ```bash\n   pnpm prisma migrate deploy\n   ```\n\n5. **Migrate existing SQLite data** (if you have chat history to preserve):\n   ```bash\n   pnpm migrate:sqlite-to-postgres\n   ```\n\n### Vector Database Configuration\n\nChatOllama supports two vector databases. Configure in your `.env` file:\n\n```bash\n# Choose: chroma or milvus\nVECTOR_STORE=chroma\nCHROMADB_URL=http:\u002F\u002Flocalhost:8000\nMILVUS_URL=http:\u002F\u002Flocalhost:19530\n```\n\n**ChromaDB Setup (Default)**\n```bash\ndocker run -d -p 8000:8000 chromadb\u002Fchroma\n```\n\n## Configuration\n\n### Environment Variables\n\nKey configuration options in `.env`:\n\n```bash\n# Access Control\nACL_ENABLED=false  # Set to 'true' for production (admin-only MCP management)\n\n# Database\nDATABASE_URL=file:..\u002F..\u002Fchatollama.sqlite\n\n# Server\nPORT=3000\nHOST=\n\n# Vector Database\nVECTOR_STORE=chroma\nCHROMADB_URL=http:\u002F\u002Flocalhost:8000\n\n# Optional: API Keys for commercial models\nOPENAI_API_KEY=your_openai_key\nANTHROPIC_API_KEY=your_anthropic_key\nGOOGLE_API_KEY=your_gemini_key\nGROQ_API_KEY=your_groq_key\nMOONSHOT_API_KEY=your_moonshot_key\n\n# Optional: Proxy settings\nNUXT_PUBLIC_MODEL_PROXY_ENABLED=false\nNUXT_MODEL_PROXY_URL=http:\u002F\u002F127.0.0.1:1080\n\n# Optional: Cohere for reranking\nCOHERE_API_KEY=your_cohere_key\n```\n\n## Feature Flags (Docker and .env)\n\nYou can enable or disable major product areas via feature flags. These can be set at build time using `.env`, or at runtime in Docker using `NUXT_`-prefixed variables.\n\n- **Available features**\n  - **MCP (Model Context Protocol)** → toggles `Settings → MCP` module. Flag: `mcpEnabled`\n  - **Knowledge Bases** → toggles Knowledge Bases menu and pages. Flag: `knowledgeBaseEnabled`\n  - **Realtime Chat** → toggles `\u002Frealtime` voice chat page. Flag: `realtimeChatEnabled`\n  - **Models Management** → toggles `Models` menu and `\u002Fmodels` page. Flag: `modelsManagementEnabled`\n\n- **Docker (recommended for deployments)**\n  Set runtime overrides with `NUXT_` variables in `docker-compose.yaml`:\n  \n  ```yaml\n  services:\n    chatollama:\n      environment:\n        - NUXT_MCP_ENABLED=true\n        - NUXT_KNOWLEDGE_BASE_ENABLED=true\n        - NUXT_REALTIME_CHAT_ENABLED=true\n        - NUXT_MODELS_MANAGEMENT_ENABLED=true\n  ```\n\n- **.env (build time during `pnpm build`)**\n  If you are building locally (non-Docker) or creating a custom image, you can set:\n  \n  ```bash\n  MCP_ENABLED=true\n  KNOWLEDGE_BASE_ENABLED=true\n  REALTIME_CHAT_ENABLED=true\n  MODELS_MANAGEMENT_ENABLED=true\n  ```\n\n  Note: These are evaluated when `nuxt.config.ts` is built. For prebuilt Docker images, prefer the `NUXT_` variables above to override at runtime.\n\n- **Notes**\n  - `NUXT_` variables map directly to `runtimeConfig` keys at runtime and take precedence in containers.\n  - Using `MCP_ENABLED=true` in Compose will not override a prebuilt image’s `runtimeConfig`; use `NUXT_MCP_ENABLED=true` instead.\n\n## Advanced Features\n\n### Model Context Protocol (MCP)\n\nChatOllama integrates with MCP to extend AI capabilities through external tools and data sources. MCP servers are managed through a user-friendly interface in Settings.\n\n#### MCP Server Management Permissions\n\nChatOllama provides flexible access control for MCP server management to support both development and production environments.\n\n**Permission Modes:**\n- **`ACL_ENABLED=false` (default)**: Open access - all users can manage MCP servers\n- **`ACL_ENABLED=true`**: Restricted access - only admin\u002Fsuperadmin users can manage MCP servers\n\n**🔧 Development & Personal Use (Recommended: ACL_ENABLED=false)**\n```bash\n# .env file\nACL_ENABLED=false\n```\n\n**User Experience by Role:**\n\n| User Type | ACL_ENABLED=false | ACL_ENABLED=true |\n|-----------|-------------------|------------------|\n| **Unauthenticated** | ✅ Full MCP access | ❌ Admin required |\n| **Regular User** | ✅ Full MCP access | ❌ Admin required |\n| **Admin** | ✅ Full MCP access | ✅ Full MCP access |\n| **Super Admin** | ✅ Full MCP access | ✅ Full MCP access |\n\n**Important Notes:**\n- **MCP Tool Usage**: All users can use configured MCP tools in chat regardless of ACL setting\n- **Backward Compatibility**: Existing installations continue working without changes\n- **Migration Safe**: Enable ACL anytime by setting `ACL_ENABLED=true`\n\n**Supported Transport Types:**\n- **STDIO** - Command-line tools (most common)\n- **Server-Sent Events (SSE)** - HTTP-based streaming\n- **Streamable HTTP** - HTTP-based communication\n\n**Configuration via Settings UI:**\n1. Navigate to **Settings → MCP** \n2. Click **\"Add Server\"** to create a new MCP server\n3. Configure server details:\n   - **Name**: Descriptive server name\n   - **Transport**: Choose STDIO, SSE, or Streamable HTTP\n   - **Command\u002FArgs** (STDIO): Executable path and arguments\n   - **URL** (SSE\u002FHTTP): Server endpoint URL\n   - **Environment Variables**: API keys and configuration\n   - **Enable\u002FDisable**: Toggle server status\n\n**STDIO Server Example:**\n```\nName: Filesystem Tools\nTransport: stdio\nCommand: uvx\nArgs: mcp-server-filesystem\nEnvironment Variables:\n  PATH: ${PATH}\n```\n\n**Migration from Legacy Config:**\nIf you have an existing `.mcp-servers.json` file:\n```bash\npnpm exec ts-node scripts\u002Fmigrate-mcp-servers.ts\n```\n\n**Popular MCP Servers:**\n- `mcp-server-filesystem` - File system operations\n- `mcp-server-git` - Git repository management  \n- `mcp-server-sqlite` - SQLite database queries\n- `mcp-server-brave-search` - Web search capabilities\n\n**How MCP Works in Chat:**\nWhen MCP servers are enabled, their tools become available to AI models during conversations. The AI can automatically call these tools to:\n- Read\u002Fwrite files when discussing code\n- Search the web for current information\n- Query databases for specific data\n- Perform system operations as needed\n\nTools are loaded dynamically and integrated seamlessly into the chat experience.\n\n#### Troubleshooting MCP Permissions\n\n**Common Issues and Solutions:**\n\n1. **\"Admin access required\" message appears:**\n   - **Cause**: `ACL_ENABLED=true` and user lacks admin privileges\n   - **Solution**: Either disable ACL or promote user to admin\n   ```bash\n   # Option 1: Disable ACL (development)\n   ACL_ENABLED=false\n   \n   # Option 2: Promote user to admin (contact super admin)\n   ```\n\n2. **Cannot access MCP settings after enabling ACL:**\n   - **Cause**: No admin account exists\n   - **Solution**: Create super admin account\n   ```bash\n   # Set before first user signup\n   SUPER_ADMIN_NAME=admin-username\n   ```\n\n3. **MCP tools not working in chat:**\n   - **Cause**: MCP feature disabled or servers misconfigured\n   - **Solution**: Check MCP feature flag and server status\n   ```bash\n   # Enable MCP feature\n   NUXT_MCP_ENABLED=true  # Docker\n   MCP_ENABLED=true       # .env\n   ```\n\n4. **Permission changes not taking effect:**\n   - **Cause**: Browser cache or session issue\n   - **Solution**: Logout and login again, or restart application\n\n## User Management & Admin Setup\n\n### Creating Super Admin Account\n\n**Before setting SUPER_ADMIN_NAME:**\n- The first user to sign up automatically becomes super admin\n\n**After setting SUPER_ADMIN_NAME:**\n- Only the user with the specified username becomes super admin when they sign up\n- Set in `.env` file: `SUPER_ADMIN_NAME=your-admin-username`\n- Or in Docker: add to environment variables\n\n**Managing existing users:**\n- Use the promotion script tool to manage super admin roles:\n  ```bash\n  # Promote existing user to super admin\n  pnpm promote-super-admin username_or_email\n  \n  # List current super admins\n  pnpm promote-super-admin --list\n  ```\n\n### Managing User Roles\n\n**Super Admin Capabilities:**\n- Promote regular users to admin\n- Manage all MCP servers (when ACL enabled)\n- Access user management interface\n- Configure system-wide settings\n\n**Admin Capabilities:**\n- Manage MCP servers (when ACL enabled)\n- Cannot promote other users\n\n**Regular User Capabilities:**\n- Use all chat features and MCP tools\n- Manage MCP servers (only when ACL disabled)\n\n### Production Security Recommendations\n\n```bash\n# Recommended production settings\nACL_ENABLED=false          # Default: open access to MCP management\nSUPER_ADMIN_NAME=admin     # Set super admin username\nAUTH_SECRET=your-long-random-secret-key-here\n```\n\n### Realtime Voice Chat\n\nEnable voice conversations with Gemini 2.0 Flash:\n\n1. Set your Google API key in Settings\n2. Enable \"Realtime Chat\" in Settings  \n3. Click the microphone icon to start voice conversations\n4. Access via `\u002Frealtime` page\n\n### Knowledge Bases\n\nCreate searchable document repositories for enhanced conversations using RAG (Retrieval Augmented Generation):\n\n1. **Enable Feature**: Set `KNOWLEDGE_BASE_ENABLED=true`\n2. **Setup Dependencies**: Vector store (Chroma\u002FMilvus) + Redis + Embedding models\n3. **Create & Upload**: Build knowledge bases with your documents\n4. **Chat Enhanced**: AI references your documents automatically\n\n**📖 [Complete Configuration Guide →](docs\u002Fguide\u002Fknowledge-base-configuration.md)**\n\nQuick setup with Docker:\n```bash\n# All services included in docker-compose.yaml\ndocker compose up\n```\n\n### Data Storage\n\n**Docker Deployment:**\n- **Vector Data** - Stored in Docker volumes (chromadb_volume)\n- **Relational Data** - SQLite database at `~\u002F.chatollama\u002Fchatollama.sqlite`\n- **Redis** - Session and caching data\n\n**Development:**\n- **Database** - Local SQLite file\n- **Vector Store** - External ChromaDB\u002FMilvus instance\n\n## Development\n\n### Project Structure\n\n```\nchatollama\u002F\n├── components\u002F          # Vue components\n├── pages\u002F              # Nuxt pages (routing)\n├── server\u002F             # API routes and server logic\n├── prisma\u002F             # Database schema and migrations\n├── locales\u002F            # Internationalization files\n├── config\u002F             # Configuration files\n└── docker-compose.yaml # Docker deployment\n```\n\n### Available Scripts\n\n```bash\n# Development\npnpm dev                # Start development server\npnpm build             # Build for production\npnpm preview           # Preview production build\n\n# Database\npnpm prisma-migrate    # Run database migrations\npnpm prisma-generate   # Generate Prisma client\npnpm prisma-push       # Push schema changes\n\n# User Management\npnpm promote-super-admin \u003Cusername|email>  # Promote user to super admin\npnpm promote-super-admin --list            # List all super admins\n```\n\n### Contributing\n\n1. **Keep dependencies updated:** `pnpm install` after each `git pull`\n2. **Run migrations:** `pnpm prisma-migrate` when schema changes\n3. **Follow conventions:** Use TypeScript, Vue 3 Composition API, and Tailwind CSS\n4. **Test thoroughly:** Verify both Docker and development setups\n\n### Tech Stack\n\n- **Frontend:** Nuxt 3, Vue 3, Nuxt UI, Tailwind CSS\n- **Backend:** Nitro (Nuxt server), Prisma ORM\n- **Database:** SQLite (development), PostgreSQL (production ready)\n- **Vector DB:** ChromaDB, Milvus\n- **AI\u002FML:** LangChain, Ollama, OpenAI, Anthropic, Google AI\n- **Deployment:** Docker, Docker Compose\n\n## Join Our Community\n\nJoin our Discord community for support, discussions, and updates:\n\n**[Discord Invite Link](https:\u002F\u002Fdiscord.gg\u002FTjhZGYv5pC)**\n\n- **#technical-discussion** - For contributors and technical discussions\n- **#customer-support** - Get help with usage issues and troubleshooting\n- **#general** - Community chat and announcements\n\n## License\n\n[MIT License](LICENSE)\n","ChatOllama 是一个开源的AI聊天机器人平台，旨在将前沿的语言模型带到用户手中，同时确保数据的私密性和安全性。它支持多种语言模型，包括OpenAI、Anthropic等，并具备知识库、实时语音聊天和模型上下文协议（MCP）集成等高级功能。该平台使用TypeScript编写，基于Nuxt 3框架构建，支持多模态聊天、AI代理以及向量数据库等功能。特别适合需要高性能和可扩展性的企业级应用环境，如客户服务、在线教育、智能助手等场景。通过Docker可以轻松部署，也支持开发环境下的自定义配置。","2026-06-11 03:47:04","high_star"]