Skip to content

leodenglovescode/llmgps

Repository files navigation

llmgps

Docker CI Next.js React TypeScript Tailwind CSS GitHub Stars Last Commit License: MIT

中文文档

llmgps is a self-hostable multi-LLM chat workspace.

Features

  • Modern Interface: Clean, responsive, and easy to use.
  • Debate Mode: Advanced multi-model reasoning through structured disagreement.
  • GPS Mode: Multi-model consensus and synthesis.
  • Mainstream Presets: Out-of-the-box support for major AI providers.
  • Ollama Integration: Full support for local model deployment.
  • Encrypted Storage: History and keys saved in an encrypted SQLite database.
  • Search & Proxy: Built-in web search support and proxy configuration.

Debate Mode Logic

Choose up to 5 models to tackle complex queries:

  1. Initial Phase: All models receive the prompt simultaneously.
  2. Consensus Check: A synthesizer evaluates if the models broadly agree.
  3. Debate Rounds: If there is friction, models review each other's points and refine their logic.
  4. Search Intervention: If disagreement persists, the system triggers web search to provide fresh grounding data.
  5. Synthesis: After a maximum of 2 rounds, the synthesizer generates a final, verified answer.

GPS Mode Logic

Choose up to 5 models. The system merges their independent responses into one cohesive final answer, highlighting key differences or specific insights from each model.


Screenshots

UI Desktop UI Mobile

Deployment & Setup

Docker (Recommended)

Pull and run:

docker pull ghcr.io/leodenglovescode/llmgps:main

docker run -d \
  -p 3000:3000 \
  -e LLMGPS_DATA_KEY=your-secret-key \
  -v llmgps-data:/data \
  --name llmgps \
  ghcr.io/leodenglovescode/llmgps:main

Access: http://localhost:3000

Set LLMGPS_DATA_KEY to any strong secret string. The /data volume persists your history and settings.

Local Development

  1. Install: npm install
  2. Run: npm run dev
  3. Access: http://localhost:3000

Data & Security

llmgps uses an encrypted SQLite database for all sensitive information.

  • Encryption Key: Set via LLMGPS_DATA_KEY.
  • Key Handling: In local dev, a .llmgps-data.key is auto-generated. In Docker, a key must be manually provided.
  • Persistence: Mount the /data directory to keep your history and keys safe.

Ollama Support

  1. Start Ollama.
  2. In llmgps Settings, enable Ollama and set your base URL (e.g., http://127.0.0.1:11434).
  3. Select your local models directly in the GPS/Debate routing.

Debate Mode Flow Chart

debate-logic-flow

Credits & Contributing

Contributions are welcome! If you are familiar with the architecture, feel free to open a PR.