[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-81636":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":12,"openIssues":14,"contributorsCount":15,"subscribersCount":15,"size":15,"stars1d":15,"stars7d":15,"stars30d":15,"stars90d":15,"forks30d":15,"starsTrendScore":15,"compositeScore":16,"rankGlobal":10,"rankLanguage":10,"license":10,"archived":17,"fork":17,"defaultBranch":18,"hasWiki":19,"hasPages":17,"topics":20,"createdAt":10,"pushedAt":10,"updatedAt":21,"readmeContent":22,"aiSummary":23,"trendingCount":15,"starSnapshotCount":15,"syncStatus":24,"lastSyncTime":25,"discoverSource":26},81636,"LiteChat","zsj1029\u002FLiteChat","zsj1029","LiteChat is forked from llama.cpp WebUI, Make It supports vLLM","",null,"TypeScript",21,4,1,0,39.1,false,"main",true,[],"2026-06-12 04:01:34","# LiteChat\n\n\u003Cdiv align=\"center\">\n\n> 轻量级本地大模型聊天 WebUI，支持 vLLM、llama.cpp 及任何 OpenAI 兼容 API\n\n![LiteChat](demo.png)\n\n[English](#english-readme)\n\n\u003C\u002Fdiv>\n\n---\n\n## 简介\n\nLiteChat 是基于 [llama.cpp WebUI](https:\u002F\u002Fgithub.com\u002Fggerganov\u002Fllama.cpp) fork 而来，针对企业内网部署进行了适配和优化。支持 vLLM、llama.cpp 等后端，可通过环境变量自定义后端地址和 App 名称，方便企业内部快速部署使用。\n\n## 特性\n\n- **多后端支持** — 原生支持 vLLM、llama.cpp，兼容任何 OpenAI 格式的 API（Ollama、LM Studio 等）\n- **Think 模式切换** — 支持深度思考模型（如 DeepSeek R1、Qwen Thinking），可一键切换开启或关闭推理模式\n- **vLLM 适配** — 修复了 vLLM 流式输出时前端 Token 速度统计不准确的问题，适配 `reasoning` 字段和 `usage` 精确统计\n- **自定义后端与名称** — 通过 `.env` 文件配置后端 API 地址和应用名称，无需修改代码即可适配企业环境\n- **精简高效** — 移除了企业场景不需要的 MCP 模块，优化打包体积（初始加载从 6.2MB 降至约 150KB）\n- **纯静态部署** — 构建后生成纯静态文件，任何 HTTP 服务器均可部署，无需 Node.js 运行环境\n- **Markdown 渲染** — 代码高亮、KaTeX 数学公式、表格等完整支持\n- **会话分支** — 编辑、重新生成、分支导航\n- **暗色\u002F亮色主题** — 自动检测系统偏好\n\n## 快速开始\n\n### 1. 安装依赖\n\n```bash\nbun install\n```\n\n### 2. 配置环境变量\n\n```bash\ncp .env.example .env\n```\n\n编辑 `.env` 文件，修改后端地址和应用名称：\n\n```env\n# 后端 API 地址\nVITE_API_TARGET=http:\u002F\u002Flocalhost:8000\n\n# 应用名称（显示在页面标题和侧边栏）\nVITE_PUBLIC_APP_NAME=LiteChat\n\n# API Key（可选）\n# VITE_API_KEY=your-api-key-here\n```\n\n常见的后端配置：\n\n| 后端       | 默认端口 | 示例                           |\n| ---------- | -------- | ------------------------------ |\n| vLLM       | 8000     | `http:\u002F\u002Flocalhost:8000`        |\n| llama.cpp  | 8080     | `http:\u002F\u002Flocalhost:8080`        |\n| Ollama     | 11434    | `http:\u002F\u002Flocalhost:11434`       |\n| LM Studio  | 1234     | `http:\u002F\u002Flocalhost:1234`        |\n\n### 3. 运行\n\n```bash\n# 开发模式（热更新）\nbun run dev\n\n# 构建生产版本\nbun run build\n```\n\n开发服务器默认在 `http:\u002F\u002Flocalhost:5173` 启动。\n\n## 项目结构\n\n```\nwebui\u002F\n├── src\u002F\n│   ├── lib\u002F\n│   │   ├── components\u002F   # UI 组件\n│   │   ├── stores\u002F       # 状态管理（Svelte 5 runes）\n│   │   ├── services\u002F     # API 和数据服务\n│   │   ├── types\u002F        # TypeScript 类型定义\n│   │   └── utils\u002F        # 工具函数\n│   ├── routes\u002F           # SvelteKit 路由\n│   └── app.html          # HTML 模板\n├── static\u002F               # 静态资源\n├── scripts\u002F\n│   └── vite-plugin-llama-cpp-build.ts  # 构建后处理插件\n├── .env.example          # 环境变量示例\n├── svelte.config.js      # SvelteKit 配置\n└── vite.config.ts        # Vite 配置\n```\n\n## 常用命令\n\n| 命令                 | 说明                    |\n| -------------------- | ----------------------- |\n| `bun run dev`        | 启动开发服务器           |\n| `bun run build`      | 构建生产版本             |\n| `bun run preview`    | 本地预览生产构建         |\n| `bun run check`      | TypeScript 类型检查      |\n| `bun run lint`       | 代码风格检查             |\n| `bun run format`     | 自动格式化代码           |\n\n## 从 llama.cpp 的改进\n\n| 特性               | 原始 llama.cpp WebUI         | LiteChat                          |\n| ------------------ | ---------------------------- | --------------------------------- |\n| 后端支持           | 仅 llama.cpp                 | vLLM、llama.cpp、OpenAI 兼容 API |\n| Token 速度统计     | 仅 llama.cpp 精确             | vLLM 字符估算 + `usage` 精确统计  |\n| 推理模式           | 不支持                       | 支持 `reasoning` \u002F `reasoning_content` 切换 |\n| 应用名称           | 硬编码                       | 通过 `VITE_PUBLIC_APP_NAME` 配置  |\n| 打包体积           | ~6.2MB 单文件                | 分包加载，首屏约 150KB            |\n| MCP 模块           | 完整支持                      | 已移除                             |\n| 静态部署           | 依赖 llama-server 嵌入       | 纯静态文件，任意 HTTP 服务器可用    |\n\n---\n\n# \u003Ca id=\"english-readme\">English README\n\n\u003Cdiv align=\"center\">\n\n> Lightweight local LLM chat WebUI, supporting vLLM, llama.cpp, and any OpenAI-compatible API\n\n[中文](#litechat)\n\n\u003C\u002Fdiv>\n\n---\n\n## Overview\n\nLiteChat is forked from [llama.cpp WebUI](https:\u002F\u002Fgithub.com\u002Fggerganov\u002Fllama.cpp), adapted and optimized for enterprise LAN deployment. It supports vLLM, llama.cpp, and any OpenAI-compatible API backend. Configure the backend API endpoint and app name via environment variables — no code changes needed.\n\n## Features\n\n- **Multi-backend Support** — Native support for vLLM, llama.cpp, and any OpenAI-compatible API (Ollama, LM Studio, etc.)\n- **Think Mode Toggle** — Supports deep thinking models (e.g. DeepSeek R1, Qwen Thinking) with a one-click toggle to enable\u002Fdisable reasoning mode\n- **vLLM Compatibility** — Fixed token speed statistics for vLLM streaming, adapted `reasoning` field and `usage`-based precise token counting\n- **Customizable Backend & Name** — Configure API endpoint and app name via `.env` for quick enterprise deployment\n- **Optimized Bundle** — Removed unnecessary MCP module, reduced initial load from ~6.2MB to ~150KB with split chunk loading\n- **Static Deployment** — Fully static build, deployable on any HTTP server without Node.js\n- **Markdown Rendering** — Syntax highlighting, KaTeX math formulas, tables\n- **Conversation Branching** — Edit, regenerate, and navigate between branches\n- **Dark\u002FLight Theme** — System preference detection\n\n## Quick Start\n\n### 1. Install Dependencies\n\n```bash\nbun install\n```\n\n### 2. Configure Environment\n\n```bash\ncp .env.example .env\n```\n\nEdit `.env` to set your backend and app name:\n\n```env\n# Backend API endpoint\nVITE_API_TARGET=http:\u002F\u002Flocalhost:8000\n\n# App name (displayed in page title and sidebar)\nVITE_PUBLIC_APP_NAME=LiteChat\n\n# API Key (optional)\n# VITE_API_KEY=your-api-key-here\n```\n\nCommon backend configurations:\n\n| Backend     | Default Port | Example                      |\n| ----------- | ------------ | ---------------------------- |\n| vLLM        | 8000         | `http:\u002F\u002Flocalhost:8000`      |\n| llama.cpp   | 8080         | `http:\u002F\u002Flocalhost:8080`      |\n| Ollama      | 11434        | `http:\u002F\u002Flocalhost:11434`     |\n| LM Studio   | 1234         | `http:\u002F\u002Flocalhost:1234`      |\n\n### 3. Run\n\n```bash\n# Development mode (hot reload)\nbun run dev\n\n# Production build\nbun run build\n```\n\nThe dev server starts at `http:\u002F\u002Flocalhost:5173`.\n\n## Project Structure\n\n```\nwebui\u002F\n├── src\u002F\n│   ├── lib\u002F\n│   │   ├── components\u002F   # UI components\n│   │   ├── stores\u002F       # State management (Svelte 5 runes)\n│   │   ├── services\u002F     # API and data services\n│   │   ├── types\u002F        # TypeScript type definitions\n│   │   └── utils\u002F        # Utility functions\n│   ├── routes\u002F           # SvelteKit routes\n│   └── app.html          # HTML template\n├── static\u002F               # Static assets\n├── scripts\u002F\n│   └── vite-plugin-llama-cpp-build.ts  # Post-build plugin\n├── .env.example          # Environment variable template\n├── svelte.config.js      # SvelteKit configuration\n└── vite.config.ts        # Vite configuration\n```\n\n## Scripts\n\n| Command              | Description                  |\n| -------------------- | ---------------------------- |\n| `bun run dev`        | Start development server     |\n| `bun run build`      | Build for production         |\n| `bun run preview`    | Preview production build     |\n| `bun run check`      | TypeScript type checking     |\n| `bun run lint`       | Lint code style              |\n| `bun run format`     | Auto-format with Prettier    |\n\n## Changes from llama.cpp WebUI\n\n| Feature              | Original llama.cpp WebUI     | LiteChat                      |\n| -------------------- | ---------------------------- | ----------------------------- |\n| Backend Support      | llama.cpp only               | vLLM, llama.cpp, OpenAI-compatible |\n| Token Speed Stats    | llama.cpp only               | vLLM char estimation + `usage`-based precise counting |\n| Think\u002FReasoning Mode | Not supported                | `reasoning` \u002F `reasoning_content` toggle support |\n| App Name             | Hardcoded                    | Configurable via `VITE_PUBLIC_APP_NAME` |\n| Bundle Size          | ~6.2MB single file           | Split chunks, ~150KB initial load |\n| MCP Module           | Full support                 | Removed                       |\n| Static Deployment    | Requires llama-server embed  | Pure static, any HTTP server  |\n\n---\n\n## Credits\n\nThis project is forked from [llama.cpp WebUI](https:\u002F\u002Fgithub.com\u002Fggerganov\u002Fllama.cpp) (MIT License).\n\nDriven by **Qwen3.6 27B** (vLLM), **Claude**.\n","LiteChat 是一个轻量级的本地大模型聊天 WebUI，支持 vLLM、llama.cpp 及任何 OpenAI 兼容 API。其核心功能包括多后端支持、Think 模式切换、vLLM 适配、自定义后端与名称配置等。通过环境变量可以轻松设置后端地址和应用名称，便于企业内部快速部署。此外，项目还优化了前端加载速度，移除了不必要的模块，并支持纯静态部署，无需 Node.js 运行环境。适用于需要在内网环境中快速搭建大模型聊天界面的企业场景。",2,"2026-06-11 04:05:48","CREATED_QUERY"]