{"id":15640271,"url":"https://github.com/shibing624/chatgpt-webui","last_synced_at":"2025-08-04T05:37:45.712Z","repository":{"id":215090998,"uuid":"736258983","full_name":"shibing624/chatgpt-webui","owner":"shibing624","description":"ChatGPT WebUI using gradio. 给 LLM 对话和检索知识问答RAG提供一个简单好用的Web UI界面","archived":false,"fork":false,"pushed_at":"2024-08-22T07:09:51.000Z","size":2132,"stargazers_count":123,"open_issues_count":0,"forks_count":19,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-09T14:06:43.709Z","etag":null,"topics":["chatgpt","chatgpt-api","chatgpt-webui","chatpdf","gpt4","gradio","webui"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shibing624.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-12-27T12:14:26.000Z","updated_at":"2025-04-02T09:22:12.000Z","dependencies_parsed_at":"2024-01-11T05:12:56.359Z","dependency_job_id":"5cfb7cb9-eedd-435d-9090-9cb32f305e8f","html_url":"https://github.com/shibing624/chatgpt-webui","commit_stats":null,"previous_names":["shibing624/chatgpt-webui"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/shibing624/chatgpt-webui","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shibing624%2Fchatgpt-webui","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shibing624%2Fchatgpt-webui/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shibing624%2Fchatgpt-webui/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shibing624%2Fchatgpt-webui/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shibing624","download_url":"https://codeload.github.com/shibing624/chatgpt-webui/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shibing624%2Fchatgpt-webui/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268655084,"owners_count":24285128,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-04T02:00:09.867Z","response_time":79,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chatgpt","chatgpt-api","chatgpt-webui","chatpdf","gpt4","gradio","webui"],"created_at":"2024-10-03T11:33:32.074Z","updated_at":"2025-08-04T05:37:45.687Z","avatar_url":"https://github.com/shibing624.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[**🇨🇳中文**](https://github.com/shibing624/chatgpt-webui/blob/main/README.md) | [**🌐English**](https://github.com/shibing624/chatgpt-webui/blob/main/README_EN.md) | [**📖文档/Docs**](https://github.com/shibing624/chatgpt-webui/wiki) | [**🤖模型/Models**](https://huggingface.co/shibing624) \n\n\u003cdiv align=\"center\"\u003e\n  \u003ca href=\"https://github.com/shibing624/chatgpt-webui\"\u003e\n    \u003cimg src=\"https://github.com/shibing624/chatgpt-webui/blob/main/assets/icon.png\" height=\"100\" alt=\"Logo\"\u003e\n  \u003c/a\u003e\n\u003c/div\u003e\n\n-----------------\n\n# ChatGPT WebUI: ChatGPT webui using gradio\n[![License Apache 2.0](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](LICENSE)\n[![python_version](https://img.shields.io/badge/Python-3.8%2B-green.svg)](requirements.txt)\n[![GitHub issues](https://img.shields.io/github/issues/shibing624/chatgpt-webui.svg)](https://github.com/shibing624/chatgpt-webui/issues)\n[![Wechat Group](https://img.shields.io/badge/wechat-group-green.svg?logo=wechat)](#Contact)\n\n\n**chatgpt-webui**: ChatGPT webui using gradio. 为ChatGPT等多种LLM提供了一个轻快好用的Web图形界面\n\n![img](https://github.com/shibing624/chatgpt-webui/blob/main/docs/chat.png)\n\n## ✨ Features\n本项目基于 [ChuanhuChatGPT](https://github.com/GaiZhenbiao/ChuanhuChatGPT) 简化而来，主要改动如下：\n1. 简化了WebUI页面，只保留核心的ChatGPT对话(LLM)、文档检索对话（RAG）功能，去除了midjourney等功能\n2. 重构了代码逻辑和结构，规范python语法，轻量化项目依赖库\n3. 保留本地大语言模型对话，方便扩展本地模型\n4. 支持nginx反向代理，静态文件使用相对路径，方便部署\n5. 提升RAG检索准确率\n   - 引入jieba分词的rank_BM25，提升对query关键词的字面匹配，使用字面相似度+sentence embedding向量相似度加权获取corpus候选集\n   - RAG底模优化，使用基于RAG微调的模型\n   - Chinese chunk切分优化\n6. 优化了在线搜索功能，支持DuckDuckGo、Google、Bing、Serper等搜索引擎，提升搜索准确率\n\n## 支持模型\n\n- [ChatGPT(GPT-4)](https://chat.openai.com) \n- [Azure OpenAI](https://azure.microsoft.com/en-us/products/ai-services/openai-service)\n- [ChatGLM3-6b](https://github.com/THUDM/ChatGLM3)\n- [Chinese-LLaMA-Alpaca-2](https://github.com/ymcui/Chinese-LLaMA-Alpaca-2)\n- [YI](https://github.com/01-ai/Yi)\n## 使用技巧\n\n### 💪 强力功能\n- **GPT4 API**：基于代理配置GPT4 API，支持多用户对话；\n- **本地部署LLM**：一键部署，获取属于你自己的大语言模型。\n\n### 🤖 System Prompt\n- 通过 System Prompt 设定前提条件，可以很有效地进行角色扮演；\n- 川虎Chat 预设了Prompt模板，点击`加载Prompt模板`，先选择 Prompt 模板集合，然后在下方选择想要的 Prompt。\n\n### 💬 基础对话\n- 如果回答不满意，可以使用 `重新生成` 按钮再试一次，或者直接 `删除这轮对话`;\n- 输入框支持换行，按 \u003ckbd\u003eShift\u003c/kbd\u003e + \u003ckbd\u003eEnter\u003c/kbd\u003e即可；\n- 在输入框按 \u003ckbd\u003e↑\u003c/kbd\u003e \u003ckbd\u003e↓\u003c/kbd\u003e 方向键，可以在发送记录中快速切换；\n- 每次新建一个对话太麻烦，试试 `单论对话` 功能；\n- 回答气泡旁边的小按钮，不仅能 `一键复制`，还能 `查看Markdown原文`；\n- 指定回答语言，让 ChatGPT 固定以某种语言回答。\n\n### 📜 对话历史\n- 对话历史记录会被自动保存，不用担心问完之后找不到了；\n- 多用户历史记录隔离，除了你都看不到；\n- 重命名历史记录，方便日后查找；\n- \u003csup\u003eNew!\u003c/sup\u003e 魔法般自动命名历史记录，让 LLM 理解对话内容，帮你自动为历史记录命名！\n- \u003csup\u003eNew!\u003c/sup\u003e 搜索历史记录，支持正则表达式！\n\n### 🖼️ 小而美的体验\n- 自研 Small-and-Beautiful 主题，带给你小而美的体验；\n- 自动亮暗色切换，给你从早到晚的舒适体验；\n- 完美渲染 LaTeX / 表格 / 代码块，支持代码高亮；\n- \u003csup\u003eNew!\u003c/sup\u003e 非线性动画、毛玻璃效果，精致得不像 Gradio！\n- \u003csup\u003eNew!\u003c/sup\u003e 适配 Windows / macOS / Linux / iOS / Android，从图标到全面屏适配，给你最合适的体验！\n- \u003csup\u003eNew!\u003c/sup\u003e 支持以 PWA应用程序 安装，体验更加原生！\n\n### 👨‍💻 极客功能\n- 大量 LLM 参数可调；\n- 支持更换 api-host；\n- 支持自定义代理；\n- 支持多 api-key 负载均衡。\n\n### ⚒️ 部署相关\n- 部署到服务器：在 `config.json` 中设置 `\"server_name\": \"0.0.0.0\", \"server_port\": \u003c你的端口号\u003e,`。\n- 获取公共链接：在 `config.json` 中设置 `\"share\": true,`。注意程序必须在运行，才能通过公共链接访问。\n- 在Hugging Face上使用：建议在右上角 **复制Space** 再使用，这样App反应可能会快一点。\n\n## 快速上手\n\n在终端执行以下命令：\n\n```shell\ngit clone https://github.com/shibing624/chatgpt-webui.git\ncd chatgpt-webui\npip install -r requirements.txt\n```\n\n然后，在项目文件夹中复制一份 `config_example.json`，并将其重命名为 `config.json`，在其中填入 `API-Key` 等设置。\n\n```shell\npython main.py\n```\n\n一个浏览器窗口将会自动打开，可以与ChatGPT或其他模型进行对话。\n\n\n## 疑难杂症解决\n\n在遇到各种问题查阅相关信息前，您可以先尝试 **手动拉取本项目的最新更改\u003csup\u003e1\u003c/sup\u003e** 并 **更新依赖库\u003csup\u003e2\u003c/sup\u003e**，然后重试。步骤为：\n\n1. 点击网页上的 `Download ZIP` 按钮，下载最新代码并解压覆盖，或\n   ```shell\n   git pull https://github.com/shibing624/chatgpt-webui.git main -f\n   ```\n2. 尝试再次安装依赖（可能本项目引入了新的依赖）\n   ```\n   pip install -r requirements.txt\n   ```\n\n很多时候，这样就可以解决问题。\n\n如果问题仍然存在，请查阅该页面：[常见问题](https://github.com/shibing624/chatgpt-webui/wiki/常见问题)\n\n该页面列出了**几乎所有**您可能遇到的各种问题，包括如何配置代理，以及遇到问题后您该采取的措施，**请务必认真阅读**。\n\n## Contact\n\n- Issue(建议)\n  ：[![GitHub issues](https://img.shields.io/github/issues/shibing624/chatgpt-webui.svg)](https://github.com/shibing624/chatgpt-webui/issues)\n- 邮件我：xuming: xuming624@qq.com\n- 微信我： 加我*微信号：xuming624, 备注：姓名-公司名-NLP* 进NLP交流群（加我拉你进群）。\n\n\u003cimg src=\"https://github.com/shibing624/chatgpt-webui/blob/main/docs/wechat.jpeg\" width=\"200\" /\u003e\n\n\u003cimg src=\"https://github.com/shibing624/chatgpt-webui/blob/main/docs/wechat_group.png\" width=\"200\" /\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshibing624%2Fchatgpt-webui","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshibing624%2Fchatgpt-webui","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshibing624%2Fchatgpt-webui/lists"}