登录 注册
AI 模型与开发框架 chatgpthacktoberfesthuggingfacellmsveltesvelte-kit
11,029
Stars
1,714
Forks
97
Watchers
324
Open Issues
Apache-2.0
许可证
TypeScript
语言
2023-02-17
创建时间
2026-11-11
最近更新

项目能做什么

驱动 HuggingChat 的开源代码库。
来源:AI 基于仓库事实生成 · 内容以仓库实际 README 为准

使用说明 查看原始 README 原仓库文档

中文使用说明暂未生成。下面保留原仓库 README 摘录,命令与配置均以原文为准。
原始 README 摘录(英文原文,节选前 3000 字符)
# Chat UI

![Chat UI repository thumbnail](https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/chat-ui/chat-ui-2026.png)

A chat interface for LLMs. It is a SvelteKit app and it powers the [HuggingChat app on hf.co/chat](https://huggingface.co/chat).

0. [Quickstart](#quickstart)
1. [Database Options](#database-options)
2. [Launch](#launch)
3. [Optional Docker Image](#optional-docker-image)
4. [Extra parameters](#extra-parameters)
5. [ML Intern](#ml-intern)
6. [Building](#building)

> [!NOTE]
> Chat UI only supports OpenAI-compatible APIs via `OPENAI_BASE_URL` and the `/models` endpoint. Provider-specific integrations (legacy `MODELS` env var, GGUF discovery, embeddings, web-search helpers, etc.) are removed, but any service that speaks the OpenAI protocol (llama.cpp server, Ollama, OpenRouter, etc.) will work by default.

> [!NOTE]
> The old version is still available on the [legacy branch](https://github.com/huggingface/chat-ui/tree/legacy)

## Quickstart

Chat UI speaks to OpenAI-compatible APIs only. The fastest way to get running is with the Hugging Face Inference Providers router plus your personal Hugging Face access token.

**Step 1 – Create `.env.local`:**

```env
OPENAI_BASE_URL=https://router.huggingface.co/v1
OPENAI_API_KEY=hf_************************
```

`OPENAI_API_KEY` can come from any OpenAI-compatible endpoint you plan to call. Pick the combo that matches your setup and drop the values into `.env.local`:

| Provider                                      | Example `OPENAI_BASE_URL`          | Example key env                                                         |
| --------------------------------------------- | ---------------------------------- | ----------------------------------------------------------------------- |
| Hugging Face Inference Providers router       | `https://router.huggingface.co/v1` | `OPENAI_API_KEY=hf_xxx` (or `HF_TOKEN` legacy alias)                    |
| llama.cpp server (`llama.cpp --server --api`) | `http://127.0.0.1:8080/v1`         | `OPENAI_API_KEY=sk-local-demo` (any string works; llama.cpp ignores it) |
| Ollama (with OpenAI-compatible bridge)        | `http://127.0.0.1:11434/v1`        | `OPENAI_API_KEY=ollama`                                                 |
| OpenRouter                                    | `https://openrouter.ai/api/v1`     | `OPENAI_API_KEY=sk-or-v1-...`                                           |
| Poe                                           | `https://api.poe.com/v1`           | `OPENAI_API_KEY=pk_...`                                                 |

Check the root [`.env` template](./.env) for the full list of optional variables you can override.

**Step 2 – Install and launch the dev server:**

```bash
git clone https://github.com/huggingface/chat-ui
cd chat-ui
npm install
npm run dev -- --open
```

You now have Chat UI running locally. Open the browser and start chatting.

## Database Options

Chat history, users, settings, files, and sta
阅读完整原文

商业机会分析 AI 生成

企业私有化 LLM 门户定制交付(白标解决方案)

产品构想基于 chat-ui 进行二次开发,补足企业级认证、审计日志与合规过滤,为注重数据隐私的企业提供内网 AI 助手前端交付方案。
核心功能企业 SSO/LDAP 对接、敏感信息脱敏与审计日志、品牌 UI 白标定制、内部知识库 (RAG) 端点集成。
目标用户中小企业 IT 负责人、数据敏感型行业(医疗/金融/法务)技术团队。
难度/周期中等 · 2-4 周 · 成本:极低(主要是开发机与基础云测试环境)
收费模式一次性项目交付实施费 + 年度维保与技术支持费。
竞争风险开源竞品(如 Open WebUI、LibreChat)功能丰富度竞争激烈;B端客户决策周期长。
依据 已验证事实

垂直行业定制化 AI 对话 SaaS(轻量产品化)

产品构想利用其高性能的 SvelteKit 交互架构,连接垂直领域微调模型或 Prompt 工作流,打包为面向特定行业从业者的专用 AI 生产力工具。
核心功能垂直模型/知识库接入、专业报告导出格式(Markdown/PDF/Word)、行业 Prompt 市场、多模型效果对比分栏。
目标用户科研学者、跨境电商文案人员、特定垂直领域专业研究员。
难度/周期中等 · 3-6 周 · 成本:轻量托管成本(Vercel/Cloudflare)+ 初始模型推理 API 调用费用
收费模式阶梯式月度/年度会员订阅(SaaS模式),按 Token 使用量充值。
竞争风险C端或垂直专业用户获客成本高;通用大模型迭代可能压缩垂直工具生存空间。
依据 AI推测

chat-ui 商业化增强插件与计费中台套件

产品构想针对基于 chat-ui 自建对外服务的独立开发者与中小创客,提供预打包的商业化插件(支付、Token 额度控制、会员系统)。
核心功能Stripe/微信支付集成组件、按模型/Token 动态扣费机制、多租户用户鉴权与额度分配看板、开箱即用的 Docker Compose 商业镜像。
目标用户使用 chat-ui 作为底座开发 AI 商业产品的独立开发者、小型 AI 创企。
难度/周期较低 · 1-3 周 · 成本:开发与文档托管成本(几乎为零)
收费模式源码授权出售(如 Gumroad/独立站销售扩展包),提供按次技术咨询。
竞争风险开源开发者群体可能更倾向于自行编写逻辑,直接付费转化率待检验。
依据 尚需验证的假设
AI 基于仓库公开数据分析生成,含推测成分,不构成收益承诺。
报告会保存到 个人中心

竞品与相似项目 GitHub Search 真实检索

项目中文简介Stars语言
NousResearch/hermes-agent 中文介绍暂未生成
The agent that grows with you
262,395 Python
f/prompts.chat 中文介绍暂未生成
f.k.a. Awesome ChatGPT Prompts. Share, discover, and collect
176,834 MDX
langflow-ai/langflow 中文介绍暂未生成
Langflow is a powerful tool for building and deploying AI-po
156,509 Python
langchain-ai/langchain 中文介绍暂未生成
The agent engineering platform.
149,319 Python
microsoft/generative-ai-for-beginners 中文介绍暂未生成
21 Lessons, Get Started Building with Generative AI
123,306 Jupyter Notebook
rasbt/LLMs-from-scratch 中文介绍暂未生成
Implement a ChatGPT-like LLM in PyTorch from scratch, step b
108,187 Jupyter Notebook
以上为通过 GitHub 官方 Search API 检索的相似项目,功能差异与优劣势需进一步人工确认,配置 AI 后可生成对比分析。

项目优势与风险

技术成熟度创建于 2023-02-17,近 30 天仍在推送,发布过 18 个 Release
社区活跃Star 11,029 / Fork 1,714 / Issue 324(数据支持,可自行核实)
许可证Apache-2.0
主要风险上游项目方向可能变化;同赛道竞争者较多(见竞品表);热度与需求不完全等价

安装与使用

快速开始(以仓库 README 为准)
git clone https://github.com/huggingface/chat-ui.git
cd chat-ui
# 请阅读仓库 README 获取确切安装步骤(依赖、配置、启动命令)
阅读原仓库文档
术语说明:Docker=应用容器(把程序和依赖打包运行);API Key=调用外部服务的密钥;Git Clone=把仓库代码下载到本地。常见错误:API Key 未配置 / 端口占用 / 数据库连接失败,多数项目在 README 的 Troubleshooting 章节有说明。