ChuanhuChatGPT

GaiZhenbiaoGPL-3.0活跃维护 有专家点评

给 ChatGPT 及 Llama、Claude、Gemini 等大模型套上清爽的网页界面,支持智能体、文件问答、联网搜索和模型微调,开箱即用。

GUI for ChatGPT API and many LLMs. Supports agents, file-based QA, GPT finetuning and query with web search. All with a neat UI.

20250815发布于 2025-08-15 02:27 UTC15,243star +1 / 7 天2,179fork同步于 2026-11-11 05:25 UTC

专家点评

上手难度:进阶更新于 2026-11-11

给多家 LLM API 和本地模型套一层 Gradio Web UI,替代自己写前端和会话管理

适用场景

  • 内部小团队要一个能立刻用的多模型对话入口:填 config.json 里的 key 就能跑,省掉自建前端和会话持久化,换别的方案通常要接 LangChain 或自己写 React
  • 需要把文件丢进去做问答、或让模型联网查资料:README 里文件知识库和 web search 是内置开关,不用另起 RAG 服务
  • 单机跑本地模型(ChatGLM/Qwen/LLaMA)并想同时对比 API 模型效果:同一个界面切换后端,比装多个独立 WebUI 省事
  • 想用 PWA 在手机上访问自己部署的实例:Gradio 自带移动端适配,换成纯 API 服务还得自己写客户端

踩坑

  • 部署到公网时把 share 设为 true:issue 里有标题明确记录 share=true 后被封号的情况,说明这条路径会把你暴露在平台风控下,长期对外服务应该用 server_name/server_port 自己反代
  • 依赖上游 API 的私有接口:issue 里出现过官方改 free credit balance 接口导致 credit_grants 请求失败,这类非公开端点变动会直接打断功能,且不是本项目能控制的
  • 首次运行必须先复制 config_example.json 为 config.json 并填 key,否则起不来;本地模型还要另外下权重,这一步 README 没有统一脚本

同类对比

如果只是要一个稳定的多模型聊天前端,Open WebUI 的维护节奏和部署形态更接近生产;如果核心诉求是文件问答/RAG 流水线而不是界面,直接上 LangChain 或 LlamaIndex 自己拼更可控。

怎么上手

由 README 提炼,执行前请确认
git clone https://github.com/GaiZhenbiao/ChuanhuChatGPT.git
cd ChuanhuChatGPT
pip install -r requirements.txt
cp config_example.json config.json
python ChuanhuChatbot.py
硬件要求按 README 说明

README 未说明具体显存或 GPU 型号要求;本地部署 LLM 需自行准备运行环境,仅用 API 模型时按 README 未提及特殊硬件要求。

支持 Apple Silicon
下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

由 README 自动翻译提炼

给 ChatGPT 等多种 LLM 套上轻快好用的 Web 图形界面,附带文件问答、联网搜索、Agent 等增强功能

给 ChatGPT 及 Llama、Claude、Gemini 等大模型套上清爽的网页界面,支持智能体、文件问答、联网搜索和模型微调,开箱即用。

核心能力

  • 基于 Gradio 提供 Web 图形界面,支持移动端与 PWA 安装
  • 接入 GPT-5、Claude、Gemini、DeepSeek 等多家 API 模型
  • 支持 ChatGLM、LLaMA、Qwen 等本地部署模型
  • 基于文件构建知识库进行问答,并支持联网搜索
  • 内置类 AutoGPT 的川虎助理,可微调 GPT-3.5

容易踩的坑

需先把 config_example.json 复制为 config.json 并填入 API-Key 等设置才能运行;本地部署模型需额外下载对应模型权重;部署到服务器需在 config.json 中设置 server_name 和 server_port,获取公共链接需设置 share 为 true 且程序保持运行。

内容由模型根据 README 生成,可能不完整或不准确,以官方文档为准。看原文 README

最近发版

