Skip to content

Commit a3d3ce3

Browse files
authored
Merge branch 'main' into feat-mcp
2 parents 611e97e + 93652db commit a3d3ce3

37 files changed

+897
-207
lines changed

README.md

+21-108
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,28 @@
11
<div align="center">
22

3-
<a href='#企业版'>
4-
<img src="./docs/images/ent.svg" alt="icon"/>
3+
<a href='https://nextchat.dev/chat'>
4+
<img src="https://github.com/user-attachments/assets/287c510f-f508-478e-ade3-54d30453dc18" width="1000" alt="icon"/>
55
</a>
66

7+
78
<h1 align="center">NextChat (ChatGPT Next Web)</h1>
89

910
English / [简体中文](./README_CN.md)
1011

11-
One-Click to get a well-designed cross-platform ChatGPT web UI, with GPT3, GPT4 & Gemini Pro support.
12+
<a href="https://trendshift.io/repositories/5973" target="_blank"><img src="https://trendshift.io/api/badge/repositories/5973" alt="ChatGPTNextWeb%2FChatGPT-Next-Web | Trendshift" style="width: 250px; height: 55px;" width="250" height="55"/></a>
13+
14+
1215

13-
一键免费部署你的跨平台私人 ChatGPT 应用, 支持 GPT3, GPT4 & Gemini Pro 模型。
16+
One-Click to get a well-designed cross-platform ChatGPT web UI, with Claude, GPT4 & Gemini Pro support.
1417

1518
[![Saas][Saas-image]][saas-url]
1619
[![Web][Web-image]][web-url]
1720
[![Windows][Windows-image]][download-url]
1821
[![MacOS][MacOS-image]][download-url]
1922
[![Linux][Linux-image]][download-url]
2023

