Skip to content

Commit 1360ef7

Browse files
committed
Merge branch 'main' into feat/highlight_more_languages
2 parents 959201e + eddfa8b commit 1360ef7

File tree

110 files changed

+7092
-1278
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

110 files changed

+7092
-1278
lines changed

.github/workflows/deploy_preview.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@ name: VercelPreviewDeployment
33
on:
44
pull_request_target:
55
types:
6-
- opened
7-
- synchronize
8-
- reopened
6+
- review_requested
97

108
env:
119
VERCEL_TEAM: ${{ secrets.VERCEL_TEAM }}

.github/workflows/test.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Run Tests
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
tags:
8+
- "!*"
9+
pull_request:
10+
types:
11+
- review_requested
12+
13+
jobs:
14+
test:
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- name: Checkout repository
19+
uses: actions/checkout@v4
20+
21+
- name: Set up Node.js
22+
uses: actions/setup-node@v3
23+
with:
24+
node-version: 18
25+
cache: "yarn"
26+
27+
- name: Cache node_modules
28+
uses: actions/cache@v4
29+
with:
30+
path: node_modules
31+
key: ${{ runner.os }}-node_modules-${{ hashFiles('**/yarn.lock') }}
32+
restore-keys: |
33+
${{ runner.os }}-node_modules-
34+
35+
- name: Install dependencies
36+
run: yarn install
37+
38+
- name: Run Jest tests
39+
run: yarn test:ci

README.md

Lines changed: 46 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,29 @@
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+
One-Click to get a well-designed cross-platform ChatGPT web UI, with Claude, GPT4 & Gemini Pro support.
1213

13-
一键免费部署你的跨平台私人 ChatGPT 应用, 支持 GPT3, GPT4 & Gemini Pro 模型。
14+
一键免费部署你的跨平台私人 ChatGPT 应用, 支持 Claude, GPT4 & Gemini Pro 模型。
1415

1516
[![Saas][Saas-image]][saas-url]
1617
[![Web][Web-image]][web-url]
1718
[![Windows][Windows-image]][download-url]
1819
[![MacOS][MacOS-image]][download-url]
1920
[![Linux][Linux-image]][download-url]
2021

21-
[NextChatAI](https://nextchat.dev/chat) / [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)
22+
[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)
2223

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)
24+
[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)
2425

25-
[saas-url]: https://nextchat.dev/chat
26+
[saas-url]: https://nextchat.dev/chat?utm_source=readme
2627
[saas-image]: https://img.shields.io/badge/NextChat-Saas-green?logo=microsoftedge
2728
[web-url]: https://app.nextchat.dev/
2829
[download-url]: https://github.com/Yidadaa/ChatGPT-Next-Web/releases
@@ -31,7 +32,7 @@ One-Click to get a well-designed cross-platform ChatGPT web UI, with GPT3, GPT4
3132
[MacOS-image]: https://img.shields.io/badge/-MacOS-black?logo=apple
3233
[Linux-image]: https://img.shields.io/badge/-Linux-333?logo=ubuntu
3334

34-
[<img src="https://vercel.com/button" alt="Deploy on Zeabur" 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)
35+
[<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)
3536

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

@@ -63,7 +64,7 @@ For enterprise inquiries, please contact: **[email protected]**
6364

6465
企业版咨询: **[email protected]**
6566

66-
<img width="300" src="https://github.com/user-attachments/assets/3daeb7b6-ab63-4542-9141-2e4a12c80601">
67+
<img width="300" src="https://github.com/user-attachments/assets/3d4305ac-6e95-489e-884b-51d51db5f692">
6768

6869
## Features
6970