5 个版本20250815
  1. 20250815最新正式版2025-08-15 · 2025-08-15 02:27 UTC

    Features

    • Added support for GPT-5 models (@GaiZhenbiao)
    • Added support for DeepSeek models (@GaiZhenbiao)
    • Gemini models support custom API host (@GaiZhenbiao)

    Miscellaneous

    • Changed the CDN address of third-party JS to cdnjs
    • Improved error messages for update checks

    KNOWN ISSUES

    • LaTeX rendering is disabled due to an issue in Gradio

    Features

    • 新增 GPT-5 模型支持 (@GaiZhenbiao)
    • 新增 DeepSeek 模型支持 (@GaiZhenbiao)
    • Gemini模型支持自定义API host (@GaiZhenbiao)

    Miscellaneous

    • 修改第三方 js 的 cdn 地址为 cdnjs
    • 完善了检查更新的错误提示

    KNOWN ISSUES

    • 由于 Gradio 的一个问题,LaTeX 渲染被禁用 LaTeX rendering is disabled due to an issue in Gradio

    Full Changelog: https://github.com/GaiZhenbiao/ChuanhuChatGPT/compare/20241204...20250815

  2. 202412042024-12-04 · 2024-12-04 13:50 UTC
    查看更新说明

    Features

    • Added the ability to preserve the "single-turn" and "streaming" toggle state in conversation history (@GaiZhenbiao, @Keldos-Li)
    • Introduced the admin_list parameter to restrict service restart/update to administrators only (@GaiZhenbiao)
    • Added an optional setting for renaming conversations via a model (@slideslide)
    • Improved the code for renaming, exporting, and downloading conversation history (@GaiZhenbiao, @Keldos-Li)
    • Saved conversation history no longer includes unnecessary HTML tags (@GaiZhenbiao)
    • Enabled scrolling in the conversation interface during generation (@Keldos-Li)

    Bug Fixes

    • Fixed display issues for certain models in the frontend (@GaiZhenbiao)
    • Resolved and optimized issues with uploading, loading, and refreshing historical files (@GaiZhenbiao)
    • Added additional checks when loading prompt templates (@GaiZhenbiao)
    • Addressed an issue where users could access other users' conversation histories (@GaiZhenbiao)
    • Fixed mismatches in the "streaming" toggle state when creating new conversations (@GaiZhenbiao)
    • Introduced a timeout mechanism for regular expression searches in conversation history to prevent ReDoS vulnerabilities (@GaiZhenbiao)
    • Resolved conversation misalignment issues when switching outputs during chatting (@Keldos-Li)
    • Fixed other potential issues

    Miscellaneous

    • Updated compatibility with Gradio to version 4.29.0
    • Changed the log level to debug for switching to an empty conversation or creating a new one (@GaiZhenbiao)

    KNOWN ISSUES

    • LaTeX rendering is disabled due to an issue in Gradio

    Features

    • 在对话历史记录中能够保存“单轮对话”和“流式传输”勾选状态 (@GaiZhenbiao, @Keldos-Li)
    • 增加admin_list参数,只允许管理员重启/更新服务 (@GaiZhenbiao)
    • 增加对话重命名模型设置(可选) (@XiaoRan)
    • 改进了重命名、导出、下载对话历史记录的代码 (@GaiZhenbiao, @Keldos-Li)
    • 保存的对话历史记录不再包含多余的HTML标签 (@GaiZhenbiao)
    • 生成时对话界面允许滚动 (@Keldos-Li)

    Bug Fixes

    • 修复了部分模型的前端显示问题 (@GaiZhenbiao)
    • 修复优化了上传、加载、刷新历史文件时可能的问题 (@GaiZhenbiao)
    • 在加载 prompt 模板时加入额外的检查 (@GaiZhenbiao)
    • 解决了用户可能访问其他用户历史记录的问题 (@GaiZhenbiao)
    • 修复创建新对话时的流式传输勾选不匹配的问题 (@GaiZhenbiao)
    • 在用正则表达式搜索历史记录时加入超时机制,以避免ReDoS问题 (@GaiZhenbiao)
    • 修复在输出时切换时聊天导致对话错乱的问题 (@Keldos-Li)
    • 修复了其他潜在的问题

    Miscellaneous

    • 更新适配 Gradio 到 4.29.0
    • 切换空对话/创建新对话时的日志级别修改为debug (@GaiZhenbiao)

    KNOWN ISSUES

    • 由于 Gradio 的一个问题,LaTeX 渲染被禁用 LaTeX rendering is disabled due to an issue in Gradio

    Full Changelog: https://github.com/GaiZhenbiao/ChuanhuChatGPT/compare/20240914...20241204

    [!important] 如果您手动更新,请在更新完成后执行以下命令更新依赖。 Please execute the following commands after manually updating.

    pip install -r requirements.txt --upgrade
    
  3. 20240919-420240919: Safety patchespre-release2024-09-18 · 2024-09-18 04:47 UTC
    查看更新说明

    This update brings numerous security bug fixes, and it is recommended for all users to install.

    Bug Fixes

    • Added additional checks when creating/deleting history records (@GaiZhenbiao)
    • Added extra checks when loading prompt templates (@GaiZhenbiao)
    • Triggered exceptions if the python multipart boundary is too long to address server crashes with overly long boundaries (@GaiZhenbiao)
    • Added additional checks when deleting history records (@GaiZhenbiao)
    • Introduced a timeout mechanism when searching history records using regex to prevent ReDoS issues (@GaiZhenbiao)
    • Added additional checks when refreshing history records (@GaiZhenbiao)
    • Implemented additional sanitization when uploading history records to resolve potential XSS issues. Furthermore, the method of saving history records has been modified to exclude HTML tags (@GaiZhenbiao)
    • Added checks for username validity when loading history record files (@GaiZhenbiao)
    • Resolved the LFI issue when uploading history file (@GaiZhenbiao)
    • Fixed the issue that any user can restart the service. Added admin_list parameter in the config. (@GaiZhenbiao)
    • Resolved an issue where users could access other users' histories (@GaiZhenbiao, @Keldos-Li)

    Miscellaneous

    • Changed the log level of non-existent history records to debug (@GaiZhenbiao)

    KNOWN ISSUES

    • LaTeX rendering is disabled due to an issue in Gradio LaTeX rendering is disabled due to an issue in Gradio

    Full Changelog: https://github.com/GaiZhenbiao/ChuanhuChatGPT/compare/20240914...20240918

    这枚更新带来了许多安全bug修复,推荐所有用户安装。

    Bug Fixes

    • 在创建/删除历史记录时加入额外的检查 (@GaiZhenbiao)
    • 在加载prompt模板时加入额外的检查 (@GaiZhenbiao)
    • 如果python multipart的边界过长,则触发异常,以解决在超长边界时服务器死机问题 (@GaiZhenbiao)
    • 在删除历史记录时加入额外的检查 (@GaiZhenbiao)
    • 在用正则表达式搜索历史记录时加入超时机制,以避免ReDoS问题 (@GaiZhenbiao)
    • 在刷新历史记录时加入额外的检查 (@GaiZhenbiao)
    • 在上传历史记录时加入额外的清洁,以解决潜在的XSS问题。此外,也修改了保存历史记录的方式,不再包含HTML标签。 (@GaiZhenbiao)
    • 在加载历史记录文件时加入对用户名合法性的检查 (@GaiZhenbiao)
    • 解决上传历史记录时的LFI问题 (@GaiZhenbiao)
    • 解决了任何用户都可以重启服务的问题,只有管理员用户可以重启服务。(@GaiZhenbiao)
    • 解决了用户可能访问其他用户历史记录的问题 (@GaiZhenbiao, @Keldos-Li)

    Miscellaneous

    • 将历史记录不存在的日志级别修改为 debug (@GaiZhenbiao)

    KNOWN ISSUES

    • 由于 Gradio 的一个问题,LaTeX 渲染被禁用 LaTeX rendering is disabled due to an issue in Gradio

    Full Changelog: https://github.com/GaiZhenbiao/ChuanhuChatGPT/compare/20240914...20240919

  4. 202409142024-09-14 · 2024-09-14 11:14 UTC
    查看更新说明

    Features

    • 🚀 新增 GPT o1-preview 和 o1-mini 模型支持! (@GaiZhenbiao)

    Bug Fixes

    • 修复使用 Azure 时构建知识库索引失败的问题 (@ZhengQinyu)

    Miscellaneous

    • 调整讯飞大模型名称 (@ZhengQinyu)
    • 修改 Docker 包构建 (@GaiZhenbiao)

    KNOWN ISSUES

    • 由于 Gradio 的一个问题,LaTeX 渲染被禁用 LaTeX rendering is disabled due to an issue in Gradio

    Full Changelog: https://github.com/GaiZhenbiao/ChuanhuChatGPT/compare/20240802...20240914

  5. 202408022024-08-02 · 2024-08-02 07:29 UTC
    查看更新说明

    KNOWN ISSUES

    • 由于 Gradio 的一个问题,LaTeX 渲染被禁用 LaTeX rendering is disabled due to an issue in Gradio

    BREAKING

    • 默认模型从 GPT3.5-turbo 更改为 GPT-4o mini

    Features

    • 新增 GPT-4o mini 模型支持 (@Gaizhenbiao)
    • 新增 讯飞v4.0, v3.5 模型支持 (@ZhengQinyu)

    Bug Fixes

    • 修复 Azure OpenAI 可能回复失败的问题 (@ZhengQinyu)

    Miscellaneous

    • 统一代码高亮样式颜色 (@Keldos-Li)
    • Docker 默认暴露7860端口 (@BigDataMao)

    Full Changelog: https://github.com/GaiZhenbiao/ChuanhuChatGPT/compare/20240628...20240802

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    README 原文

    未翻译

    📢 新增:现已支持 GPT-5(含 GPT-5、GPT-5-mini、GPT-5-nano;400k 上下文、最多 128k 输出)。

    Video Title

    目录

    支持模型使用技巧安装方式常见问题Telegram 群组

    ✨ 5.0 重磅更新!

    ChuanhuChat5更新

    New! 全新的用户界面!精致得不像 Gradio,甚至有毛玻璃效果!

    New! 适配了移动端(包括全面屏手机的挖孔/刘海),层级更加清晰。

    New! 历史记录移到左侧,使用更加方便。并且支持搜索(支持正则)、删除、重命名。

    New! 现在可以让大模型自动命名历史记录(需在设置或配置文件中开启)。

    New! 现在可以将 川虎Chat 作为 PWA 应用程序安装,体验更加原生!支持 Chrome/Edge/Safari 等浏览器。

    New! 图标适配各个平台,看起来更舒服。

    New! 支持 Finetune(微调) GPT 3.5!

    支持模型

    API 调用模型备注本地部署模型备注
    ChatGPT (GPT-5, GPT-4o, GPT-4, o1)支持微调 gpt-3.5ChatGLM (ChatGLM2) (ChatGLM3)
    Azure OpenAILLaMA支持 Lora 模型
    Google GeminiStableLM
    ClaudeClaude 3 Opus / 3.5 Sonnet / 3 HaikuMOSS
    DeepSeekDeepSeek Chat 与 DeepSeek R1Qwen
    iFlytek Spark
    Inspur Yuan 1.0
    MiniMax
    XMChat不支持流式传输
    Midjourney不支持流式传输
    DALL·E 3图像生成

    使用技巧

    💪 强力功能

    • 川虎助理:类似 AutoGPT,全自动解决你的问题;
    • 在线搜索:ChatGPT 的数据太旧?给 LLM 插上网络的翅膀;
    • 知识库:让 ChatGPT 帮你量子速读!根据文件回答问题。
    • 本地部署LLM:一键部署,获取属于你自己的大语言模型。
    • GPT 3.5微调:支持微调 GPT 3.5,让 ChatGPT 更加个性化。
    • 自定义模型:灵活地自定义模型,例如对接本地推理服务。

    🤖 System Prompt

    • 通过 System Prompt 设定前提条件,可以很有效地进行角色扮演;
    • 川虎Chat 预设了Prompt模板,点击加载Prompt模板,先选择 Prompt 模板集合,然后在下方选择想要的 Prompt。

    💬 基础对话

    • 如果回答不满意,可以使用 重新生成 按钮再试一次,或者直接 删除这轮对话;
    • 输入框支持换行,按 Shift + Enter即可;
    • 在输入框按 ↑ ↓ 方向键,可以在发送记录中快速切换;
    • 每次新建一个对话太麻烦,试试 单论对话 功能;
    • 回答气泡旁边的小按钮,不仅能 一键复制,还能 查看Markdown原文;
    • 指定回答语言,让 ChatGPT 固定以某种语言回答。

    📜 对话历史

    • 对话历史记录会被自动保存,不用担心问完之后找不到了;
    • 多用户历史记录隔离,除了你都看不到;
    • 重命名历史记录,方便日后查找;
    • New! 魔法般自动命名历史记录,让 LLM 理解对话内容,帮你自动为历史记录命名!
    • New! 搜索历史记录,支持正则表达式!

    🖼️ 小而美的体验

    • 自研 Small-and-Beautiful 主题,带给你小而美的体验;
    • 自动亮暗色切换,给你从早到晚的舒适体验;
    • 完美渲染 LaTeX / 表格 / 代码块,支持代码高亮;
    • New! 非线性动画、毛玻璃效果,精致得不像 Gradio!
    • New! 适配 Windows / macOS / Linux / iOS / Android,从图标到全面屏适配,给你最合适的体验!
    • New! 支持以 PWA应用程序 安装,体验更加原生!

    👨‍💻 极客功能

    • New! 支持 Fine-tune(微调)gpt-3.5!
    • 大量 LLM 参数可调;
    • 支持更换 api-host;
    • 支持自定义代理;
    • 支持多 api-key 负载均衡。

    ⚒️ 部署相关

    • 部署到服务器:在 config.json 中设置 "server_name": "0.0.0.0", "server_port": <你的端口号>,。
    • 获取公共链接:在 config.json 中设置 "share": true,。注意程序必须在运行,才能通过公共链接访问。
    • 在Hugging Face上使用:建议在右上角 复制Space 再使用,这样App反应可能会快一点。

    快速上手

    在终端执行以下命令:

    git clone https://github.com/GaiZhenbiao/ChuanhuChatGPT.git
    cd ChuanhuChatGPT
    pip install -r requirements.txt
    

    然后,在项目文件夹中复制一份 config_example.json,并将其重命名为 config.json,在其中填入 API-Key 等设置。

    python ChuanhuChatbot.py
    

    一个浏览器窗口将会自动打开,此时您将可以使用 川虎Chat 与ChatGPT或其他模型进行对话。

    Note

    具体详尽的安装教程和使用教程请查看本项目的wiki页面。

    疑难杂症解决

    在遇到各种问题查阅相关信息前,您可以先尝试 手动拉取本项目的最新更改1 并 更新依赖库2,然后重试。步骤为:

    1. 点击网页上的 Download ZIP 按钮,下载最新代码并解压覆盖,或
      git pull https://github.com/GaiZhenbiao/ChuanhuChatGPT.git main -f
      
    2. 尝试再次安装依赖(可能本项目引入了新的依赖)
      pip install -r requirements.txt
      

    很多时候,这样就可以解决问题。

    如果问题仍然存在,请查阅该页面:常见问题

    该页面列出了几乎所有您可能遇到的各种问题,包括如何配置代理,以及遇到问题后您该采取的措施,请务必认真阅读。

    了解更多

    若需了解更多信息,请查看我们的 wiki:

    Starchart

    Star History Chart

    Contributors