21-
[NextChatAI](https://nextchat.dev/chat?utm_source=readme) / [Web App](https://app.nextchat.dev) / [Desktop App](https://github.com/Yidadaa/ChatGPT-Next-Web/releases) / [Discord](https://discord.gg/YCkeafCafC) / [Enterprise Edition](#enterprise-edition) / [Twitter](https://twitter.com/NextChatDev)
24+
[NextChatAI](https://nextchat.dev/chat?utm_source=readme) / [Web App Demo](https://app.nextchat.dev) / [Desktop App](https://github.com/Yidadaa/ChatGPT-Next-Web/releases) / [Discord](https://discord.gg/YCkeafCafC) / [Enterprise Edition](#enterprise-edition) / [Twitter](https://twitter.com/NextChatDev)
2225

23-
[NextChatAI](https://nextchat.dev/chat) / [网页版](https://app.nextchat.dev) / [客户端](https://github.com/Yidadaa/ChatGPT-Next-Web/releases) / [企业版](#%E4%BC%81%E4%B8%9A%E7%89%88) / [反馈](https://github.com/Yidadaa/ChatGPT-Next-Web/issues)
2426

2527
[saas-url]: https://nextchat.dev/chat?utm_source=readme
2628
[saas-image]: https://img.shields.io/badge/NextChat-Saas-green?logo=microsoftedge
@@ -31,7 +33,7 @@ One-Click to get a well-designed cross-platform ChatGPT web UI, with GPT3, GPT4
3133
[MacOS-image]: https://img.shields.io/badge/-MacOS-black?logo=apple
3234
[Linux-image]: https://img.shields.io/badge/-Linux-333?logo=ubuntu
3335

34-
[<img src="https://vercel.com/button" alt="Deploy on Vercel" height="30">](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2FChatGPTNextWeb%2FChatGPT-Next-Web&env=OPENAI_API_KEY&env=CODE&project-name=nextchat&repository-name=NextChat) [<img src="https://zeabur.com/button.svg" alt="Deploy on Zeabur" height="30">](https://zeabur.com/templates/ZBUEFA) [<img src="https://gitpod.io/button/open-in-gitpod.svg" alt="Open in Gitpod" height="30">](https://gitpod.io/#https://github.com/Yidadaa/ChatGPT-Next-Web) [<img src="https://img.shields.io/badge/BT_Deploy-Install-20a53a" alt="BT Deply Install" height="30">](https://www.bt.cn/new/download.html) [<img src="https://svgshare.com/i/1AVg.svg" alt="Deploy to Alibaba Cloud" height="30">](https://computenest.aliyun.com/market/service-f1c9b75e59814dc49d52)
36+
[<img src="https://vercel.com/button" alt="Deploy on Vercel" height="30">](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2FChatGPTNextWeb%2FChatGPT-Next-Web&env=OPENAI_API_KEY&env=CODE&project-name=nextchat&repository-name=NextChat) [<img src="https://zeabur.com/button.svg" alt="Deploy on Zeabur" height="30">](https://zeabur.com/templates/ZBUEFA) [<img src="https://gitpod.io/button/open-in-gitpod.svg" alt="Open in Gitpod" height="30">](https://gitpod.io/#https://github.com/Yidadaa/ChatGPT-Next-Web) [<img src="https://img.shields.io/badge/BT_Deploy-Install-20a53a" alt="BT Deply Install" height="30">](https://www.bt.cn/new/download.html)
3537

3638
[<img src="https://github.com/user-attachments/assets/903482d4-3e87-4134-9af1-f2588fa90659" height="60" width="288" >](https://monica.im/?utm=nxcrp)
3739

@@ -50,20 +52,12 @@ Meeting Your Company's Privatization and Customization Deployment Requirements:
5052

5153
For enterprise inquiries, please contact: **[email protected]**
5254

53-
## 企业版
55+
## Screenshots
5456

55-
满足企业用户私有化部署和个性化定制需求:
56-
- **品牌定制**:企业量身定制 VI/UI,与企业品牌形象无缝契合
57-
- **资源集成**:由企业管理人员统一配置和管理数十种 AI 资源,团队成员开箱即用
58-
- **权限管理**:成员权限、资源权限、知识库权限层级分明,企业级 Admin Panel 统一控制
59-
- **知识接入**:企业内部知识库与 AI 能力相结合,比通用 AI 更贴近企业自身业务需求
60-
- **安全审计**:自动拦截敏感提问,支持追溯全部历史对话记录,让 AI 也能遵循企业信息安全规范
61-
- **私有部署**:企业级私有部署,支持各类主流私有云部署,确保数据安全和隐私保护
62-
- **持续更新**:提供多模态、智能体等前沿能力持续更新升级服务,常用常新、持续先进
57+
![Settings](./docs/images/settings.png)
6358

64-
企业版咨询: **[email protected]**
59+
![More](./docs/images/more.png)
6560

66-
<img width="300" src="https://github.com/user-attachments/assets/3d4305ac-6e95-489e-884b-51d51db5f692">
6761

6862
## Features
6963

@@ -110,65 +104,19 @@ For enterprise inquiries, please contact: **[email protected]**
110104
- 🚀 v2.7 let's share conversations as image, or share to ShareGPT!
111105
- 🚀 v2.0 is released, now you can create prompt templates, turn your ideas into reality! Read this: [ChatGPT Prompt Engineering Tips: Zero, One and Few Shot Prompting](https://www.allabtai.com/prompt-engineering-tips-zero-one-and-few-shot-prompting/).
112106

113-
## 主要功能
114-
115-
- 在 1 分钟内使用 Vercel **免费一键部署**
116-
- 提供体积极小(~5MB)的跨平台客户端(Linux/Windows/MacOS), [下载地址](https://github.com/Yidadaa/ChatGPT-Next-Web/releases)
117-
- 完整的 Markdown 支持:LaTex 公式、Mermaid 流程图、代码高亮等等
118-
- 精心设计的 UI,响应式设计,支持深色模式,支持 PWA
119-
- 极快的首屏加载速度(~100kb),支持流式响应
120-
- 隐私安全,所有数据保存在用户浏览器本地
121-
- 预制角色功能(面具),方便地创建、分享和调试你的个性化对话
122-
- 海量的内置 prompt 列表,来自[中文](https://github.com/PlexPt/awesome-chatgpt-prompts-zh)[英文](https://github.com/f/awesome-chatgpt-prompts)
123-
- 自动压缩上下文聊天记录,在节省 Token 的同时支持超长对话
124-
- 多国语言支持:English, 简体中文, 繁体中文, 日本語, Español, Italiano, Türkçe, Deutsch, Tiếng Việt, Русский, Čeština, 한국어, Indonesia
125-
- 拥有自己的域名?好上加好,绑定后即可在任何地方**无障碍**快速访问
126-
127-
## 开发计划
128-
129-
- [x] 为每个对话设置系统 Prompt [#138](https://github.com/Yidadaa/ChatGPT-Next-Web/issues/138)
130-
- [x] 允许用户自行编辑内置 Prompt 列表
131-
- [x] 预制角色:使用预制角色快速定制新对话 [#993](https://github.com/Yidadaa/ChatGPT-Next-Web/issues/993)
132-
- [x] 分享为图片,分享到 ShareGPT 链接 [#1741](https://github.com/Yidadaa/ChatGPT-Next-Web/pull/1741)
133-
- [x] 使用 tauri 打包桌面应用
134-
- [x] 支持自部署的大语言模型:开箱即用 [RWKV-Runner](https://github.com/josStorer/RWKV-Runner) ,服务端部署 [LocalAI 项目](https://github.com/go-skynet/LocalAI) llama / gpt4all / rwkv / vicuna / koala / gpt4all-j / cerebras / falcon / dolly 等等,或者使用 [api-for-open-llm](https://github.com/xusenlinzy/api-for-open-llm)
135-
- [x] Artifacts: 通过独立窗口,轻松预览、复制和分享生成的内容/可交互网页 [#5092](https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web/pull/5092)
136-
- [x] 插件机制,支持`联网搜索``计算器`、调用其他平台 api [#165](https://github.com/Yidadaa/ChatGPT-Next-Web/issues/165) [#5353](https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web/issues/5353)
137-
- [x] 支持联网搜索、计算器、调用其他平台 api [#165](https://github.com/Yidadaa/ChatGPT-Next-Web/issues/165) [#5353](https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web/issues/5353)
138-
- [x] 支持 Realtime Chat [#5672](https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web/issues/5672)
139-
- [ ] 本地知识库
140-
141-
## 最新动态
142-
- 🚀 v2.15.8 现在支持Realtime Chat [#5672](https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web/issues/5672)
143-
- 🚀 v2.15.4 客户端支持Tauri本地直接调用大模型API,更安全![#5379](https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web/issues/5379)
144-
- 🚀 v2.15.0 现在支持插件功能了!了解更多:[NextChat-Awesome-Plugins](https://github.com/ChatGPTNextWeb/NextChat-Awesome-Plugins)
145-
- 🚀 v2.14.0 现在支持 Artifacts & SD 了。
146-
- 🚀 v2.10.1 现在支持 Gemini Pro 模型。
147-
- 🚀 v2.9.11 现在可以使用自定义 Azure 服务了。
148-
- 🚀 v2.8 发布了横跨 Linux/Windows/MacOS 的体积极小的客户端。
149-
- 🚀 v2.7 现在可以将会话分享为图片了,也可以分享到 ShareGPT 的在线链接。
150-
- 🚀 v2.0 已经发布,现在你可以使用面具功能快速创建预制对话了! 了解更多: [ChatGPT 提示词高阶技能:零次、一次和少样本提示](https://github.com/Yidadaa/ChatGPT-Next-Web/issues/138)
151-
- 💡 想要更方便地随时随地使用本项目?可以试下这款桌面插件:https://github.com/mushan0x0/AI0x0.com
152-
153107
## Get Started
154108

155-
> [简体中文 > 如何开始使用](./README_CN.md#开始使用)
156-
157109
1. Get [OpenAI API Key](https://platform.openai.com/account/api-keys);
158110
2. Click
159111
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2FYidadaa%2FChatGPT-Next-Web&env=OPENAI_API_KEY&env=CODE&project-name=chatgpt-next-web&repository-name=ChatGPT-Next-Web), remember that `CODE` is your page password;
160112
3. Enjoy :)
161113

162114
## FAQ
163115

164-
[简体中文 > 常见问题](./docs/faq-cn.md)
165-
166116
[English > FAQ](./docs/faq-en.md)
167117

168118
## Keep Updated
169119

170-
> [简体中文 > 如何保持代码更新](./README_CN.md#保持更新)
171-
172120
If you have deployed your own project with just one click following the steps above, you may encounter the issue of "Updates Available" constantly showing up. This is because Vercel will create a new project for you by default instead of forking this project, resulting in the inability to detect updates correctly.
173121

174122
We recommend that you follow the steps below to re-deploy:
@@ -195,8 +143,6 @@ You can star or watch this project or follow author to get release notifications
195143

196144
## Access Password
197145

198-
> [简体中文 > 如何增加访问密码](./README_CN.md#配置页面访问密码)
199-
200146
This project provides limited access control. Please add an environment variable named `CODE` on the vercel environment variables page. The value should be passwords separated by comma like this:
201147

202148
```
@@ -207,8 +153,6 @@ After adding or modifying this environment variable, please redeploy the project
207153

208154
## Environment Variables
209155

210-
> [简体中文 > 如何配置 api key、访问密码、接口代理](./README_CN.md#环境变量)
211-
212156
### `CODE` (optional)
213157

214158
Access password, separated by comma.
@@ -311,6 +255,14 @@ ChatGLM Api Key.
311255

312256
ChatGLM Api Url.
313257

258+
### `DEEPSEEK_API_KEY` (optional)
259+
260+
DeepSeek Api Key.
261+
262+
### `DEEPSEEK_URL` (optional)
263+
264+
DeepSeek Api Url.
265+
314266
### `HIDE_USER_API_KEY` (optional)
315267

316268
> Default: Empty
@@ -387,7 +339,6 @@ NodeJS >= 18, Docker >= 20
387339

388340
## Development
389341

390-
> [简体中文 > 如何进行二次开发](./README_CN.md#开发)
391342

392343
[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/Yidadaa/ChatGPT-Next-Web)
393344

@@ -412,10 +363,6 @@ yarn dev
412363

413364
## Deployment
414365

415-
> [简体中文 > 如何部署到私人服务器](./README_CN.md#部署)
416-
417-
### BT Install
418-
> [简体中文 > 如何通过宝塔一键部署](./docs/bt-cn.md)
419366

420367
### Docker (Recommended)
421368

@@ -464,11 +411,7 @@ bash <(curl -s https://raw.githubusercontent.com/Yidadaa/ChatGPT-Next-Web/main/s
464411
- [How to use Vercel (No English)](./docs/vercel-cn.md)
465412
- [User Manual (Only Chinese, WIP)](./docs/user-manual-cn.md)
466413

467-
## Screenshots
468414

469-
![Settings](./docs/images/settings.png)
470-
471-
![More](./docs/images/more.png)
472415

473416
## Translation
474417

@@ -480,37 +423,7 @@ If you want to add a new translation, read this [document](./docs/translation.md
480423

481424
## Special Thanks
482425

483-
### Sponsor
484-
485-
> 仅列出捐赠金额 >= 100RMB 的用户。
486-
487-
[@mushan0x0](https://github.com/mushan0x0)
488-
[@ClarenceDan](https://github.com/ClarenceDan)
489-
[@zhangjia](https://github.com/zhangjia)
490-
[@hoochanlon](https://github.com/hoochanlon)
491-
[@relativequantum](https://github.com/relativequantum)
492-
[@desenmeng](https://github.com/desenmeng)
493-
[@webees](https://github.com/webees)
494-
[@chazzhou](https://github.com/chazzhou)
495-
[@hauy](https://github.com/hauy)
496-
[@Corwin006](https://github.com/Corwin006)
497-
[@yankunsong](https://github.com/yankunsong)
498-
[@ypwhs](https://github.com/ypwhs)
499-
[@fxxxchao](https://github.com/fxxxchao)
500-
[@hotic](https://github.com/hotic)
501-
[@WingCH](https://github.com/WingCH)
502-
[@jtung4](https://github.com/jtung4)
503-
[@micozhu](https://github.com/micozhu)
504-
[@jhansion](https://github.com/jhansion)
505-
[@Sha1rholder](https://github.com/Sha1rholder)
506-
[@AnsonHyq](https://github.com/AnsonHyq)
507-
[@synwith](https://github.com/synwith)
508-
[@piksonGit](https://github.com/piksonGit)
509-
[@ouyangzhiping](https://github.com/ouyangzhiping)
510-
[@wenjiavv](https://github.com/wenjiavv)
511-
[@LeXwDeX](https://github.com/LeXwDeX)
512-
[@Licoy](https://github.com/Licoy)
513-
[@shangmin2009](https://github.com/shangmin2009)
426+
514427

515428
### Contributors
516429

README_CN.md

+8
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,14 @@ ChatGLM Api Key.
192192

193193
ChatGLM Api Url.
194194

195+
### `DEEPSEEK_API_KEY` (可选)
196+
197+
DeepSeek Api Key.
198+
199+
### `DEEPSEEK_URL` (可选)
200+
201+
DeepSeek Api Url.
202+
195203

196204
### `HIDE_USER_API_KEY` (可选)
197205

app/api/[provider]/[...path]/route.ts

+3
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import { handle as alibabaHandler } from "../../alibaba";
1010
import { handle as moonshotHandler } from "../../moonshot";
1111
import { handle as stabilityHandler } from "../../stability";
1212
import { handle as iflytekHandler } from "../../iflytek";
13+
import { handle as deepseekHandler } from "../../deepseek";
1314
import { handle as xaiHandler } from "../../xai";
1415
import { handle as chatglmHandler } from "../../glm";
1516
import { handle as proxyHandler } from "../../proxy";
@@ -40,6 +41,8 @@ async function handle(
4041
return stabilityHandler(req, { params });
4142
case ApiPath.Iflytek:
4243
return iflytekHandler(req, { params });
44+
case ApiPath.DeepSeek:
45+
return deepseekHandler(req, { params });
4346
case ApiPath.XAI:
4447
return xaiHandler(req, { params });
4548
case ApiPath.ChatGLM:

app/api/alibaba.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import {
88
import { prettyObject } from "@/app/utils/format";
99
import { NextRequest, NextResponse } from "next/server";
1010
import { auth } from "@/app/api/auth";
11-
import { isModelAvailableInServer } from "@/app/utils/model";
11+
import { isModelNotavailableInServer } from "@/app/utils/model";
1212

1313
const serverConfig = getServerSideConfig();
1414

@@ -89,7 +89,7 @@ async function request(req: NextRequest) {
8989

9090
// not undefined and is false
9191
if (
92-
isModelAvailableInServer(
92+
isModelNotavailableInServer(
9393
serverConfig.customModels,
9494
jsonBody?.model as string,
9595
ServiceProvider.Alibaba as string,

app/api/anthropic.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import {
99
import { prettyObject } from "@/app/utils/format";
1010
import { NextRequest, NextResponse } from "next/server";
1111
import { auth } from "./auth";
12-
import { isModelAvailableInServer } from "@/app/utils/model";
12+
import { isModelNotavailableInServer } from "@/app/utils/model";
1313
import { cloudflareAIGatewayUrl } from "@/app/utils/cloudflare";
1414

1515
const ALLOWD_PATH = new Set([Anthropic.ChatPath, Anthropic.ChatPath1]);
@@ -122,7 +122,7 @@ async function request(req: NextRequest) {
122122

123123
// not undefined and is false
124124
if (
125-
isModelAvailableInServer(
125+
isModelNotavailableInServer(
126126
serverConfig.customModels,
127127
jsonBody?.model as string,
128128
ServiceProvider.Anthropic as string,

app/api/auth.ts

+3
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,9 @@ export function auth(req: NextRequest, modelProvider: ModelProvider) {
9292
systemApiKey =
9393
serverConfig.iflytekApiKey + ":" + serverConfig.iflytekApiSecret;
9494
break;
95+
case ModelProvider.DeepSeek:
96+
systemApiKey = serverConfig.deepseekApiKey;
97+
break;
9598
case ModelProvider.XAI:
9699
systemApiKey = serverConfig.xaiApiKey;
97100
break;

app/api/baidu.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import {
88
import { prettyObject } from "@/app/utils/format";
99
import { NextRequest, NextResponse } from "next/server";
1010
import { auth } from "@/app/api/auth";
11-
import { isModelAvailableInServer } from "@/app/utils/model";
11+
import { isModelNotavailableInServer } from "@/app/utils/model";
1212
import { getAccessToken } from "@/app/utils/baidu";
1313

1414
const serverConfig = getServerSideConfig();
@@ -104,7 +104,7 @@ async function request(req: NextRequest) {
104104

105105
// not undefined and is false
106106
if (
107-
isModelAvailableInServer(
107+
isModelNotavailableInServer(
108108
serverConfig.customModels,
109109
jsonBody?.model as string,
110110
ServiceProvider.Baidu as string,

app/api/bytedance.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import {
88
import { prettyObject } from "@/app/utils/format";
99
import { NextRequest, NextResponse } from "next/server";
1010
import { auth } from "@/app/api/auth";
11-
import { isModelAvailableInServer } from "@/app/utils/model";
11+
import { isModelNotavailableInServer } from "@/app/utils/model";
1212

1313
const serverConfig = getServerSideConfig();
1414

@@ -88,7 +88,7 @@ async function request(req: NextRequest) {
8888

8989
// not undefined and is false
9090
if (
91-
isModelAvailableInServer(
91+
isModelNotavailableInServer(
9292
serverConfig.customModels,
9393
jsonBody?.model as string,
9494
ServiceProvider.ByteDance as string,

app/api/common.ts

+7-8
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { NextRequest, NextResponse } from "next/server";
22
import { getServerSideConfig } from "../config/server";
33
import { OPENAI_BASE_URL, ServiceProvider } from "../constant";
44
import { cloudflareAIGatewayUrl } from "../utils/cloudflare";
5-
import { getModelProvider, isModelAvailableInServer } from "../utils/model";
5+
import { getModelProvider, isModelNotavailableInServer } from "../utils/model";
66

77
const serverConfig = getServerSideConfig();
88

@@ -118,15 +118,14 @@ export async function requestOpenai(req: NextRequest) {
118118

119119
// not undefined and is false
120120
if (
121-
isModelAvailableInServer(
121+
isModelNotavailableInServer(
122122
serverConfig.customModels,
123123
jsonBody?.model as string,
124-
ServiceProvider.OpenAI as string,
125-
) ||
126-
isModelAvailableInServer(
127-
serverConfig.customModels,
128-
jsonBody?.model as string,
129-
ServiceProvider.Azure as string,
124+
[
125+
ServiceProvider.OpenAI,
126+
ServiceProvider.Azure,
127+
jsonBody?.model as string, // support provider-unspecified model
128+
],
130129
)
131130
) {
132131
return NextResponse.json(

app/api/config/route.ts

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ const DANGER_CONFIG = {
1414
disableFastLink: serverConfig.disableFastLink,
1515
customModels: serverConfig.customModels,
1616
defaultModel: serverConfig.defaultModel,
17+
visionModels: serverConfig.visionModels,
1718
};
1819

1920
declare global {

0 commit comments

Comments
 (0)