@@ -96,10 +97,12 @@ For enterprise inquiries, please contact: **[email protected]**
9697
- [x] Artifacts: Easily preview, copy and share generated content/webpages through a separate window [#5092](https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web/pull/5092)
9798
- [x] Plugins: support network search, calculator, any other apis etc. [#165](https://github.com/Yidadaa/ChatGPT-Next-Web/issues/165) [#5353](https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web/issues/5353)
9899
- [x] network search, calculator, any other apis etc. [#165](https://github.com/Yidadaa/ChatGPT-Next-Web/issues/165) [#5353](https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web/issues/5353)
100+
- [x] Supports Realtime Chat [#5672](https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web/issues/5672)
99101
- [ ] local knowledge base
100102

101103
## What's New
102-
104+
- 🚀 v2.15.8 Now supports Realtime Chat [#5672](https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web/issues/5672)
105+
- 🚀 v2.15.4 The Application supports using Tauri fetch LLM API, MORE SECURITY! [#5379](https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web/issues/5379)
103106
- 🚀 v2.15.0 Now supports Plugins! Read this: [NextChat-Awesome-Plugins](https://github.com/ChatGPTNextWeb/NextChat-Awesome-Plugins)
104107
- 🚀 v2.14.0 Now supports Artifacts & SD
105108
- 🚀 v2.10.1 support Google Gemini Pro model.
@@ -133,10 +136,12 @@ For enterprise inquiries, please contact: **[email protected]**
133136
- [x] Artifacts: 通过独立窗口,轻松预览、复制和分享生成的内容/可交互网页 [#5092](https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web/pull/5092)
134137
- [x] 插件机制,支持`联网搜索``计算器`、调用其他平台 api [#165](https://github.com/Yidadaa/ChatGPT-Next-Web/issues/165) [#5353](https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web/issues/5353)
135138
- [x] 支持联网搜索、计算器、调用其他平台 api [#165](https://github.com/Yidadaa/ChatGPT-Next-Web/issues/165) [#5353](https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web/issues/5353)
139+
- [x] 支持 Realtime Chat [#5672](https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web/issues/5672)
136140
- [ ] 本地知识库
137141

138142
## 最新动态
139-
143+
- 🚀 v2.15.8 现在支持Realtime Chat [#5672](https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web/issues/5672)
144+
- 🚀 v2.15.4 客户端支持Tauri本地直接调用大模型API,更安全![#5379](https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web/issues/5379)
140145
- 🚀 v2.15.0 现在支持插件功能了!了解更多:[NextChat-Awesome-Plugins](https://github.com/ChatGPTNextWeb/NextChat-Awesome-Plugins)
141146
- 🚀 v2.14.0 现在支持 Artifacts & SD 了。
142147
- 🚀 v2.10.1 现在支持 Gemini Pro 模型。
@@ -175,7 +180,7 @@ We recommend that you follow the steps below to re-deploy:
175180

176181
### Enable Automatic Updates
177182

178-
> If you encounter a failure of Upstream Sync execution, please manually sync fork once.
183+
> If you encounter a failure of Upstream Sync execution, please [manually update code](./README.md#manually-updating-code).
179184
180185
After forking the project, due to the limitations imposed by GitHub, you need to manually enable Workflows and Upstream Sync Action on the Actions page of the forked project. Once enabled, automatic updates will be scheduled every hour:
181186

@@ -299,6 +304,22 @@ iflytek Api Key.
299304

300305
iflytek Api Secret.
301306

307+
### `CHATGLM_API_KEY` (optional)
308+
309+
ChatGLM Api Key.
310+
311+
### `CHATGLM_URL` (optional)
312+
313+
ChatGLM Api Url.
314+
315+
### `DEEPSEEK_API_KEY` (optional)
316+
317+
DeepSeek Api Key.
318+
319+
### `DEEPSEEK_URL` (optional)
320+
321+
DeepSeek Api Url.
322+
302323
### `HIDE_USER_API_KEY` (optional)
303324

304325
> Default: Empty
@@ -332,9 +353,9 @@ To control custom models, use `+` to add a custom model, use `-` to hide a model
332353

333354
User `-all` to disable all default models, `+all` to enable all default models.
334355

335-
For Azure: use `modelName@azure=deploymentName` to customize model name and deployment name.
336-
> Example: `+gpt-3.5-turbo@azure=gpt35` will show option `gpt35(Azure)` in model list.
337-
> If you only can use Azure model, `-all,+gpt-3.5-turbo@azure=gpt35` will `gpt35(Azure)` the only option in model list.
356+
For Azure: use `modelName@Azure=deploymentName` to customize model name and deployment name.
357+
> Example: `+gpt-3.5-turbo@Azure=gpt35` will show option `gpt35(Azure)` in model list.
358+
> If you only can use Azure model, `-all,+gpt-3.5-turbo@Azure=gpt35` will `gpt35(Azure)` the only option in model list.
338359
339360
For ByteDance: use `modelName@bytedance=deploymentName` to customize model name and deployment name.
340361
> Example: `+Doubao-lite-4k@bytedance=ep-xxxxx-xxx` will show option `Doubao-lite-4k(ByteDance)` in model list.
@@ -343,6 +364,13 @@ For ByteDance: use `modelName@bytedance=deploymentName` to customize model name
343364

344365
Change default model
345366

367+
### `VISION_MODELS` (optional)
368+
369+
> Default: Empty
370+
> Example: `gpt-4-vision,claude-3-opus,my-custom-model` means add vision capabilities to these models in addition to the default pattern matches (which detect models containing keywords like "vision", "claude-3", "gemini-1.5", etc).
371+
372+
Add additional models to have vision capabilities, beyond the default pattern matching. Multiple models should be separated by commas.
373+
346374
### `WHITE_WEBDAV_ENDPOINTS` (optional)
347375

348376
You can use this option if you want to increase the number of webdav service addresses you are allowed to access, as required by the format:
@@ -395,6 +423,9 @@ yarn dev
395423

396424
> [简体中文 > 如何部署到私人服务器](./README_CN.md#部署)
397425
426+
### BT Install
427+
> [简体中文 > 如何通过宝塔一键部署](./docs/bt-cn.md)
428+
398429
### Docker (Recommended)
399430

400431
```shell

README_CN.md

Lines changed: 30 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
一键免费部署你的私人 ChatGPT 网页应用,支持 GPT3, GPT4 & Gemini Pro 模型。
1010

11-
[NextChatAI](https://nextchat.dev/chat) / [企业版](#%E4%BC%81%E4%B8%9A%E7%89%88) / [演示 Demo](https://chat-gpt-next-web.vercel.app/) / [反馈 Issues](https://github.com/Yidadaa/ChatGPT-Next-Web/issues) / [加入 Discord](https://discord.gg/zrhvHCr79N)
11+
[NextChatAI](https://nextchat.dev/chat?utm_source=readme) / [企业版](#%E4%BC%81%E4%B8%9A%E7%89%88) / [演示 Demo](https://chat-gpt-next-web.vercel.app/) / [反馈 Issues](https://github.com/Yidadaa/ChatGPT-Next-Web/issues) / [加入 Discord](https://discord.gg/zrhvHCr79N)
1212

1313
[<img src="https://vercel.com/button" alt="Deploy on Zeabur" 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)
1414

@@ -54,7 +54,7 @@
5454

5555
### 打开自动更新
5656

57-
> 如果你遇到了 Upstream Sync 执行错误,请手动 Sync Fork 一次!
57+
> 如果你遇到了 Upstream Sync 执行错误,[手动 Sync Fork 一次](./README_CN.md#手动更新代码)
5858
5959
当你 fork 项目之后,由于 Github 的限制,需要手动去你 fork 后的项目的 Actions 页面启用 Workflows,并启用 Upstream Sync Action,启用之后即可开启每小时定时自动更新:
6060

@@ -184,6 +184,21 @@ ByteDance Api Url.
184184

185185
讯飞星火Api Secret.
186186

187+
### `CHATGLM_API_KEY` (可选)
188+
189+
ChatGLM Api Key.
190+
191+
### `CHATGLM_URL` (可选)
192+
193+
ChatGLM Api Url.
194+
195+
### `DEEPSEEK_API_KEY` (可选)
196+
197+
DeepSeek Api Key.
198+
199+
### `DEEPSEEK_URL` (可选)
200+
201+
DeepSeek Api Url.
187202

188203

189204
### `HIDE_USER_API_KEY` (可选)
@@ -216,9 +231,9 @@ ByteDance Api Url.
216231
217232
用来控制模型列表,使用 `+` 增加一个模型,使用 `-` 来隐藏一个模型,使用 `模型名=展示名` 来自定义模型的展示名,用英文逗号隔开。
218233

219-
在Azure的模式下,支持使用`modelName@azure=deploymentName`的方式配置模型名称和部署名称(deploy-name)
220-
> 示例:`+gpt-3.5-turbo@azure=gpt35`这个配置会在模型列表显示一个`gpt35(Azure)`的选项。
221-
> 如果你只能使用Azure模式,那么设置 `-all,+gpt-3.5-turbo@azure=gpt35` 则可以让对话的默认使用 `gpt35(Azure)`
234+
在Azure的模式下,支持使用`modelName@Azure=deploymentName`的方式配置模型名称和部署名称(deploy-name)
235+
> 示例:`+gpt-3.5-turbo@Azure=gpt35`这个配置会在模型列表显示一个`gpt35(Azure)`的选项。
236+
> 如果你只能使用Azure模式,那么设置 `-all,+gpt-3.5-turbo@Azure=gpt35` 则可以让对话的默认使用 `gpt35(Azure)`
222237
223238
在ByteDance的模式下,支持使用`modelName@bytedance=deploymentName`的方式配置模型名称和部署名称(deploy-name)
224239
> 示例: `+Doubao-lite-4k@bytedance=ep-xxxxx-xxx`这个配置会在模型列表显示一个`Doubao-lite-4k(ByteDance)`的选项
@@ -228,6 +243,13 @@ ByteDance Api Url.
228243

229244
更改默认模型
230245

246+
### `VISION_MODELS` (可选)
247+
248+
> 默认值:空
249+
> 示例:`gpt-4-vision,claude-3-opus,my-custom-model` 表示为这些模型添加视觉能力,作为对默认模式匹配的补充(默认会检测包含"vision"、"claude-3"、"gemini-1.5"等关键词的模型)。
250+
251+
在默认模式匹配之外,添加更多具有视觉能力的模型。多个模型用逗号分隔。
252+
231253
### `DEFAULT_INPUT_TEMPLATE` (可选)
232254

233255
自定义默认的 template,用于初始化『设置』中的『用户输入预处理』配置项
@@ -264,6 +286,9 @@ BASE_URL=https://b.nextweb.fun/api/proxy
264286

265287
## 部署
266288

289+
### 宝塔面板部署
290+
> [简体中文 > 如何通过宝塔一键部署](./docs/bt-cn.md)
291+
267292
### 容器部署 (推荐)
268293

269294
> Docker 版本需要在 20 及其以上,否则会提示找不到镜像。

README_JA.md

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
ワンクリックで無料であなた専用の ChatGPT ウェブアプリをデプロイ。GPT3、GPT4 & Gemini Pro モデルをサポート。
77

8-
[NextChatAI](https://nextchat.dev/chat) / [企業版](#企業版) / [デモ](https://chat-gpt-next-web.vercel.app/) / [フィードバック](https://github.com/Yidadaa/ChatGPT-Next-Web/issues) / [Discordに参加](https://discord.gg/zrhvHCr79N)
8+
[NextChatAI](https://nextchat.dev/chat?utm_source=readme) / [企業版](#企業版) / [デモ](https://chat-gpt-next-web.vercel.app/) / [フィードバック](https://github.com/Yidadaa/ChatGPT-Next-Web/issues) / [Discordに参加](https://discord.gg/zrhvHCr79N)
99

1010
[<img src="https://vercel.com/button" alt="Zeaburでデプロイ" 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="Zeaburでデプロイ" height="30">](https://zeabur.com/templates/ZBUEFA) [<img src="https://gitpod.io/button/open-in-gitpod.svg" alt="Gitpodで開く" height="30">](https://gitpod.io/#https://github.com/Yidadaa/ChatGPT-Next-Web)
1111

@@ -54,7 +54,7 @@
5454

5555
### 自動更新を開く
5656

57-
> Upstream Sync の実行エラーが発生した場合は、手動で Sync Fork してください!
57+
> Upstream Sync の実行エラーが発生した場合は、[手動で Sync Fork](./README_JA.md#手動でコードを更新する) してください!
5858
5959
プロジェクトを fork した後、GitHub の制限により、fork 後のプロジェクトの Actions ページで Workflows を手動で有効にし、Upstream Sync Action を有効にする必要があります。有効化後、毎時の定期自動更新が可能になります:
6060

@@ -207,8 +207,8 @@ ByteDance API の URL。
207207
208208
モデルリストを管理します。`+` でモデルを追加し、`-` でモデルを非表示にし、`モデル名=表示名` でモデルの表示名をカスタマイズし、カンマで区切ります。
209209

210-
Azure モードでは、`modelName@azure=deploymentName` 形式でモデル名とデプロイ名(deploy-name)を設定できます。
211-
> 例:`+gpt-3.5-turbo@azure=gpt35` この設定でモデルリストに `gpt35(Azure)` のオプションが表示されます。
210+
Azure モードでは、`modelName@Azure=deploymentName` 形式でモデル名とデプロイ名(deploy-name)を設定できます。
211+
> 例:`+gpt-3.5-turbo@Azure=gpt35` この設定でモデルリストに `gpt35(Azure)` のオプションが表示されます。
212212
213213
ByteDance モードでは、`modelName@bytedance=deploymentName` 形式でモデル名とデプロイ名(deploy-name)を設定できます。
214214
> 例: `+Doubao-lite-4k@bytedance=ep-xxxxx-xxx` この設定でモデルリストに `Doubao-lite-4k(ByteDance)` のオプションが表示されます。
@@ -217,6 +217,13 @@ ByteDance モードでは、`modelName@bytedance=deploymentName` 形式でモデ
217217

218218
デフォルトのモデルを変更します。
219219

220+
### `VISION_MODELS` (オプション)
221+
222+
> デフォルト:空
223+
> 例:`gpt-4-vision,claude-3-opus,my-custom-model` は、これらのモデルにビジョン機能を追加します。これはデフォルトのパターンマッチング("vision"、"claude-3"、"gemini-1.5"などのキーワードを含むモデルを検出)に加えて適用されます。
224+
225+
デフォルトのパターンマッチングに加えて、追加のモデルにビジョン機能を付与します。複数のモデルはカンマで区切ります。
226+
220227
### `DEFAULT_INPUT_TEMPLATE` (オプション)
221228

222229
『設定』の『ユーザー入力前処理』の初期設定に使用するテンプレートをカスタマイズします。

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ 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";
14+
import { handle as xaiHandler } from "../../xai";
15+
import { handle as chatglmHandler } from "../../glm";
1316
import { handle as proxyHandler } from "../../proxy";
1417

1518
async function handle(
@@ -38,6 +41,12 @@ async function handle(
3841
return stabilityHandler(req, { params });
3942
case ApiPath.Iflytek:
4043
return iflytekHandler(req, { params });
44+
case ApiPath.DeepSeek:
45+
return deepseekHandler(req, { params });
46+
case ApiPath.XAI:
47+
return xaiHandler(req, { params });
48+
case ApiPath.ChatGLM:
49+
return chatglmHandler(req, { params });
4150
case ApiPath.OpenAI:
4251
return openaiHandler(req, { params });
4352
default:

app/api/alibaba.ts

Lines changed: 2 additions & 2 deletions
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,

0 commit comments

Comments
 (0)