mirror of
				https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
				synced 2025-11-04 00:03:46 +08:00 
			
		
		
		
	Compare commits
	
		
			3 Commits
		
	
	
		
			dependabot
			...
			50d191482b
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 
						 | 
					50d191482b | ||
| 
						 | 
					812c1c770c | ||
| 
						 | 
					54e3753d93 | 
@@ -81,9 +81,3 @@ SILICONFLOW_API_KEY=
 | 
			
		||||
 | 
			
		||||
### siliconflow Api url (optional)
 | 
			
		||||
SILICONFLOW_URL=
 | 
			
		||||
 | 
			
		||||
### 302.AI Api key (optional)
 | 
			
		||||
AI302_API_KEY=
 | 
			
		||||
 | 
			
		||||
### 302.AI Api url (optional)
 | 
			
		||||
AI302_URL=
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										54
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										54
									
								
								README.md
									
									
									
									
									
								
							@@ -4,13 +4,17 @@
 | 
			
		||||
  <img src="https://github.com/user-attachments/assets/83bdcc07-ae5e-4954-a53a-ac151ba6ccf3" width="1000" alt="icon"/>
 | 
			
		||||
</a>
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
<h1 align="center">NextChat</h1>
 | 
			
		||||
 | 
			
		||||
English / [简体中文](./README_CN.md)
 | 
			
		||||
 | 
			
		||||
<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>
 | 
			
		||||
 | 
			
		||||
✨ Light and Fast AI Assistant,with Claude, DeepSeek, GPT4 & Gemini Pro support.
 | 
			
		||||
 | 
			
		||||
✨ Light and Fast AI Assistant,with Claude, DeepSeek, GPT4 & Gemini Pro support. 
 | 
			
		||||
 | 
			
		||||
[![Saas][Saas-image]][saas-url]
 | 
			
		||||
[![Web][Web-image]][web-url]
 | 
			
		||||
@@ -18,49 +22,41 @@ English / [简体中文](./README_CN.md)
 | 
			
		||||
[![MacOS][MacOS-image]][download-url]
 | 
			
		||||
[![Linux][Linux-image]][download-url]
 | 
			
		||||
 | 
			
		||||
[NextChatAI](https://nextchat.club?utm_source=readme) / [iOS APP](https://apps.apple.com/us/app/nextchat-ai/id6743085599) / [Web App Demo](https://app.nextchat.club) / [Desktop App](https://github.com/Yidadaa/ChatGPT-Next-Web/releases) / [Enterprise Edition](#enterprise-edition)
 | 
			
		||||
[NextChatAI](https://nextchat.club?utm_source=readme) / [iOS APP](https://apps.apple.com/us/app/nextchat-ai/id6743085599) / [Web App Demo](https://app.nextchat.dev) / [Desktop App](https://github.com/Yidadaa/ChatGPT-Next-Web/releases) / [Enterprise Edition](#enterprise-edition) 
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
[saas-url]: https://nextchat.club?utm_source=readme
 | 
			
		||||
[saas-image]: https://img.shields.io/badge/NextChat-Saas-green?logo=microsoftedge
 | 
			
		||||
[web-url]: https://app.nextchat.club/
 | 
			
		||||
[web-url]: https://app.nextchat.dev/
 | 
			
		||||
[download-url]: https://github.com/Yidadaa/ChatGPT-Next-Web/releases
 | 
			
		||||
[Web-image]: https://img.shields.io/badge/Web-PWA-orange?logo=microsoftedge
 | 
			
		||||
[Windows-image]: https://img.shields.io/badge/-Windows-blue?logo=windows
 | 
			
		||||
[MacOS-image]: https://img.shields.io/badge/-MacOS-black?logo=apple
 | 
			
		||||
[Linux-image]: https://img.shields.io/badge/-Linux-333?logo=ubuntu
 | 
			
		||||
 | 
			
		||||
[<img src="https://zeabur.com/button.svg" alt="Deploy on Zeabur" height="30">](https://zeabur.com/templates/ZBUEFA) [<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://gitpod.io/button/open-in-gitpod.svg" alt="Open in Gitpod" height="30">](https://gitpod.io/#https://github.com/ChatGPTNextWeb/NextChat)
 | 
			
		||||
[<img src="https://zeabur.com/button.svg" alt="Deploy on Zeabur" height="30">](https://zeabur.com/templates/ZBUEFA) [<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://gitpod.io/button/open-in-gitpod.svg" alt="Open in Gitpod" height="30">](https://gitpod.io/#https://github.com/ChatGPTNextWeb/NextChat) 
 | 
			
		||||
 | 
			
		||||
[<img src="https://github.com/user-attachments/assets/903482d4-3e87-4134-9af1-f2588fa90659" height="50" width="" >](https://monica.im/?utm=nxcrp)
 | 
			
		||||
 | 
			
		||||
</div>
 | 
			
		||||
 | 
			
		||||
## ❤️ Sponsor AI API
 | 
			
		||||
 | 
			
		||||
<a href='https://302.ai/'>
 | 
			
		||||
  <img src="https://github.com/user-attachments/assets/a03edf82-2031-4f23-bdb8-bfc0bfd168a4" width="100%" alt="icon"/>
 | 
			
		||||
</a>
 | 
			
		||||
 | 
			
		||||
[302.AI](https://302.ai/) is a pay-as-you-go AI application platform that offers the most comprehensive AI APIs and online applications available.
 | 
			
		||||
 | 
			
		||||
## 🥳 Cheer for NextChat iOS Version Online!
 | 
			
		||||
 | 
			
		||||
> [👉 Click Here to Install Now](https://apps.apple.com/us/app/nextchat-ai/id6743085599)
 | 
			
		||||
 | 
			
		||||
> [❤️ Source Code Coming Soon](https://github.com/ChatGPTNextWeb/NextChat-iOS)
 | 
			
		||||
 | 
			
		||||

 | 
			
		||||
 | 
			
		||||
## 🫣 NextChat Support MCP !
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
## 🫣 NextChat Support MCP  ! 
 | 
			
		||||
> Before build, please set env ENABLE_MCP=true
 | 
			
		||||
 | 
			
		||||
<img src="https://github.com/user-attachments/assets/d8851f40-4e36-4335-b1a4-ec1e11488c7e"/>
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
## Enterprise Edition
 | 
			
		||||
 | 
			
		||||
Meeting Your Company's Privatization and Customization Deployment Requirements:
 | 
			
		||||
 | 
			
		||||
- **Brand Customization**: Tailored VI/UI to seamlessly align with your corporate brand image.
 | 
			
		||||
- **Resource Integration**: Unified configuration and management of dozens of AI resources by company administrators, ready for use by team members.
 | 
			
		||||
- **Permission Control**: Clearly defined member permissions, resource permissions, and knowledge base permissions, all controlled via a corporate-grade Admin Panel.
 | 
			
		||||
@@ -77,6 +73,7 @@ For enterprise inquiries, please contact: **business@nextchat.dev**
 | 
			
		||||
 | 
			
		||||

 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
## Features
 | 
			
		||||
 | 
			
		||||
- **Deploy for free with one-click** on Vercel in under 1 minute
 | 
			
		||||
@@ -112,11 +109,10 @@ For enterprise inquiries, please contact: **business@nextchat.dev**
 | 
			
		||||
- [ ] local knowledge base
 | 
			
		||||
 | 
			
		||||
## What's New
 | 
			
		||||
 | 
			
		||||
- 🚀 v2.15.8 Now supports Realtime Chat [#5672](https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web/issues/5672)
 | 
			
		||||
- 🚀 v2.15.4 The Application supports using Tauri fetch LLM API, MORE SECURITY! [#5379](https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web/issues/5379)
 | 
			
		||||
- 🚀 v2.15.0 Now supports Plugins! Read this: [NextChat-Awesome-Plugins](https://github.com/ChatGPTNextWeb/NextChat-Awesome-Plugins)
 | 
			
		||||
- 🚀 v2.14.0 Now supports Artifacts & SD
 | 
			
		||||
- 🚀 v2.14.0 Now supports  Artifacts & SD 
 | 
			
		||||
- 🚀 v2.10.1 support Google Gemini Pro model.
 | 
			
		||||
- 🚀 v2.9.11 you can use azure endpoint now.
 | 
			
		||||
- 🚀 v2.8 now we have a client that runs across all platforms!
 | 
			
		||||
@@ -316,12 +312,10 @@ To control custom models, use `+` to add a custom model, use `-` to hide a model
 | 
			
		||||
User `-all` to disable all default models, `+all` to enable all default models.
 | 
			
		||||
 | 
			
		||||
For Azure: use `modelName@Azure=deploymentName` to customize model name and deployment name.
 | 
			
		||||
 | 
			
		||||
> Example: `+gpt-3.5-turbo@Azure=gpt35` will show option `gpt35(Azure)` in model list.
 | 
			
		||||
> If you only can use Azure model, `-all,+gpt-3.5-turbo@Azure=gpt35` will `gpt35(Azure)` the only option in model list.
 | 
			
		||||
 | 
			
		||||
For ByteDance: use `modelName@bytedance=deploymentName` to customize model name and deployment name.
 | 
			
		||||
 | 
			
		||||
> Example: `+Doubao-lite-4k@bytedance=ep-xxxxx-xxx` will show option `Doubao-lite-4k(ByteDance)` in model list.
 | 
			
		||||
 | 
			
		||||
### `DEFAULT_MODEL` (optional)
 | 
			
		||||
@@ -338,9 +332,8 @@ Add additional models to have vision capabilities, beyond the default pattern ma
 | 
			
		||||
### `WHITE_WEBDAV_ENDPOINTS` (optional)
 | 
			
		||||
 | 
			
		||||
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:
 | 
			
		||||
 | 
			
		||||
- Each address must be a complete endpoint
 | 
			
		||||
  > `https://xxxx/yyy`
 | 
			
		||||
- Each address must be a complete endpoint 
 | 
			
		||||
> `https://xxxx/yyy`
 | 
			
		||||
- Multiple addresses are connected by ', '
 | 
			
		||||
 | 
			
		||||
### `DEFAULT_INPUT_TEMPLATE` (optional)
 | 
			
		||||
@@ -355,6 +348,7 @@ Stability API key.
 | 
			
		||||
 | 
			
		||||
Customize Stability API url.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
### `ENABLE_MCP` (optional)
 | 
			
		||||
 | 
			
		||||
Enable MCP(Model Context Protocol)Feature
 | 
			
		||||
@@ -367,20 +361,13 @@ SiliconFlow API Key.
 | 
			
		||||
 | 
			
		||||
SiliconFlow API URL.
 | 
			
		||||
 | 
			
		||||
### `AI302_API_KEY` (optional)
 | 
			
		||||
 | 
			
		||||
302.AI API Key.
 | 
			
		||||
 | 
			
		||||
### `AI302_URL` (optional)
 | 
			
		||||
 | 
			
		||||
302.AI API URL.
 | 
			
		||||
 | 
			
		||||
## Requirements
 | 
			
		||||
 | 
			
		||||
NodeJS >= 18, Docker >= 20
 | 
			
		||||
 | 
			
		||||
## Development
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
[](https://gitpod.io/#https://github.com/Yidadaa/ChatGPT-Next-Web)
 | 
			
		||||
 | 
			
		||||
Before starting development, you must create a new `.env.local` file at project root, and place your api key into it:
 | 
			
		||||
@@ -404,6 +391,7 @@ yarn dev
 | 
			
		||||
 | 
			
		||||
## Deployment
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
### Docker (Recommended)
 | 
			
		||||
 | 
			
		||||
```shell
 | 
			
		||||
@@ -461,6 +449,8 @@ bash <(curl -s https://raw.githubusercontent.com/Yidadaa/ChatGPT-Next-Web/main/s
 | 
			
		||||
- [How to use Vercel (No English)](./docs/vercel-cn.md)
 | 
			
		||||
- [User Manual (Only Chinese, WIP)](./docs/user-manual-cn.md)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
## Translation
 | 
			
		||||
 | 
			
		||||
If you want to add a new translation, read this [document](./docs/translation.md).
 | 
			
		||||
@@ -471,6 +461,8 @@ If you want to add a new translation, read this [document](./docs/translation.md
 | 
			
		||||
 | 
			
		||||
## Special Thanks
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
### Contributors
 | 
			
		||||
 | 
			
		||||
<a href="https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web/graphs/contributors">
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										28
									
								
								README_CN.md
									
									
									
									
									
								
							
							
						
						
									
										28
									
								
								README_CN.md
									
									
									
									
									
								
							@@ -10,22 +10,13 @@
 | 
			
		||||
 | 
			
		||||
[NextChatAI](https://nextchat.club?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)
 | 
			
		||||
 | 
			
		||||
[<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)
 | 
			
		||||
[<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)
 | 
			
		||||
 | 
			
		||||
</div>
 | 
			
		||||
 | 
			
		||||
## Sponsor AI API
 | 
			
		||||
 | 
			
		||||
<a href='https://302.ai/'>
 | 
			
		||||
  <img src="https://github.com/user-attachments/assets/d8c0c513-1e18-4d3b-a2a9-ff3696aec0d4" width="100%" alt="icon"/>
 | 
			
		||||
</a>
 | 
			
		||||
 | 
			
		||||
[302.AI](https://302.ai/) 是一个按需付费的AI应用平台,提供市面上最全的AI API和AI在线应用。
 | 
			
		||||
 | 
			
		||||
## 企业版
 | 
			
		||||
 | 
			
		||||
满足您公司私有化部署和定制需求
 | 
			
		||||
 | 
			
		||||
- **品牌定制**:企业量身定制 VI/UI,与企业品牌形象无缝契合
 | 
			
		||||
- **资源集成**:由企业管理人员统一配置和管理数十种 AI 资源,团队成员开箱即用
 | 
			
		||||
- **权限管理**:成员权限、资源权限、知识库权限层级分明,企业级 Admin Panel 统一控制
 | 
			
		||||
@@ -38,6 +29,7 @@
 | 
			
		||||
 | 
			
		||||
<img width="300" src="https://github.com/user-attachments/assets/bb29a11d-ff75-48a8-b1f8-d2d7238cf987">
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
## 开始使用
 | 
			
		||||
 | 
			
		||||
1. 准备好你的 [OpenAI API Key](https://platform.openai.com/account/api-keys);
 | 
			
		||||
@@ -209,6 +201,7 @@ DeepSeek Api Key.
 | 
			
		||||
 | 
			
		||||
DeepSeek Api Url.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
### `HIDE_USER_API_KEY` (可选)
 | 
			
		||||
 | 
			
		||||
如果你不想让用户自行填入 API Key,将此环境变量设置为 1 即可。
 | 
			
		||||
@@ -228,9 +221,8 @@ DeepSeek Api Url.
 | 
			
		||||
### `WHITE_WEBDAV_ENDPOINTS` (可选)
 | 
			
		||||
 | 
			
		||||
如果你想增加允许访问的webdav服务地址,可以使用该选项,格式要求:
 | 
			
		||||
 | 
			
		||||
- 每一个地址必须是一个完整的 endpoint
 | 
			
		||||
  > `https://xxxx/xxx`
 | 
			
		||||
> `https://xxxx/xxx`
 | 
			
		||||
- 多个地址以`,`相连
 | 
			
		||||
 | 
			
		||||
### `CUSTOM_MODELS` (可选)
 | 
			
		||||
@@ -241,14 +233,13 @@ DeepSeek Api Url.
 | 
			
		||||
用来控制模型列表,使用 `+` 增加一个模型,使用 `-` 来隐藏一个模型,使用 `模型名=展示名` 来自定义模型的展示名,用英文逗号隔开。
 | 
			
		||||
 | 
			
		||||
在Azure的模式下,支持使用`modelName@Azure=deploymentName`的方式配置模型名称和部署名称(deploy-name)
 | 
			
		||||
 | 
			
		||||
> 示例:`+gpt-3.5-turbo@Azure=gpt35`这个配置会在模型列表显示一个`gpt35(Azure)`的选项。
 | 
			
		||||
> 如果你只能使用Azure模式,那么设置 `-all,+gpt-3.5-turbo@Azure=gpt35` 则可以让对话的默认使用 `gpt35(Azure)`
 | 
			
		||||
 | 
			
		||||
在ByteDance的模式下,支持使用`modelName@bytedance=deploymentName`的方式配置模型名称和部署名称(deploy-name)
 | 
			
		||||
 | 
			
		||||
> 示例: `+Doubao-lite-4k@bytedance=ep-xxxxx-xxx`这个配置会在模型列表显示一个`Doubao-lite-4k(ByteDance)`的选项
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
### `DEFAULT_MODEL` (可选)
 | 
			
		||||
 | 
			
		||||
更改默认模型
 | 
			
		||||
@@ -284,14 +275,6 @@ SiliconFlow API Key.
 | 
			
		||||
 | 
			
		||||
SiliconFlow API URL.
 | 
			
		||||
 | 
			
		||||
### `AI302_API_KEY` (optional)
 | 
			
		||||
 | 
			
		||||
302.AI API Key.
 | 
			
		||||
 | 
			
		||||
### `AI302_URL` (optional)
 | 
			
		||||
 | 
			
		||||
302.AI API URL.
 | 
			
		||||
 | 
			
		||||
## 开发
 | 
			
		||||
 | 
			
		||||
点击下方按钮,开始二次开发:
 | 
			
		||||
@@ -316,7 +299,6 @@ BASE_URL=https://b.nextweb.fun/api/proxy
 | 
			
		||||
## 部署
 | 
			
		||||
 | 
			
		||||
### 宝塔面板部署
 | 
			
		||||
 | 
			
		||||
> [简体中文 > 如何通过宝塔一键部署](./docs/bt-cn.md)
 | 
			
		||||
 | 
			
		||||
### 容器部署 (推荐)
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										36
									
								
								README_JA.md
									
									
									
									
									
								
							
							
						
						
									
										36
									
								
								README_JA.md
									
									
									
									
									
								
							@@ -7,22 +7,14 @@
 | 
			
		||||
 | 
			
		||||
[NextChatAI](https://nextchat.club?utm_source=readme) / [企業版](#企業版) / [デモ](https://chat-gpt-next-web.vercel.app/) / [フィードバック](https://github.com/Yidadaa/ChatGPT-Next-Web/issues) / [Discordに参加](https://discord.gg/zrhvHCr79N)
 | 
			
		||||
 | 
			
		||||
[<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)
 | 
			
		||||
[<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)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
</div>
 | 
			
		||||
 | 
			
		||||
## Sponsor AI API
 | 
			
		||||
 | 
			
		||||
<a href='https://302.ai/'>
 | 
			
		||||
  <img src="https://github.com/user-attachments/assets/6cf24233-1010-43e0-9a83-a11159866175" width="100%" alt="icon"/>
 | 
			
		||||
</a>
 | 
			
		||||
 | 
			
		||||
[302.AI](https://302.ai/) は、オンデマンドで支払うAIアプリケーションプラットフォームで、最も安全なAI APIとAIオンラインアプリケーションを提供します。
 | 
			
		||||
 | 
			
		||||
## 企業版
 | 
			
		||||
 | 
			
		||||
あなたの会社のプライベートデプロイとカスタマイズのニーズに応える
 | 
			
		||||
 | 
			
		||||
- **ブランドカスタマイズ**:企業向けに特別に設計された VI/UI、企業ブランドイメージとシームレスにマッチ
 | 
			
		||||
- **リソース統合**:企業管理者が数十種類のAIリソースを統一管理、チームメンバーはすぐに使用可能
 | 
			
		||||
- **権限管理**:メンバーの権限、リソースの権限、ナレッジベースの権限を明確にし、企業レベルのAdmin Panelで統一管理
 | 
			
		||||
@@ -33,6 +25,7 @@
 | 
			
		||||
 | 
			
		||||
企業版のお問い合わせ: **business@nextchat.dev**
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
## 始めに
 | 
			
		||||
 | 
			
		||||
1. [OpenAI API Key](https://platform.openai.com/account/api-keys)を準備する;
 | 
			
		||||
@@ -47,6 +40,7 @@
 | 
			
		||||
 | 
			
		||||
</div>
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
## 更新を維持する
 | 
			
		||||
 | 
			
		||||
もし上記の手順に従ってワンクリックでプロジェクトをデプロイした場合、「更新があります」というメッセージが常に表示されることがあります。これは、Vercel がデフォルトで新しいプロジェクトを作成するためで、本プロジェクトを fork していないことが原因です。そのため、正しく更新を検出できません。
 | 
			
		||||
@@ -57,6 +51,7 @@
 | 
			
		||||
- ページ右上の fork ボタンを使って、本プロジェクトを fork する
 | 
			
		||||
- Vercel で再度選択してデプロイする、[詳細な手順はこちらを参照してください](./docs/vercel-ja.md)。
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
### 自動更新を開く
 | 
			
		||||
 | 
			
		||||
> Upstream Sync の実行エラーが発生した場合は、[手動で Sync Fork](./README_JA.md#手動でコードを更新する) してください!
 | 
			
		||||
@@ -67,12 +62,15 @@
 | 
			
		||||
 | 
			
		||||

 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
### 手動でコードを更新する
 | 
			
		||||
 | 
			
		||||
手動で即座に更新したい場合は、[GitHub のドキュメント](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork)を参照して、fork したプロジェクトを上流のコードと同期する方法を確認してください。
 | 
			
		||||
 | 
			
		||||
このプロジェクトをスターまたはウォッチしたり、作者をフォローすることで、新機能の更新通知をすぐに受け取ることができます。
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
## ページアクセスパスワードを設定する
 | 
			
		||||
 | 
			
		||||
> パスワードを設定すると、ユーザーは設定ページでアクセスコードを手動で入力しない限り、通常のチャットができず、未承認の状態であることを示すメッセージが表示されます。
 | 
			
		||||
@@ -87,6 +85,7 @@ code1,code2,code3
 | 
			
		||||
 | 
			
		||||
この環境変数を追加または変更した後、**プロジェクトを再デプロイ**して変更を有効にしてください。
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
## 環境変数
 | 
			
		||||
 | 
			
		||||
> 本プロジェクトのほとんどの設定は環境変数で行います。チュートリアル:[Vercel の環境変数を変更する方法](./docs/vercel-ja.md)。
 | 
			
		||||
@@ -197,9 +196,8 @@ ByteDance API の URL。
 | 
			
		||||
### `WHITE_WEBDAV_ENDPOINTS` (オプション)
 | 
			
		||||
 | 
			
		||||
アクセス許可を与える WebDAV サービスのアドレスを追加したい場合、このオプションを使用します。フォーマット要件:
 | 
			
		||||
 | 
			
		||||
- 各アドレスは完全なエンドポイントでなければなりません。
 | 
			
		||||
  > `https://xxxx/xxx`
 | 
			
		||||
> `https://xxxx/xxx`
 | 
			
		||||
- 複数のアドレスは `,` で接続します。
 | 
			
		||||
 | 
			
		||||
### `CUSTOM_MODELS` (オプション)
 | 
			
		||||
@@ -210,11 +208,9 @@ ByteDance API の URL。
 | 
			
		||||
モデルリストを管理します。`+` でモデルを追加し、`-` でモデルを非表示にし、`モデル名=表示名` でモデルの表示名をカスタマイズし、カンマで区切ります。
 | 
			
		||||
 | 
			
		||||
Azure モードでは、`modelName@Azure=deploymentName` 形式でモデル名とデプロイ名(deploy-name)を設定できます。
 | 
			
		||||
 | 
			
		||||
> 例:`+gpt-3.5-turbo@Azure=gpt35` この設定でモデルリストに `gpt35(Azure)` のオプションが表示されます。
 | 
			
		||||
 | 
			
		||||
ByteDance モードでは、`modelName@bytedance=deploymentName` 形式でモデル名とデプロイ名(deploy-name)を設定できます。
 | 
			
		||||
 | 
			
		||||
> 例: `+Doubao-lite-4k@bytedance=ep-xxxxx-xxx` この設定でモデルリストに `Doubao-lite-4k(ByteDance)` のオプションが表示されます。
 | 
			
		||||
 | 
			
		||||
### `DEFAULT_MODEL` (オプション)
 | 
			
		||||
@@ -232,13 +228,6 @@ ByteDance モードでは、`modelName@bytedance=deploymentName` 形式でモデ
 | 
			
		||||
 | 
			
		||||
『設定』の『ユーザー入力前処理』の初期設定に使用するテンプレートをカスタマイズします。
 | 
			
		||||
 | 
			
		||||
### `AI302_API_KEY` (オプション)
 | 
			
		||||
 | 
			
		||||
302.AI API キー.
 | 
			
		||||
 | 
			
		||||
### `AI302_URL` (オプション)
 | 
			
		||||
 | 
			
		||||
302.AI API の URL.
 | 
			
		||||
 | 
			
		||||
## 開発
 | 
			
		||||
 | 
			
		||||
@@ -252,12 +241,14 @@ ByteDance モードでは、`modelName@bytedance=deploymentName` 形式でモデ
 | 
			
		||||
OPENAI_API_KEY=<your api key here>
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
### ローカル開発
 | 
			
		||||
 | 
			
		||||
1. Node.js 18 と Yarn をインストールします。具体的な方法は ChatGPT にお尋ねください。
 | 
			
		||||
2. `yarn install && yarn dev` を実行します。⚠️ 注意:このコマンドはローカル開発用であり、デプロイには使用しないでください。
 | 
			
		||||
3. ローカルでデプロイしたい場合は、`yarn install && yarn build && yarn start` コマンドを使用してください。プロセスを守るために pm2 を使用することもできます。詳細は ChatGPT にお尋ねください。
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
## デプロイ
 | 
			
		||||
 | 
			
		||||
### コンテナデプロイ(推奨)
 | 
			
		||||
@@ -294,6 +285,7 @@ docker run -d -p 3000:3000 \
 | 
			
		||||
 | 
			
		||||
他の環境変数を指定する必要がある場合は、上記のコマンドに `-e 環境変数=環境変数値` を追加して指定してください。
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
### ローカルデプロイ
 | 
			
		||||
 | 
			
		||||
コンソールで以下のコマンドを実行します:
 | 
			
		||||
@@ -304,6 +296,7 @@ bash <(curl -s https://raw.githubusercontent.com/Yidadaa/ChatGPT-Next-Web/main/s
 | 
			
		||||
 | 
			
		||||
⚠️ 注意:インストール中に問題が発生した場合は、Docker を使用してデプロイしてください。
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
## 謝辞
 | 
			
		||||
 | 
			
		||||
### 寄付者
 | 
			
		||||
@@ -318,6 +311,7 @@ bash <(curl -s https://raw.githubusercontent.com/Yidadaa/ChatGPT-Next-Web/main/s
 | 
			
		||||
 | 
			
		||||
- [one-api](https://github.com/songquanpeng/one-api): 一つのプラットフォームで大規模モデルのクォータ管理を提供し、市場に出回っているすべての主要な大規模言語モデルをサポートします。
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
## オープンソースライセンス
 | 
			
		||||
 | 
			
		||||
[MIT](https://opensource.org/license/mit/)
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										492
									
								
								README_KO.md
									
									
									
									
									
								
							
							
						
						
									
										492
									
								
								README_KO.md
									
									
									
									
									
								
							@@ -1,492 +0,0 @@
 | 
			
		||||
<div align="center">
 | 
			
		||||
 | 
			
		||||
<a href='https://nextchat.club'>
 | 
			
		||||
  <img src="https://github.com/user-attachments/assets/83bdcc07-ae5e-4954-a53a-ac151ba6ccf3" width="1000" alt="icon"/>
 | 
			
		||||
</a>
 | 
			
		||||
 | 
			
		||||
<h1 align="center">NextChat</h1>
 | 
			
		||||
 | 
			
		||||
영어 / [简体中文](./README_CN.md)
 | 
			
		||||
 | 
			
		||||
<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>
 | 
			
		||||
 | 
			
		||||
✨ 빠르고 가벼운 AI 어시스턴트, Claude, DeepSeek, GPT-4, Gemini Pro 지원
 | 
			
		||||
 | 
			
		||||
[![Saas][Saas-image]][saas-url]
 | 
			
		||||
[![Web][Web-image]][web-url]
 | 
			
		||||
[![Windows][Windows-image]][download-url]
 | 
			
		||||
[![MacOS][MacOS-image]][download-url]
 | 
			
		||||
[![Linux][Linux-image]][download-url]
 | 
			
		||||
 | 
			
		||||
[NextChatAI 웹사이트](https://nextchat.club?utm_source=readme) / [iOS 앱](https://apps.apple.com/us/app/nextchat-ai/id6743085599) / [웹 데모](https://app.nextchat.club) / [데스크톱 앱](https://github.com/Yidadaa/ChatGPT-Next-Web/releases) / [엔터프라이즈 버전](#enterprise-edition)
 | 
			
		||||
 | 
			
		||||
[saas-url]: https://nextchat.club?utm_source=readme
 | 
			
		||||
[saas-image]: https://img.shields.io/badge/NextChat-Saas-green?logo=microsoftedge
 | 
			
		||||
[web-url]: https://app.nextchat.club/
 | 
			
		||||
[download-url]: https://github.com/Yidadaa/ChatGPT-Next-Web/releases
 | 
			
		||||
[Web-image]: https://img.shields.io/badge/Web-PWA-orange?logo=microsoftedge
 | 
			
		||||
[Windows-image]: https://img.shields.io/badge/-Windows-blue?logo=windows
 | 
			
		||||
[MacOS-image]: https://img.shields.io/badge/-MacOS-black?logo=apple
 | 
			
		||||
[Linux-image]: https://img.shields.io/badge/-Linux-333?logo=ubuntu
 | 
			
		||||
 | 
			
		||||
[<img src="https://zeabur.com/button.svg" alt="Deploy on Zeabur" height="30">](https://zeabur.com/templates/ZBUEFA) [<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://gitpod.io/button/open-in-gitpod.svg" alt="Open in Gitpod" height="30">](https://gitpod.io/#https://github.com/ChatGPTNextWeb/NextChat)
 | 
			
		||||
 | 
			
		||||
[<img src="https://github.com/user-attachments/assets/903482d4-3e87-4134-9af1-f2588fa90659" height="50" width="" >](https://monica.im/?utm=nxcrp)
 | 
			
		||||
 | 
			
		||||
</div>
 | 
			
		||||
 | 
			
		||||
## ❤️ AI API 후원사
 | 
			
		||||
 | 
			
		||||
<a href='https://302.ai/'>
 | 
			
		||||
  <img src="https://github.com/user-attachments/assets/a03edf82-2031-4f23-bdb8-bfc0bfd168a4" width="100%" alt="icon"/>
 | 
			
		||||
</a>
 | 
			
		||||
 | 
			
		||||
[302.AI](https://302.ai/)는 사용한 만큼만 비용을 지불하는 AI 애플리케이션 플랫폼으로, 다양한 AI API 및 온라인 애플리케이션을 제공합니다.
 | 
			
		||||
 | 
			
		||||
## 🥳 NextChat iOS 버전 출시!
 | 
			
		||||
 | 
			
		||||
> 👉 [지금 설치하기](https://apps.apple.com/us/app/nextchat-ai/id6743085599)
 | 
			
		||||
 | 
			
		||||
> ❤️ [소스 코드 곧 공개 예정](https://github.com/ChatGPTNextWeb/NextChat-iOS)
 | 
			
		||||
 | 
			
		||||

 | 
			
		||||
 | 
			
		||||
## 🫣 NextChat, MCP 지원!
 | 
			
		||||
 | 
			
		||||
> 빌드 전 환경 변수(env) `ENABLE_MCP=true` 설정 필요
 | 
			
		||||
 | 
			
		||||
<img src="https://github.com/user-attachments/assets/d8851f40-4e36-4335-b1a4-ec1e11488c7e" />
 | 
			
		||||
 | 
			
		||||
## 엔터프라이즈 버전
 | 
			
		||||
 | 
			
		||||
회사 내부 시스템에 맞춘 프라이빗 배포 및 맞춤형 커스터마이징 지원:
 | 
			
		||||
 | 
			
		||||
- **브랜드 커스터마이징**: 기업 이미지에 맞는 UI/UX 테마 적용
 | 
			
		||||
- **리소스 통합 관리**: 다양한 AI 모델을 통합하여 팀원이 손쉽게 사용 가능
 | 
			
		||||
- **권한 제어**: 관리자 패널을 통한 멤버·리소스·지식 베이스 권한 설정
 | 
			
		||||
- **지식 통합**: 사내 문서 및 데이터와 AI를 결합한 맞춤형 답변 제공
 | 
			
		||||
- **보안 감사**: 민감한 질문 차단 및 모든 기록 추적 가능
 | 
			
		||||
- **프라이빗 배포 지원**: 주요 클라우드 서비스에 맞춘 배포 옵션
 | 
			
		||||
- **지속적 업데이트**: 멀티모달 등 최신 AI 기능 지속 반영
 | 
			
		||||
 | 
			
		||||
엔터프라이즈 문의: **business@nextchat.dev**
 | 
			
		||||
 | 
			
		||||
## 🖼️ 스크린샷
 | 
			
		||||
 | 
			
		||||

 | 
			
		||||

 | 
			
		||||
 | 
			
		||||
## 주요 기능 소개
 | 
			
		||||
 | 
			
		||||
- Vercel에서 원클릭 무료 배포 (1분 내 완성)
 | 
			
		||||
- 모든 OS(Linux/Windows/MacOS)에서 사용 가능한 클라이언트 (~5MB) [지금 다운 받기](https://github.com/Yidadaa/ChatGPT-Next-Web/releases)
 | 
			
		||||
- 자체 LLM 서버와 완벽 호환. [RWKV-Runner](https://github.com/josStorer/RWKV-Runner) 또는 [LocalAI](https://github.com/go-skynet/LocalAI)와 함께 사용하는 것을 추천
 | 
			
		||||
- 개인 정보 보호: 모든 대화 기록은 브라우저에만 저장
 | 
			
		||||
- Markdown 지원: LaTex, Mermaid, 코드 하이라이팅 등
 | 
			
		||||
- 반응형 디자인, 다크 모드, PWA 지원
 | 
			
		||||
- 빠른 초기 로딩 속도 (~100kb), 스트리밍 응답
 | 
			
		||||
- 프롬프트 템플릿 생성/공유/디버깅 지원 (v2)
 | 
			
		||||
- v2: 프롬프트 템플릿 기반 도구 생성, 공유, 디버깅 가능
 | 
			
		||||
- 고급 프롬프트 내장 [awesome-chatgpt-prompts-zh](https://github.com/PlexPt/awesome-chatgpt-prompts-zh) and [awesome-chatgpt-prompts](https://github.com/f/awesome-chatgpt-prompts)
 | 
			
		||||
- 긴 대화 내용 자동 압축 저장으로 토큰 절약
 | 
			
		||||
- I18n: English, 简体中文, 繁体中文, 日本語, Français, Español, Italiano, Türkçe, Deutsch, Tiếng Việt, Русский, Čeština, 한국어, Indonesia
 | 
			
		||||
 | 
			
		||||
<div align="center">
 | 
			
		||||
   
 | 
			
		||||

 | 
			
		||||
 | 
			
		||||
</div>
 | 
			
		||||
 | 
			
		||||
## 개발 로드맵
 | 
			
		||||
 | 
			
		||||
- [x] 시스템 프롬프트: 사용자가 정의한 프롬프트를 시스템 프롬프트로 고정하기 [#138](https://github.com/Yidadaa/ChatGPT-Next-Web/issues/138)
 | 
			
		||||
- [x] 사용자 프롬프트: 사용자 정의 프롬프트를 편집 및 저장하여 리스트로 관리 가능
 | 
			
		||||
- [x] 프롬프트 템플릿: 사전 정의된 인컨텍스트 프롬프트로 새 채팅 생성 [#993](https://github.com/Yidadaa/ChatGPT-Next-Web/issues/993)
 | 
			
		||||
- [x] 이미지로 공유하거나 ShareGPT로 공유 [#1741](https://github.com/Yidadaa/ChatGPT-Next-Web/pull/1741)
 | 
			
		||||
- [x] Tauri 기반 데스크톱 앱
 | 
			
		||||
- [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 등)
 | 
			
		||||
- [x] 아티팩트: 생성된 콘텐츠 및 웹페이지를 별도 창으로 미리보기, 복사, 공유 가능 [#5092](https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web/pull/5092)
 | 
			
		||||
- [x] 플러그인: 웹 검색, 계산기, 기타 외부 API 기능 지원 [#165](https://github.com/Yidadaa/ChatGPT-Next-Web/issues/165) [#5353](https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web/issues/5353)
 | 
			
		||||
- [x] 실시간 채팅 지원 [#5672](https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web/issues/5672)
 | 
			
		||||
- [ ] 로컬 지식 베이스 지원 예정
 | 
			
		||||
 | 
			
		||||
## 🚀 최근 업데이트
 | 
			
		||||
 | 
			
		||||
- 🚀 v2.15.8 실시간 채팅 지원 [#5672](https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web/issues/5672)
 | 
			
		||||
- 🚀 v2.15.4 Tauri 기반 LLM API 호출 기능 추가 → 보안 강화 [#5379](https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web/issues/5379)
 | 
			
		||||
- 🚀 v2.15.0 플러그인 기능 추가 → [NextChat-Awesome-Plugins](https://github.com/ChatGPTNextWeb/NextChat-Awesome-Plugins)
 | 
			
		||||
- 🚀 v2.14.0 아티팩트 및 Stable Diffusion 기능 추가
 | 
			
		||||
- 🚀 v2.10.1 Google Gemini Pro 모델 지원
 | 
			
		||||
- 🚀 v2.9.11 Azure Endpoint 사용 가능
 | 
			
		||||
- 🚀 v2.8 모든 플랫폼에서 실행 가능한 클라이언트 출시
 | 
			
		||||
- 🚀 v2.7 대화 내용을 이미지로, 또는 ShareGPT로 공유 가능
 | 
			
		||||
- 🚀 v2.0 릴리즈: 프롬프트 템플릿 생성 및 아이디어 구현 가능! → [ChatGPT Prompt Engineering Tips](https://www.allabtai.com/prompt-engineering-tips-zero-one-and-few-shot-prompting/)
 | 
			
		||||
 | 
			
		||||
## 시작하기
 | 
			
		||||
 | 
			
		||||
1. [OpenAI API 키](https://platform.openai.com/account/api-keys)를 발급받습니다.
 | 
			
		||||
2. 
 | 
			
		||||
   [](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) 버튼을 클릭해 Vercel에 배포합니다. `CODE`는 페이지 비밀번호라는 점을 기억하세요.
 | 
			
		||||
 | 
			
		||||
3. Enjoy :)
 | 
			
		||||
 | 
			
		||||
## FAQ
 | 
			
		||||
 | 
			
		||||
[FAQ](./docs/faq-ko.md)
 | 
			
		||||
 | 
			
		||||
## 최신 상태 유지 (Keep Updated)
 | 
			
		||||
 | 
			
		||||
Vercel로 배포한 경우, "Updates Available" 메시지가 계속 나타날 수 있습니다. 이는 프로젝트를 포크하지 않고 새로 생성했기 때문입니다.
 | 
			
		||||
 | 
			
		||||
다음 절차에 따라 다시 배포를 권장합니다:
 | 
			
		||||
 | 
			
		||||
1. 기존 레포 삭제
 | 
			
		||||
2. 우측 상단 "Fork" 버튼 클릭 → 포크 생성
 | 
			
		||||
3. 포크된 프로젝트를 다시 Vercel에 배포  
 | 
			
		||||
   → [자세한 튜토리얼 보기](./docs/vercel-ko.md)
 | 
			
		||||
 | 
			
		||||
### 자동 업데이트 활성화 (Enable Automatic Updates)
 | 
			
		||||
 | 
			
		||||
> Upstream Sync 오류 발생 시, [수동으로 코드 업데이트](./README_KO.md#manually-updating-code)하세요.
 | 
			
		||||
 | 
			
		||||
프로젝트 포크 후에는 GitHub의 제약으로 인해 Actions 페이지에서 아래 항목들을 수동으로 활성화해야 합니다:
 | 
			
		||||
 | 
			
		||||
- `Workflows`
 | 
			
		||||
- `Upstream Sync Action`
 | 
			
		||||
 | 
			
		||||
이후 매 시간 자동으로 업데이트됩니다:
 | 
			
		||||
 | 
			
		||||
  
 | 
			
		||||

 | 
			
		||||
 | 
			
		||||
### 수동 업데이트 방법 (Manually Updating Code)
 | 
			
		||||
 | 
			
		||||
즉시 업데이트가 필요한 경우, [깃헙 문서](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork)를 참고해 포크된 프로젝트를 upstream code와 동기화하세요.
 | 
			
		||||
 | 
			
		||||
릴리스 알림을 원하시면 star 또는 watch를 눌러주세요.
 | 
			
		||||
 | 
			
		||||
## 접근 비밀번호 설정 (Access Password)
 | 
			
		||||
 | 
			
		||||
이 프로젝트는 제한된 접근 제어를 제공합니다.  
 | 
			
		||||
Vercel 환경 변수에 `CODE`를 다음 형식으로 추가하세요. value는 ,를 통해 구분된 비밀번호여야 합니다.:
 | 
			
		||||
 | 
			
		||||
```
 | 
			
		||||
code1,code2,code3
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
수정 후 반드시 다시 배포해야 적용됩니다.
 | 
			
		||||
 | 
			
		||||
## 환경 변수 (Environment Variables)
 | 
			
		||||
 | 
			
		||||
### `CODE` (선택 사항)
 | 
			
		||||
 | 
			
		||||
접속 비밀번호. 쉼표로 구분합니다.
 | 
			
		||||
 | 
			
		||||
### `OPENAI_API_KEY` (필수)
 | 
			
		||||
 | 
			
		||||
당신의 OpenAI API 키, 여러 개를 사용하려면 쉼표로 연결합니다.
 | 
			
		||||
 | 
			
		||||
### `BASE_URL` (선택 사항)
 | 
			
		||||
 | 
			
		||||
> 기본값: `https://api.openai.com`
 | 
			
		||||
 | 
			
		||||
> 예시: `http://your-openai-proxy.com`
 | 
			
		||||
 | 
			
		||||
OpenAI API 요청의 기본 URL을 재정의합니다.
 | 
			
		||||
 | 
			
		||||
### `OPENAI_ORG_ID` (선택 사항)
 | 
			
		||||
 | 
			
		||||
OpenAI organization ID를 지정합니다.
 | 
			
		||||
 | 
			
		||||
### `AZURE_URL` (선택 사항)
 | 
			
		||||
 | 
			
		||||
> 예시: https://{azure-resource-url}/openai
 | 
			
		||||
 | 
			
		||||
Azure 배포 URL입니다.
 | 
			
		||||
 | 
			
		||||
### `AZURE_API_KEY` (선택 사항)
 | 
			
		||||
 | 
			
		||||
Azure API 키입니다.
 | 
			
		||||
 | 
			
		||||
### `AZURE_API_VERSION` (선택 사항)
 | 
			
		||||
 | 
			
		||||
Azure API 버전입니다. [Azure 문서](https://learn.microsoft.com/en-us/azure/ai-services/openai/reference#chat-completions)에서 확인할 수 있습니다.
 | 
			
		||||
 | 
			
		||||
### `GOOGLE_API_KEY` (선택 사항)
 | 
			
		||||
 | 
			
		||||
Google Gemini Pro API 키입니다.
 | 
			
		||||
 | 
			
		||||
### `GOOGLE_URL` (선택 사항)
 | 
			
		||||
 | 
			
		||||
Google Gemini Pro API URL입니다.
 | 
			
		||||
 | 
			
		||||
### `ANTHROPIC_API_KEY` (선택 사항)
 | 
			
		||||
 | 
			
		||||
Anthropic Claude API 키입니다.
 | 
			
		||||
 | 
			
		||||
### `ANTHROPIC_API_VERSION` (선택 사항)
 | 
			
		||||
 | 
			
		||||
Anthropic Claude API 버전입니다.
 | 
			
		||||
 | 
			
		||||
### `ANTHROPIC_URL` (선택 사항)
 | 
			
		||||
 | 
			
		||||
Anthropic Claude API URL입니다.
 | 
			
		||||
 | 
			
		||||
### `BAIDU_API_KEY` (선택 사항)
 | 
			
		||||
 | 
			
		||||
Baidu API 키입니다.
 | 
			
		||||
 | 
			
		||||
### `BAIDU_SECRET_KEY` (선택 사항)
 | 
			
		||||
 | 
			
		||||
Baidu Secret 키입니다.
 | 
			
		||||
 | 
			
		||||
### `BAIDU_URL` (선택 사항)
 | 
			
		||||
 | 
			
		||||
Baidu API URL입니다.
 | 
			
		||||
 | 
			
		||||
### `BYTEDANCE_API_KEY` (선택 사항)
 | 
			
		||||
 | 
			
		||||
ByteDance API 키입니다.
 | 
			
		||||
 | 
			
		||||
### `BYTEDANCE_URL` (선택 사항)
 | 
			
		||||
 | 
			
		||||
ByteDance API URL입니다.
 | 
			
		||||
 | 
			
		||||
### `ALIBABA_API_KEY` (선택 사항)
 | 
			
		||||
 | 
			
		||||
Alibaba Cloud API 키입니다.
 | 
			
		||||
 | 
			
		||||
### `ALIBABA_URL` (선택 사항)
 | 
			
		||||
 | 
			
		||||
Alibaba Cloud API URL입니다.
 | 
			
		||||
 | 
			
		||||
### `IFLYTEK_URL` (선택 사항)
 | 
			
		||||
 | 
			
		||||
iflytek API URL입니다.
 | 
			
		||||
 | 
			
		||||
### `IFLYTEK_API_KEY` (선택 사항)
 | 
			
		||||
 | 
			
		||||
iflytek API 키입니다.
 | 
			
		||||
 | 
			
		||||
### `IFLYTEK_API_SECRET` (선택 사항)
 | 
			
		||||
 | 
			
		||||
iflytek API 시크릿입니다.
 | 
			
		||||
 | 
			
		||||
### `CHATGLM_API_KEY` (선택 사항)
 | 
			
		||||
 | 
			
		||||
ChatGLM API 키입니다.
 | 
			
		||||
 | 
			
		||||
### `CHATGLM_URL` (선택 사항)
 | 
			
		||||
 | 
			
		||||
ChatGLM API URL입니다.
 | 
			
		||||
 | 
			
		||||
### `DEEPSEEK_API_KEY` (선택 사항)
 | 
			
		||||
 | 
			
		||||
DeepSeek API 키입니다.
 | 
			
		||||
 | 
			
		||||
### `DEEPSEEK_URL` (선택 사항)
 | 
			
		||||
 | 
			
		||||
DeepSeek API URL입니다.
 | 
			
		||||
 | 
			
		||||
### `HIDE_USER_API_KEY` (선택 사항)
 | 
			
		||||
 | 
			
		||||
> 기본값: 비어 있음
 | 
			
		||||
 | 
			
		||||
사용자가 자신의 API 키를 입력하지 못하게 하려면 이 값을 1로 설정하세요.
 | 
			
		||||
 | 
			
		||||
### `DISABLE_GPT4` (선택 사항)
 | 
			
		||||
 | 
			
		||||
> 기본값: 비어 있음
 | 
			
		||||
 | 
			
		||||
사용자가 GPT-4를 사용하지 못하게 하려면 이 값을 1로 설정하세요.
 | 
			
		||||
 | 
			
		||||
### `ENABLE_BALANCE_QUERY` (선택 사항)
 | 
			
		||||
 | 
			
		||||
> 기본값: 비어 있음
 | 
			
		||||
 | 
			
		||||
사용자가 쿼리 잔액을 조회할 수 있도록 하려면 이 값을 1로 설정하세요.
 | 
			
		||||
 | 
			
		||||
### `DISABLE_FAST_LINK` (선택 사항)
 | 
			
		||||
 | 
			
		||||
> 기본값: 비어 있음
 | 
			
		||||
 | 
			
		||||
URL에서 설정을 파싱하는 기능을 비활성화하려면 이 값을 1로 설정하세요.
 | 
			
		||||
 | 
			
		||||
### `CUSTOM_MODELS` (선택 사항)
 | 
			
		||||
 | 
			
		||||
> 기본값: 비어 있음  
 | 
			
		||||
> 예시: `+llama,+claude-2,-gpt-3.5-turbo,gpt-4-1106-preview=gpt-4-turbo`  
 | 
			
		||||
이는 `llama`, `claude-2`를 모델 리스트에 추가하고, `gpt-3.5-turbo`를 제거하며, `gpt-4-1106-preview`를 `gpt-4-turbo`로 표시합니다.
 | 
			
		||||
 | 
			
		||||
사용자 지정 모델 제어 시 `+`는 추가, `-`는 제거, `이름=표시이름`은 모델명 커스터마이징을 의미합니다. 쉼표로 구분하세요.
 | 
			
		||||
 | 
			
		||||
- `-all`은 기본 모델을 모두 비활성화  
 | 
			
		||||
- `+all`은 기본 모델을 모두 활성화
 | 
			
		||||
 | 
			
		||||
Azure 용법 예시: `modelName@Azure=deploymentName` → 배포 이름을 커스터마이징 가능  
 | 
			
		||||
> 예시: `+gpt-3.5-turbo@Azure=gpt35` → 리스트에 `gpt35(Azure)` 표시됨  
 | 
			
		||||
> Azure 모델만 사용할 경우: `-all,+gpt-3.5-turbo@Azure=gpt35`
 | 
			
		||||
 | 
			
		||||
ByteDance 용법 예시: `modelName@bytedance=deploymentName`  
 | 
			
		||||
> 예시: `+Doubao-lite-4k@bytedance=ep-xxxxx-xxx` → `Doubao-lite-4k(ByteDance)`로 표시됨
 | 
			
		||||
 | 
			
		||||
### `DEFAULT_MODEL` (선택 사항)
 | 
			
		||||
 | 
			
		||||
기본 모델을 변경합니다.
 | 
			
		||||
 | 
			
		||||
### `VISION_MODELS` (선택 사항)
 | 
			
		||||
 | 
			
		||||
> 기본값: 비어 있음  
 | 
			
		||||
> 예시: `gpt-4-vision,claude-3-opus,my-custom-model`  
 | 
			
		||||
위의 모델들에 시각 기능을 부여합니다 (기본적으로 `"vision"`, `"claude-3"`, `"gemini-1.5"` 키워드를 포함한 모델은 자동 인식됨). 기본 모델 외에도 모델을 추가할 수 있습니다. 쉼표로 구분하세요.
 | 
			
		||||
 | 
			
		||||
### `WHITE_WEBDAV_ENDPOINTS` (선택 사항)
 | 
			
		||||
 | 
			
		||||
접속 허용할 WebDAV 서비스 주소를 늘리고자 할 때 사용합니다.
 | 
			
		||||
 | 
			
		||||
- 각 주소는 완전한 endpoint 여야 함: `https://xxxx/yyy`  
 | 
			
		||||
- 여러 주소는 `,`로 구분
 | 
			
		||||
 | 
			
		||||
### `DEFAULT_INPUT_TEMPLATE` (선택 사항)
 | 
			
		||||
 | 
			
		||||
설정 메뉴의 사용자 입력 전처리 구성 항목 초기화 시 사용할 기본 템플릿을 설정합니다.
 | 
			
		||||
 | 
			
		||||
### `STABILITY_API_KEY` (선택 사항)
 | 
			
		||||
 | 
			
		||||
Stability API 키입니다.
 | 
			
		||||
 | 
			
		||||
### `STABILITY_URL` (선택 사항)
 | 
			
		||||
 | 
			
		||||
Stability API URL을 커스터마이징합니다.
 | 
			
		||||
 | 
			
		||||
### `ENABLE_MCP` (선택 사항)
 | 
			
		||||
 | 
			
		||||
MCP (Model Context Protocol) 기능을 활성화합니다.
 | 
			
		||||
 | 
			
		||||
### `SILICONFLOW_API_KEY` (선택 사항)
 | 
			
		||||
 | 
			
		||||
SiliconFlow API 키입니다.
 | 
			
		||||
 | 
			
		||||
### `SILICONFLOW_URL` (선택 사항)
 | 
			
		||||
 | 
			
		||||
SiliconFlow API URL입니다.
 | 
			
		||||
 | 
			
		||||
### `AI302_API_KEY` (선택 사항)
 | 
			
		||||
 | 
			
		||||
302.AI API 키입니다.
 | 
			
		||||
 | 
			
		||||
### `AI302_URL` (선택 사항)
 | 
			
		||||
 | 
			
		||||
302.AI API URL입니다.
 | 
			
		||||
 | 
			
		||||
## 요구 사항 (Requirements)
 | 
			
		||||
 | 
			
		||||
NodeJS >= 18, Docker >= 20
 | 
			
		||||
 | 
			
		||||
## 개발 (Development)
 | 
			
		||||
 | 
			
		||||
[](https://gitpod.io/#https://github.com/Yidadaa/ChatGPT-Next-Web)
 | 
			
		||||
 | 
			
		||||
개발을 시작하기 전에 프로젝트 루트에 `.env.local` 파일을 만들고, 아래와 같이 API 키를 입력하세요:
 | 
			
		||||
 | 
			
		||||
```
 | 
			
		||||
OPENAI_API_KEY=<여기에 API 키 입력>
 | 
			
		||||
 | 
			
		||||
# OpenAI 서비스를 사용할 수 없는 경우 아래 BASE_URL 사용
 | 
			
		||||
BASE_URL=https://chatgpt1.nextweb.fun/api/proxy
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
### 로컬 개발 실행
 | 
			
		||||
 | 
			
		||||
```shell
 | 
			
		||||
# 1. Node.js와 Yarn을 먼저 설치
 | 
			
		||||
# 2. `.env.local` 파일에 환경 변수 설정
 | 
			
		||||
# 3. 실행
 | 
			
		||||
yarn install
 | 
			
		||||
yarn dev
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
## 배포 (Deployment)
 | 
			
		||||
 | 
			
		||||
### Docker (권장)
 | 
			
		||||
 | 
			
		||||
```shell
 | 
			
		||||
docker pull yidadaa/chatgpt-next-web
 | 
			
		||||
 | 
			
		||||
docker run -d -p 3000:3000 \
 | 
			
		||||
   -e OPENAI_API_KEY=sk-xxxx \
 | 
			
		||||
   -e CODE=your-password \
 | 
			
		||||
   yidadaa/chatgpt-next-web
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
서비스에 프록시를 사용하려면:
 | 
			
		||||
 | 
			
		||||
```shell
 | 
			
		||||
docker run -d -p 3000:3000 \
 | 
			
		||||
   -e OPENAI_API_KEY=sk-xxxx \
 | 
			
		||||
   -e CODE=your-password \
 | 
			
		||||
   -e PROXY_URL=http://localhost:7890 \
 | 
			
		||||
   yidadaa/chatgpt-next-web
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
프록시에 인증이 필요한 경우:
 | 
			
		||||
 | 
			
		||||
```shell
 | 
			
		||||
-e PROXY_URL="http://127.0.0.1:7890 user pass"
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
MCP를 활성화하려면:
 | 
			
		||||
 | 
			
		||||
```
 | 
			
		||||
docker run -d -p 3000:3000 \
 | 
			
		||||
   -e OPENAI_API_KEY=sk-xxxx \
 | 
			
		||||
   -e CODE=your-password \
 | 
			
		||||
   -e ENABLE_MCP=true \
 | 
			
		||||
   yidadaa/chatgpt-next-web
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
### 로컬 배포
 | 
			
		||||
 | 
			
		||||
콘솔에서 다음 명령을 실행하세요.
 | 
			
		||||
 | 
			
		||||
```shell
 | 
			
		||||
bash <(curl -s https://raw.githubusercontent.com/Yidadaa/ChatGPT-Next-Web/main/scripts/setup.sh)
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
⚠️ 참고: 설치 중에 문제가 발생하면 Docker 배포를 사용하세요.
 | 
			
		||||
 | 
			
		||||
## 채팅 기록 동기화 (UpStash)
 | 
			
		||||
 | 
			
		||||
| [简体中文](./docs/synchronise-chat-logs-cn.md) | [English](./docs/synchronise-chat-logs-en.md) | [Italiano](./docs/synchronise-chat-logs-es.md) | [日本語](./docs/synchronise-chat-logs-ja.md) | [한국어](./docs/synchronise-chat-logs-ko.md)
 | 
			
		||||
 | 
			
		||||
## 문서 (Documentation)
 | 
			
		||||
 | 
			
		||||
> 더 많은 문서는 [docs](./docs) 디렉토리를 참고하세요.
 | 
			
		||||
 | 
			
		||||
- [Cloudflare 배포 가이드 (폐기됨)](./docs/cloudflare-pages-ko.md)
 | 
			
		||||
- [자주 묻는 질문](./docs/faq-ko.md)
 | 
			
		||||
- [새 번역 추가 방법](./docs/translation.md)
 | 
			
		||||
- [Vercel 사용법 (중문)](./docs/vercel-cn.md)
 | 
			
		||||
- [사용자 매뉴얼 (중문, 작성 중)](./docs/user-manual-cn.md)
 | 
			
		||||
 | 
			
		||||
## 번역 (Translation)
 | 
			
		||||
 | 
			
		||||
새로운 번역을 추가하고 싶다면, [이 문서](./docs/translation.md)를 읽어보세요.
 | 
			
		||||
 | 
			
		||||
## 후원 (Donation)
 | 
			
		||||
 | 
			
		||||
[Buy Me a Coffee](https://www.buymeacoffee.com/yidadaa)
 | 
			
		||||
 | 
			
		||||
## 특별 감사 (Special Thanks)
 | 
			
		||||
 | 
			
		||||
### 기여자 (Contributors)
 | 
			
		||||
 | 
			
		||||
<a href="https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web/graphs/contributors">
 | 
			
		||||
  <img src="https://contrib.rocks/image?repo=ChatGPTNextWeb/ChatGPT-Next-Web" />
 | 
			
		||||
</a>
 | 
			
		||||
 | 
			
		||||
## 라이선스 (LICENSE)
 | 
			
		||||
 | 
			
		||||
[MIT](https://opensource.org/license/mit/)
 | 
			
		||||
							
								
								
									
										128
									
								
								app/api/302ai.ts
									
									
									
									
									
								
							
							
						
						
									
										128
									
								
								app/api/302ai.ts
									
									
									
									
									
								
							@@ -1,128 +0,0 @@
 | 
			
		||||
import { getServerSideConfig } from "@/app/config/server";
 | 
			
		||||
import {
 | 
			
		||||
  AI302_BASE_URL,
 | 
			
		||||
  ApiPath,
 | 
			
		||||
  ModelProvider,
 | 
			
		||||
  ServiceProvider,
 | 
			
		||||
} from "@/app/constant";
 | 
			
		||||
import { prettyObject } from "@/app/utils/format";
 | 
			
		||||
import { NextRequest, NextResponse } from "next/server";
 | 
			
		||||
import { auth } from "@/app/api/auth";
 | 
			
		||||
import { isModelNotavailableInServer } from "@/app/utils/model";
 | 
			
		||||
 | 
			
		||||
const serverConfig = getServerSideConfig();
 | 
			
		||||
 | 
			
		||||
export async function handle(
 | 
			
		||||
  req: NextRequest,
 | 
			
		||||
  { params }: { params: { path: string[] } },
 | 
			
		||||
) {
 | 
			
		||||
  console.log("[302.AI Route] params ", params);
 | 
			
		||||
 | 
			
		||||
  if (req.method === "OPTIONS") {
 | 
			
		||||
    return NextResponse.json({ body: "OK" }, { status: 200 });
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  const authResult = auth(req, ModelProvider["302.AI"]);
 | 
			
		||||
  if (authResult.error) {
 | 
			
		||||
    return NextResponse.json(authResult, {
 | 
			
		||||
      status: 401,
 | 
			
		||||
    });
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  try {
 | 
			
		||||
    const response = await request(req);
 | 
			
		||||
    return response;
 | 
			
		||||
  } catch (e) {
 | 
			
		||||
    console.error("[302.AI] ", e);
 | 
			
		||||
    return NextResponse.json(prettyObject(e));
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
async function request(req: NextRequest) {
 | 
			
		||||
  const controller = new AbortController();
 | 
			
		||||
 | 
			
		||||
  // alibaba use base url or just remove the path
 | 
			
		||||
  let path = `${req.nextUrl.pathname}`.replaceAll(ApiPath["302.AI"], "");
 | 
			
		||||
 | 
			
		||||
  let baseUrl = serverConfig.ai302Url || AI302_BASE_URL;
 | 
			
		||||
 | 
			
		||||
  if (!baseUrl.startsWith("http")) {
 | 
			
		||||
    baseUrl = `https://${baseUrl}`;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  if (baseUrl.endsWith("/")) {
 | 
			
		||||
    baseUrl = baseUrl.slice(0, -1);
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  console.log("[Proxy] ", path);
 | 
			
		||||
  console.log("[Base Url]", baseUrl);
 | 
			
		||||
 | 
			
		||||
  const timeoutId = setTimeout(
 | 
			
		||||
    () => {
 | 
			
		||||
      controller.abort();
 | 
			
		||||
    },
 | 
			
		||||
    10 * 60 * 1000,
 | 
			
		||||
  );
 | 
			
		||||
 | 
			
		||||
  const fetchUrl = `${baseUrl}${path}`;
 | 
			
		||||
  const fetchOptions: RequestInit = {
 | 
			
		||||
    headers: {
 | 
			
		||||
      "Content-Type": "application/json",
 | 
			
		||||
      Authorization: req.headers.get("Authorization") ?? "",
 | 
			
		||||
    },
 | 
			
		||||
    method: req.method,
 | 
			
		||||
    body: req.body,
 | 
			
		||||
    redirect: "manual",
 | 
			
		||||
    // @ts-ignore
 | 
			
		||||
    duplex: "half",
 | 
			
		||||
    signal: controller.signal,
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
  // #1815 try to refuse some request to some models
 | 
			
		||||
  if (serverConfig.customModels && req.body) {
 | 
			
		||||
    try {
 | 
			
		||||
      const clonedBody = await req.text();
 | 
			
		||||
      fetchOptions.body = clonedBody;
 | 
			
		||||
 | 
			
		||||
      const jsonBody = JSON.parse(clonedBody) as { model?: string };
 | 
			
		||||
 | 
			
		||||
      // not undefined and is false
 | 
			
		||||
      if (
 | 
			
		||||
        isModelNotavailableInServer(
 | 
			
		||||
          serverConfig.customModels,
 | 
			
		||||
          jsonBody?.model as string,
 | 
			
		||||
          ServiceProvider["302.AI"] as string,
 | 
			
		||||
        )
 | 
			
		||||
      ) {
 | 
			
		||||
        return NextResponse.json(
 | 
			
		||||
          {
 | 
			
		||||
            error: true,
 | 
			
		||||
            message: `you are not allowed to use ${jsonBody?.model} model`,
 | 
			
		||||
          },
 | 
			
		||||
          {
 | 
			
		||||
            status: 403,
 | 
			
		||||
          },
 | 
			
		||||
        );
 | 
			
		||||
      }
 | 
			
		||||
    } catch (e) {
 | 
			
		||||
      console.error(`[302.AI] filter`, e);
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
  try {
 | 
			
		||||
    const res = await fetch(fetchUrl, fetchOptions);
 | 
			
		||||
 | 
			
		||||
    // to prevent browser prompt for credentials
 | 
			
		||||
    const newHeaders = new Headers(res.headers);
 | 
			
		||||
    newHeaders.delete("www-authenticate");
 | 
			
		||||
    // to disable nginx buffering
 | 
			
		||||
    newHeaders.set("X-Accel-Buffering", "no");
 | 
			
		||||
 | 
			
		||||
    return new Response(res.body, {
 | 
			
		||||
      status: res.status,
 | 
			
		||||
      statusText: res.statusText,
 | 
			
		||||
      headers: newHeaders,
 | 
			
		||||
    });
 | 
			
		||||
  } finally {
 | 
			
		||||
    clearTimeout(timeoutId);
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
@@ -15,7 +15,6 @@ import { handle as siliconflowHandler } from "../../siliconflow";
 | 
			
		||||
import { handle as xaiHandler } from "../../xai";
 | 
			
		||||
import { handle as chatglmHandler } from "../../glm";
 | 
			
		||||
import { handle as proxyHandler } from "../../proxy";
 | 
			
		||||
import { handle as ai302Handler } from "../../302ai";
 | 
			
		||||
 | 
			
		||||
async function handle(
 | 
			
		||||
  req: NextRequest,
 | 
			
		||||
@@ -53,8 +52,6 @@ async function handle(
 | 
			
		||||
      return siliconflowHandler(req, { params });
 | 
			
		||||
    case ApiPath.OpenAI:
 | 
			
		||||
      return openaiHandler(req, { params });
 | 
			
		||||
    case ApiPath["302.AI"]:
 | 
			
		||||
      return ai302Handler(req, { params });
 | 
			
		||||
    default:
 | 
			
		||||
      return proxyHandler(req, { params });
 | 
			
		||||
  }
 | 
			
		||||
 
 | 
			
		||||
@@ -24,7 +24,6 @@ import { DeepSeekApi } from "./platforms/deepseek";
 | 
			
		||||
import { XAIApi } from "./platforms/xai";
 | 
			
		||||
import { ChatGLMApi } from "./platforms/glm";
 | 
			
		||||
import { SiliconflowApi } from "./platforms/siliconflow";
 | 
			
		||||
import { Ai302Api } from "./platforms/ai302";
 | 
			
		||||
 | 
			
		||||
export const ROLES = ["system", "user", "assistant"] as const;
 | 
			
		||||
export type MessageRole = (typeof ROLES)[number];
 | 
			
		||||
@@ -174,9 +173,6 @@ export class ClientApi {
 | 
			
		||||
      case ModelProvider.SiliconFlow:
 | 
			
		||||
        this.llm = new SiliconflowApi();
 | 
			
		||||
        break;
 | 
			
		||||
      case ModelProvider["302.AI"]:
 | 
			
		||||
        this.llm = new Ai302Api();
 | 
			
		||||
        break;
 | 
			
		||||
      default:
 | 
			
		||||
        this.llm = new ChatGPTApi();
 | 
			
		||||
    }
 | 
			
		||||
@@ -269,7 +265,6 @@ export function getHeaders(ignoreHeaders: boolean = false) {
 | 
			
		||||
    const isChatGLM = modelConfig.providerName === ServiceProvider.ChatGLM;
 | 
			
		||||
    const isSiliconFlow =
 | 
			
		||||
      modelConfig.providerName === ServiceProvider.SiliconFlow;
 | 
			
		||||
    const isAI302 = modelConfig.providerName === ServiceProvider["302.AI"];
 | 
			
		||||
    const isEnabledAccessControl = accessStore.enabledAccessControl();
 | 
			
		||||
    const apiKey = isGoogle
 | 
			
		||||
      ? accessStore.googleApiKey
 | 
			
		||||
@@ -295,8 +290,6 @@ export function getHeaders(ignoreHeaders: boolean = false) {
 | 
			
		||||
      ? accessStore.iflytekApiKey && accessStore.iflytekApiSecret
 | 
			
		||||
        ? accessStore.iflytekApiKey + ":" + accessStore.iflytekApiSecret
 | 
			
		||||
        : ""
 | 
			
		||||
      : isAI302
 | 
			
		||||
      ? accessStore.ai302ApiKey
 | 
			
		||||
      : accessStore.openaiApiKey;
 | 
			
		||||
    return {
 | 
			
		||||
      isGoogle,
 | 
			
		||||
@@ -311,7 +304,6 @@ export function getHeaders(ignoreHeaders: boolean = false) {
 | 
			
		||||
      isXAI,
 | 
			
		||||
      isChatGLM,
 | 
			
		||||
      isSiliconFlow,
 | 
			
		||||
      isAI302,
 | 
			
		||||
      apiKey,
 | 
			
		||||
      isEnabledAccessControl,
 | 
			
		||||
    };
 | 
			
		||||
@@ -340,7 +332,6 @@ export function getHeaders(ignoreHeaders: boolean = false) {
 | 
			
		||||
    isXAI,
 | 
			
		||||
    isChatGLM,
 | 
			
		||||
    isSiliconFlow,
 | 
			
		||||
    isAI302,
 | 
			
		||||
    apiKey,
 | 
			
		||||
    isEnabledAccessControl,
 | 
			
		||||
  } = getConfig();
 | 
			
		||||
@@ -391,8 +382,6 @@ export function getClientApi(provider: ServiceProvider): ClientApi {
 | 
			
		||||
      return new ClientApi(ModelProvider.ChatGLM);
 | 
			
		||||
    case ServiceProvider.SiliconFlow:
 | 
			
		||||
      return new ClientApi(ModelProvider.SiliconFlow);
 | 
			
		||||
    case ServiceProvider["302.AI"]:
 | 
			
		||||
      return new ClientApi(ModelProvider["302.AI"]);
 | 
			
		||||
    default:
 | 
			
		||||
      return new ClientApi(ModelProvider.GPT);
 | 
			
		||||
  }
 | 
			
		||||
 
 | 
			
		||||
@@ -1,287 +0,0 @@
 | 
			
		||||
"use client";
 | 
			
		||||
 | 
			
		||||
import {
 | 
			
		||||
  ApiPath,
 | 
			
		||||
  AI302_BASE_URL,
 | 
			
		||||
  DEFAULT_MODELS,
 | 
			
		||||
  AI302,
 | 
			
		||||
} from "@/app/constant";
 | 
			
		||||
import {
 | 
			
		||||
  useAccessStore,
 | 
			
		||||
  useAppConfig,
 | 
			
		||||
  useChatStore,
 | 
			
		||||
  ChatMessageTool,
 | 
			
		||||
  usePluginStore,
 | 
			
		||||
} from "@/app/store";
 | 
			
		||||
import { preProcessImageContent, streamWithThink } from "@/app/utils/chat";
 | 
			
		||||
import {
 | 
			
		||||
  ChatOptions,
 | 
			
		||||
  getHeaders,
 | 
			
		||||
  LLMApi,
 | 
			
		||||
  LLMModel,
 | 
			
		||||
  SpeechOptions,
 | 
			
		||||
} from "../api";
 | 
			
		||||
import { getClientConfig } from "@/app/config/client";
 | 
			
		||||
import {
 | 
			
		||||
  getMessageTextContent,
 | 
			
		||||
  getMessageTextContentWithoutThinking,
 | 
			
		||||
  isVisionModel,
 | 
			
		||||
  getTimeoutMSByModel,
 | 
			
		||||
} from "@/app/utils";
 | 
			
		||||
import { RequestPayload } from "./openai";
 | 
			
		||||
 | 
			
		||||
import { fetch } from "@/app/utils/stream";
 | 
			
		||||
export interface Ai302ListModelResponse {
 | 
			
		||||
  object: string;
 | 
			
		||||
  data: Array<{
 | 
			
		||||
    id: string;
 | 
			
		||||
    object: string;
 | 
			
		||||
    root: string;
 | 
			
		||||
  }>;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export class Ai302Api implements LLMApi {
 | 
			
		||||
  private disableListModels = false;
 | 
			
		||||
 | 
			
		||||
  path(path: string): string {
 | 
			
		||||
    const accessStore = useAccessStore.getState();
 | 
			
		||||
 | 
			
		||||
    let baseUrl = "";
 | 
			
		||||
 | 
			
		||||
    if (accessStore.useCustomConfig) {
 | 
			
		||||
      baseUrl = accessStore.ai302Url;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    if (baseUrl.length === 0) {
 | 
			
		||||
      const isApp = !!getClientConfig()?.isApp;
 | 
			
		||||
      const apiPath = ApiPath["302.AI"];
 | 
			
		||||
      baseUrl = isApp ? AI302_BASE_URL : apiPath;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    if (baseUrl.endsWith("/")) {
 | 
			
		||||
      baseUrl = baseUrl.slice(0, baseUrl.length - 1);
 | 
			
		||||
    }
 | 
			
		||||
    if (
 | 
			
		||||
      !baseUrl.startsWith("http") &&
 | 
			
		||||
      !baseUrl.startsWith(ApiPath["302.AI"])
 | 
			
		||||
    ) {
 | 
			
		||||
      baseUrl = "https://" + baseUrl;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    console.log("[Proxy Endpoint] ", baseUrl, path);
 | 
			
		||||
 | 
			
		||||
    return [baseUrl, path].join("/");
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  extractMessage(res: any) {
 | 
			
		||||
    return res.choices?.at(0)?.message?.content ?? "";
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  speech(options: SpeechOptions): Promise<ArrayBuffer> {
 | 
			
		||||
    throw new Error("Method not implemented.");
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  async chat(options: ChatOptions) {
 | 
			
		||||
    const visionModel = isVisionModel(options.config.model);
 | 
			
		||||
    const messages: ChatOptions["messages"] = [];
 | 
			
		||||
    for (const v of options.messages) {
 | 
			
		||||
      if (v.role === "assistant") {
 | 
			
		||||
        const content = getMessageTextContentWithoutThinking(v);
 | 
			
		||||
        messages.push({ role: v.role, content });
 | 
			
		||||
      } else {
 | 
			
		||||
        const content = visionModel
 | 
			
		||||
          ? await preProcessImageContent(v.content)
 | 
			
		||||
          : getMessageTextContent(v);
 | 
			
		||||
        messages.push({ role: v.role, content });
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    const modelConfig = {
 | 
			
		||||
      ...useAppConfig.getState().modelConfig,
 | 
			
		||||
      ...useChatStore.getState().currentSession().mask.modelConfig,
 | 
			
		||||
      ...{
 | 
			
		||||
        model: options.config.model,
 | 
			
		||||
        providerName: options.config.providerName,
 | 
			
		||||
      },
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
    const requestPayload: RequestPayload = {
 | 
			
		||||
      messages,
 | 
			
		||||
      stream: options.config.stream,
 | 
			
		||||
      model: modelConfig.model,
 | 
			
		||||
      temperature: modelConfig.temperature,
 | 
			
		||||
      presence_penalty: modelConfig.presence_penalty,
 | 
			
		||||
      frequency_penalty: modelConfig.frequency_penalty,
 | 
			
		||||
      top_p: modelConfig.top_p,
 | 
			
		||||
      // max_tokens: Math.max(modelConfig.max_tokens, 1024),
 | 
			
		||||
      // Please do not ask me why not send max_tokens, no reason, this param is just shit, I dont want to explain anymore.
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
    console.log("[Request] openai payload: ", requestPayload);
 | 
			
		||||
 | 
			
		||||
    const shouldStream = !!options.config.stream;
 | 
			
		||||
    const controller = new AbortController();
 | 
			
		||||
    options.onController?.(controller);
 | 
			
		||||
 | 
			
		||||
    try {
 | 
			
		||||
      const chatPath = this.path(AI302.ChatPath);
 | 
			
		||||
      const chatPayload = {
 | 
			
		||||
        method: "POST",
 | 
			
		||||
        body: JSON.stringify(requestPayload),
 | 
			
		||||
        signal: controller.signal,
 | 
			
		||||
        headers: getHeaders(),
 | 
			
		||||
      };
 | 
			
		||||
 | 
			
		||||
      // console.log(chatPayload);
 | 
			
		||||
 | 
			
		||||
      // Use extended timeout for thinking models as they typically require more processing time
 | 
			
		||||
      const requestTimeoutId = setTimeout(
 | 
			
		||||
        () => controller.abort(),
 | 
			
		||||
        getTimeoutMSByModel(options.config.model),
 | 
			
		||||
      );
 | 
			
		||||
 | 
			
		||||
      if (shouldStream) {
 | 
			
		||||
        const [tools, funcs] = usePluginStore
 | 
			
		||||
          .getState()
 | 
			
		||||
          .getAsTools(
 | 
			
		||||
            useChatStore.getState().currentSession().mask?.plugin || [],
 | 
			
		||||
          );
 | 
			
		||||
        return streamWithThink(
 | 
			
		||||
          chatPath,
 | 
			
		||||
          requestPayload,
 | 
			
		||||
          getHeaders(),
 | 
			
		||||
          tools as any,
 | 
			
		||||
          funcs,
 | 
			
		||||
          controller,
 | 
			
		||||
          // parseSSE
 | 
			
		||||
          (text: string, runTools: ChatMessageTool[]) => {
 | 
			
		||||
            // console.log("parseSSE", text, runTools);
 | 
			
		||||
            const json = JSON.parse(text);
 | 
			
		||||
            const choices = json.choices as Array<{
 | 
			
		||||
              delta: {
 | 
			
		||||
                content: string | null;
 | 
			
		||||
                tool_calls: ChatMessageTool[];
 | 
			
		||||
                reasoning_content: string | null;
 | 
			
		||||
              };
 | 
			
		||||
            }>;
 | 
			
		||||
            const tool_calls = choices[0]?.delta?.tool_calls;
 | 
			
		||||
            if (tool_calls?.length > 0) {
 | 
			
		||||
              const index = tool_calls[0]?.index;
 | 
			
		||||
              const id = tool_calls[0]?.id;
 | 
			
		||||
              const args = tool_calls[0]?.function?.arguments;
 | 
			
		||||
              if (id) {
 | 
			
		||||
                runTools.push({
 | 
			
		||||
                  id,
 | 
			
		||||
                  type: tool_calls[0]?.type,
 | 
			
		||||
                  function: {
 | 
			
		||||
                    name: tool_calls[0]?.function?.name as string,
 | 
			
		||||
                    arguments: args,
 | 
			
		||||
                  },
 | 
			
		||||
                });
 | 
			
		||||
              } else {
 | 
			
		||||
                // @ts-ignore
 | 
			
		||||
                runTools[index]["function"]["arguments"] += args;
 | 
			
		||||
              }
 | 
			
		||||
            }
 | 
			
		||||
            const reasoning = choices[0]?.delta?.reasoning_content;
 | 
			
		||||
            const content = choices[0]?.delta?.content;
 | 
			
		||||
 | 
			
		||||
            // Skip if both content and reasoning_content are empty or null
 | 
			
		||||
            if (
 | 
			
		||||
              (!reasoning || reasoning.length === 0) &&
 | 
			
		||||
              (!content || content.length === 0)
 | 
			
		||||
            ) {
 | 
			
		||||
              return {
 | 
			
		||||
                isThinking: false,
 | 
			
		||||
                content: "",
 | 
			
		||||
              };
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            if (reasoning && reasoning.length > 0) {
 | 
			
		||||
              return {
 | 
			
		||||
                isThinking: true,
 | 
			
		||||
                content: reasoning,
 | 
			
		||||
              };
 | 
			
		||||
            } else if (content && content.length > 0) {
 | 
			
		||||
              return {
 | 
			
		||||
                isThinking: false,
 | 
			
		||||
                content: content,
 | 
			
		||||
              };
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            return {
 | 
			
		||||
              isThinking: false,
 | 
			
		||||
              content: "",
 | 
			
		||||
            };
 | 
			
		||||
          },
 | 
			
		||||
          // processToolMessage, include tool_calls message and tool call results
 | 
			
		||||
          (
 | 
			
		||||
            requestPayload: RequestPayload,
 | 
			
		||||
            toolCallMessage: any,
 | 
			
		||||
            toolCallResult: any[],
 | 
			
		||||
          ) => {
 | 
			
		||||
            // @ts-ignore
 | 
			
		||||
            requestPayload?.messages?.splice(
 | 
			
		||||
              // @ts-ignore
 | 
			
		||||
              requestPayload?.messages?.length,
 | 
			
		||||
              0,
 | 
			
		||||
              toolCallMessage,
 | 
			
		||||
              ...toolCallResult,
 | 
			
		||||
            );
 | 
			
		||||
          },
 | 
			
		||||
          options,
 | 
			
		||||
        );
 | 
			
		||||
      } else {
 | 
			
		||||
        const res = await fetch(chatPath, chatPayload);
 | 
			
		||||
        clearTimeout(requestTimeoutId);
 | 
			
		||||
 | 
			
		||||
        const resJson = await res.json();
 | 
			
		||||
        const message = this.extractMessage(resJson);
 | 
			
		||||
        options.onFinish(message, res);
 | 
			
		||||
      }
 | 
			
		||||
    } catch (e) {
 | 
			
		||||
      console.log("[Request] failed to make a chat request", e);
 | 
			
		||||
      options.onError?.(e as Error);
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
  async usage() {
 | 
			
		||||
    return {
 | 
			
		||||
      used: 0,
 | 
			
		||||
      total: 0,
 | 
			
		||||
    };
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  async models(): Promise<LLMModel[]> {
 | 
			
		||||
    if (this.disableListModels) {
 | 
			
		||||
      return DEFAULT_MODELS.slice();
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    const res = await fetch(this.path(AI302.ListModelPath), {
 | 
			
		||||
      method: "GET",
 | 
			
		||||
      headers: {
 | 
			
		||||
        ...getHeaders(),
 | 
			
		||||
      },
 | 
			
		||||
    });
 | 
			
		||||
 | 
			
		||||
    const resJson = (await res.json()) as Ai302ListModelResponse;
 | 
			
		||||
    const chatModels = resJson.data;
 | 
			
		||||
    console.log("[Models]", chatModels);
 | 
			
		||||
 | 
			
		||||
    if (!chatModels) {
 | 
			
		||||
      return [];
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    let seq = 1000; //同 Constant.ts 中的排序保持一致
 | 
			
		||||
    return chatModels.map((m) => ({
 | 
			
		||||
      name: m.id,
 | 
			
		||||
      available: true,
 | 
			
		||||
      sorted: seq++,
 | 
			
		||||
      provider: {
 | 
			
		||||
        id: "ai302",
 | 
			
		||||
        providerName: "302.AI",
 | 
			
		||||
        providerType: "ai302",
 | 
			
		||||
        sorted: 15,
 | 
			
		||||
      },
 | 
			
		||||
    }));
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
@@ -224,7 +224,7 @@ export class ClaudeApi implements LLMApi {
 | 
			
		||||
          let chunkJson:
 | 
			
		||||
            | undefined
 | 
			
		||||
            | {
 | 
			
		||||
                type: "content_block_delta" | "content_block_stop" | "message_delta" | "message_stop";
 | 
			
		||||
                type: "content_block_delta" | "content_block_stop";
 | 
			
		||||
                content_block?: {
 | 
			
		||||
                  type: "tool_use";
 | 
			
		||||
                  id: string;
 | 
			
		||||
@@ -234,20 +234,11 @@ export class ClaudeApi implements LLMApi {
 | 
			
		||||
                  type: "text_delta" | "input_json_delta";
 | 
			
		||||
                  text?: string;
 | 
			
		||||
                  partial_json?: string;
 | 
			
		||||
                  stop_reason?: string;
 | 
			
		||||
                };
 | 
			
		||||
                index: number;
 | 
			
		||||
              };
 | 
			
		||||
          chunkJson = JSON.parse(text);
 | 
			
		||||
 | 
			
		||||
          // Handle refusal stop reason in message_delta
 | 
			
		||||
          if (chunkJson?.delta?.stop_reason === "refusal") {
 | 
			
		||||
            // Return a message to display to the user
 | 
			
		||||
            const refusalMessage = "\n\n[Assistant refused to respond. Please modify your request and try again.]";
 | 
			
		||||
            options.onError?.(new Error("Content policy violation: " + refusalMessage));
 | 
			
		||||
            return refusalMessage;
 | 
			
		||||
          }
 | 
			
		||||
 | 
			
		||||
          if (chunkJson?.content_block?.type == "tool_use") {
 | 
			
		||||
            index += 1;
 | 
			
		||||
            const id = chunkJson?.content_block.id;
 | 
			
		||||
 
 | 
			
		||||
@@ -56,7 +56,7 @@ export interface OpenAIListModelResponse {
 | 
			
		||||
 | 
			
		||||
export interface RequestPayload {
 | 
			
		||||
  messages: {
 | 
			
		||||
    role: "developer" | "system" | "user" | "assistant";
 | 
			
		||||
    role: "system" | "user" | "assistant";
 | 
			
		||||
    content: string | MultimodalContent[];
 | 
			
		||||
  }[];
 | 
			
		||||
  stream?: boolean;
 | 
			
		||||
@@ -200,7 +200,6 @@ export class ChatGPTApi implements LLMApi {
 | 
			
		||||
      options.config.model.startsWith("o1") ||
 | 
			
		||||
      options.config.model.startsWith("o3") ||
 | 
			
		||||
      options.config.model.startsWith("o4-mini");
 | 
			
		||||
    const isGpt5 =  options.config.model.startsWith("gpt-5");
 | 
			
		||||
    if (isDalle3) {
 | 
			
		||||
      const prompt = getMessageTextContent(
 | 
			
		||||
        options.messages.slice(-1)?.pop() as any,
 | 
			
		||||
@@ -231,7 +230,7 @@ export class ChatGPTApi implements LLMApi {
 | 
			
		||||
        messages,
 | 
			
		||||
        stream: options.config.stream,
 | 
			
		||||
        model: modelConfig.model,
 | 
			
		||||
        temperature: (!isO1OrO3 && !isGpt5) ? modelConfig.temperature : 1,
 | 
			
		||||
        temperature: !isO1OrO3 ? modelConfig.temperature : 1,
 | 
			
		||||
        presence_penalty: !isO1OrO3 ? modelConfig.presence_penalty : 0,
 | 
			
		||||
        frequency_penalty: !isO1OrO3 ? modelConfig.frequency_penalty : 0,
 | 
			
		||||
        top_p: !isO1OrO3 ? modelConfig.top_p : 1,
 | 
			
		||||
@@ -239,28 +238,13 @@ export class ChatGPTApi implements LLMApi {
 | 
			
		||||
        // Please do not ask me why not send max_tokens, no reason, this param is just shit, I dont want to explain anymore.
 | 
			
		||||
      };
 | 
			
		||||
 | 
			
		||||
      if (isGpt5) {
 | 
			
		||||
  	// Remove max_tokens if present
 | 
			
		||||
  	delete requestPayload.max_tokens;
 | 
			
		||||
  	// Add max_completion_tokens (or max_completion_tokens if that's what you meant)
 | 
			
		||||
  	requestPayload["max_completion_tokens"] = modelConfig.max_tokens;
 | 
			
		||||
 | 
			
		||||
      } else if (isO1OrO3) {
 | 
			
		||||
        // by default the o1/o3 models will not attempt to produce output that includes markdown formatting
 | 
			
		||||
        // manually add "Formatting re-enabled" developer message to encourage markdown inclusion in model responses
 | 
			
		||||
        // (https://learn.microsoft.com/en-us/azure/ai-services/openai/how-to/reasoning?tabs=python-secure#markdown-output)
 | 
			
		||||
        requestPayload["messages"].unshift({
 | 
			
		||||
          role: "developer",
 | 
			
		||||
          content: "Formatting re-enabled",
 | 
			
		||||
        });
 | 
			
		||||
 | 
			
		||||
        // o1/o3 uses max_completion_tokens to control the number of tokens (https://platform.openai.com/docs/guides/reasoning#controlling-costs)
 | 
			
		||||
      // O1 使用 max_completion_tokens 控制token数 (https://platform.openai.com/docs/guides/reasoning#controlling-costs)
 | 
			
		||||
      if (isO1OrO3) {
 | 
			
		||||
        requestPayload["max_completion_tokens"] = modelConfig.max_tokens;
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
      // add max_tokens to vision model
 | 
			
		||||
      if (visionModel && !isO1OrO3 && ! isGpt5) {
 | 
			
		||||
      if (visionModel && !isO1OrO3) {
 | 
			
		||||
        requestPayload["max_tokens"] = Math.max(modelConfig.max_tokens, 4000);
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
 
 | 
			
		||||
@@ -29,11 +29,11 @@ type HTMLPreviewProps = {
 | 
			
		||||
  onLoad?: (title?: string) => void;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
export type HTMLPreviewHandler = {
 | 
			
		||||
export type HTMLPreviewHander = {
 | 
			
		||||
  reload: () => void;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
export const HTMLPreview = forwardRef<HTMLPreviewHandler, HTMLPreviewProps>(
 | 
			
		||||
export const HTMLPreview = forwardRef<HTMLPreviewHander, HTMLPreviewProps>(
 | 
			
		||||
  function HTMLPreview(props, ref) {
 | 
			
		||||
    const iframeRef = useRef<HTMLIFrameElement>(null);
 | 
			
		||||
    const [frameId, setFrameId] = useState<string>(nanoid());
 | 
			
		||||
@@ -207,7 +207,7 @@ export function Artifacts() {
 | 
			
		||||
  const [code, setCode] = useState("");
 | 
			
		||||
  const [loading, setLoading] = useState(true);
 | 
			
		||||
  const [fileName, setFileName] = useState("");
 | 
			
		||||
  const previewRef = useRef<HTMLPreviewHandler>(null);
 | 
			
		||||
  const previewRef = useRef<HTMLPreviewHander>(null);
 | 
			
		||||
 | 
			
		||||
  useEffect(() => {
 | 
			
		||||
    if (id) {
 | 
			
		||||
 
 | 
			
		||||
@@ -17,7 +17,7 @@ import { showImageModal, FullScreen } from "./ui-lib";
 | 
			
		||||
import {
 | 
			
		||||
  ArtifactsShareButton,
 | 
			
		||||
  HTMLPreview,
 | 
			
		||||
  HTMLPreviewHandler,
 | 
			
		||||
  HTMLPreviewHander,
 | 
			
		||||
} from "./artifacts";
 | 
			
		||||
import { useChatStore } from "../store";
 | 
			
		||||
import { IconButton } from "./button";
 | 
			
		||||
@@ -73,7 +73,7 @@ export function Mermaid(props: { code: string }) {
 | 
			
		||||
 | 
			
		||||
export function PreCode(props: { children: any }) {
 | 
			
		||||
  const ref = useRef<HTMLPreElement>(null);
 | 
			
		||||
  const previewRef = useRef<HTMLPreviewHandler>(null);
 | 
			
		||||
  const previewRef = useRef<HTMLPreviewHander>(null);
 | 
			
		||||
  const [mermaidCode, setMermaidCode] = useState("");
 | 
			
		||||
  const [htmlCode, setHtmlCode] = useState("");
 | 
			
		||||
  const { height } = useWindowSize();
 | 
			
		||||
 
 | 
			
		||||
@@ -75,7 +75,6 @@ import {
 | 
			
		||||
  ChatGLM,
 | 
			
		||||
  DeepSeek,
 | 
			
		||||
  SiliconFlow,
 | 
			
		||||
  AI302,
 | 
			
		||||
} from "../constant";
 | 
			
		||||
import { Prompt, SearchService, usePromptStore } from "../store/prompt";
 | 
			
		||||
import { ErrorBoundary } from "./error";
 | 
			
		||||
@@ -1459,46 +1458,6 @@ export function Settings() {
 | 
			
		||||
    </>
 | 
			
		||||
  );
 | 
			
		||||
 | 
			
		||||
  const ai302ConfigComponent = accessStore.provider === ServiceProvider["302.AI"] && (
 | 
			
		||||
    <>
 | 
			
		||||
      <ListItem
 | 
			
		||||
          title={Locale.Settings.Access.AI302.Endpoint.Title}
 | 
			
		||||
          subTitle={
 | 
			
		||||
            Locale.Settings.Access.AI302.Endpoint.SubTitle +
 | 
			
		||||
            AI302.ExampleEndpoint
 | 
			
		||||
          }
 | 
			
		||||
        >
 | 
			
		||||
          <input
 | 
			
		||||
            aria-label={Locale.Settings.Access.AI302.Endpoint.Title}
 | 
			
		||||
            type="text"
 | 
			
		||||
            value={accessStore.ai302Url}
 | 
			
		||||
            placeholder={AI302.ExampleEndpoint}
 | 
			
		||||
            onChange={(e) =>
 | 
			
		||||
              accessStore.update(
 | 
			
		||||
                (access) => (access.ai302Url = e.currentTarget.value),
 | 
			
		||||
              )
 | 
			
		||||
            }
 | 
			
		||||
          ></input>
 | 
			
		||||
        </ListItem>
 | 
			
		||||
        <ListItem
 | 
			
		||||
          title={Locale.Settings.Access.AI302.ApiKey.Title}
 | 
			
		||||
          subTitle={Locale.Settings.Access.AI302.ApiKey.SubTitle}
 | 
			
		||||
        >
 | 
			
		||||
          <PasswordInput
 | 
			
		||||
            aria-label={Locale.Settings.Access.AI302.ApiKey.Title}
 | 
			
		||||
            value={accessStore.ai302ApiKey}
 | 
			
		||||
            type="text"
 | 
			
		||||
            placeholder={Locale.Settings.Access.AI302.ApiKey.Placeholder}
 | 
			
		||||
            onChange={(e) => {
 | 
			
		||||
              accessStore.update(
 | 
			
		||||
                (access) => (access.ai302ApiKey = e.currentTarget.value),
 | 
			
		||||
              );
 | 
			
		||||
            }}
 | 
			
		||||
          />
 | 
			
		||||
        </ListItem>
 | 
			
		||||
      </>
 | 
			
		||||
  );
 | 
			
		||||
 | 
			
		||||
  return (
 | 
			
		||||
    <ErrorBoundary>
 | 
			
		||||
      <div className="window-header" data-tauri-drag-region>
 | 
			
		||||
@@ -1863,7 +1822,6 @@ export function Settings() {
 | 
			
		||||
                  {XAIConfigComponent}
 | 
			
		||||
                  {chatglmConfigComponent}
 | 
			
		||||
                  {siliconflowConfigComponent}
 | 
			
		||||
                  {ai302ConfigComponent}
 | 
			
		||||
                </>
 | 
			
		||||
              )}
 | 
			
		||||
            </>
 | 
			
		||||
 
 | 
			
		||||
@@ -88,10 +88,6 @@ declare global {
 | 
			
		||||
      SILICONFLOW_URL?: string;
 | 
			
		||||
      SILICONFLOW_API_KEY?: string;
 | 
			
		||||
 | 
			
		||||
      // 302.AI only
 | 
			
		||||
      AI302_URL?: string;
 | 
			
		||||
      AI302_API_KEY?: string;
 | 
			
		||||
 | 
			
		||||
      // custom template for preprocessing user input
 | 
			
		||||
      DEFAULT_INPUT_TEMPLATE?: string;
 | 
			
		||||
 | 
			
		||||
@@ -167,7 +163,6 @@ export const getServerSideConfig = () => {
 | 
			
		||||
  const isXAI = !!process.env.XAI_API_KEY;
 | 
			
		||||
  const isChatGLM = !!process.env.CHATGLM_API_KEY;
 | 
			
		||||
  const isSiliconFlow = !!process.env.SILICONFLOW_API_KEY;
 | 
			
		||||
  const isAI302 = !!process.env.AI302_API_KEY;
 | 
			
		||||
  // const apiKeyEnvVar = process.env.OPENAI_API_KEY ?? "";
 | 
			
		||||
  // const apiKeys = apiKeyEnvVar.split(",").map((v) => v.trim());
 | 
			
		||||
  // const randomIndex = Math.floor(Math.random() * apiKeys.length);
 | 
			
		||||
@@ -251,10 +246,6 @@ export const getServerSideConfig = () => {
 | 
			
		||||
    siliconFlowUrl: process.env.SILICONFLOW_URL,
 | 
			
		||||
    siliconFlowApiKey: getApiKey(process.env.SILICONFLOW_API_KEY),
 | 
			
		||||
 | 
			
		||||
    isAI302,
 | 
			
		||||
    ai302Url: process.env.AI302_URL,
 | 
			
		||||
    ai302ApiKey: getApiKey(process.env.AI302_API_KEY),
 | 
			
		||||
 | 
			
		||||
    gtmId: process.env.GTM_ID,
 | 
			
		||||
    gaId: process.env.GA_ID || DEFAULT_GA_ID,
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										101
									
								
								app/constant.ts
									
									
									
									
									
								
							
							
						
						
									
										101
									
								
								app/constant.ts
									
									
									
									
									
								
							@@ -25,7 +25,7 @@ export const ALIBABA_BASE_URL = "https://dashscope.aliyuncs.com/api/";
 | 
			
		||||
 | 
			
		||||
export const TENCENT_BASE_URL = "https://hunyuan.tencentcloudapi.com";
 | 
			
		||||
 | 
			
		||||
export const MOONSHOT_BASE_URL = "https://api.moonshot.ai";
 | 
			
		||||
export const MOONSHOT_BASE_URL = "https://api.moonshot.cn";
 | 
			
		||||
export const IFLYTEK_BASE_URL = "https://spark-api-open.xf-yun.com";
 | 
			
		||||
 | 
			
		||||
export const DEEPSEEK_BASE_URL = "https://api.deepseek.com";
 | 
			
		||||
@@ -36,8 +36,6 @@ export const CHATGLM_BASE_URL = "https://open.bigmodel.cn";
 | 
			
		||||
 | 
			
		||||
export const SILICONFLOW_BASE_URL = "https://api.siliconflow.cn";
 | 
			
		||||
 | 
			
		||||
export const AI302_BASE_URL = "https://api.302.ai";
 | 
			
		||||
 | 
			
		||||
export const CACHE_URL_PREFIX = "/api/cache";
 | 
			
		||||
export const UPLOAD_URL = `${CACHE_URL_PREFIX}/upload`;
 | 
			
		||||
 | 
			
		||||
@@ -74,7 +72,6 @@ export enum ApiPath {
 | 
			
		||||
  ChatGLM = "/api/chatglm",
 | 
			
		||||
  DeepSeek = "/api/deepseek",
 | 
			
		||||
  SiliconFlow = "/api/siliconflow",
 | 
			
		||||
  "302.AI" = "/api/302ai",
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export enum SlotID {
 | 
			
		||||
@@ -133,7 +130,6 @@ export enum ServiceProvider {
 | 
			
		||||
  ChatGLM = "ChatGLM",
 | 
			
		||||
  DeepSeek = "DeepSeek",
 | 
			
		||||
  SiliconFlow = "SiliconFlow",
 | 
			
		||||
  "302.AI" = "302.AI",
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// Google API safety settings, see https://ai.google.dev/gemini-api/docs/safety-settings
 | 
			
		||||
@@ -160,7 +156,6 @@ export enum ModelProvider {
 | 
			
		||||
  ChatGLM = "ChatGLM",
 | 
			
		||||
  DeepSeek = "DeepSeek",
 | 
			
		||||
  SiliconFlow = "SiliconFlow",
 | 
			
		||||
  "302.AI" = "302.AI",
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export const Stability = {
 | 
			
		||||
@@ -271,13 +266,6 @@ export const SiliconFlow = {
 | 
			
		||||
  ListModelPath: "v1/models?&sub_type=chat",
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
export const AI302 = {
 | 
			
		||||
  ExampleEndpoint: AI302_BASE_URL,
 | 
			
		||||
  ChatPath: "v1/chat/completions",
 | 
			
		||||
  EmbeddingsPath: "jina/v1/embeddings",
 | 
			
		||||
  ListModelPath: "v1/models?llm=1",
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
export const DEFAULT_INPUT_TEMPLATE = `{{input}}`; // input / time / model / lang
 | 
			
		||||
// export const DEFAULT_SYSTEM_TEMPLATE = `
 | 
			
		||||
// You are ChatGPT, a large language model trained by {{ServiceProvider}}.
 | 
			
		||||
@@ -479,21 +467,19 @@ export const VISION_MODEL_REGEXES = [
 | 
			
		||||
  /vision/,
 | 
			
		||||
  /gpt-4o/,
 | 
			
		||||
  /gpt-4\.1/,
 | 
			
		||||
  /claude.*[34]/,
 | 
			
		||||
  /claude-3/,
 | 
			
		||||
  /gemini-1\.5/,
 | 
			
		||||
  /gemini-exp/,
 | 
			
		||||
  /gemini-2\.[05]/,
 | 
			
		||||
  /gemini-2\.0/,
 | 
			
		||||
  /learnlm/,
 | 
			
		||||
  /qwen-vl/,
 | 
			
		||||
  /qwen2-vl/,
 | 
			
		||||
  /gpt-4-turbo(?!.*preview)/,
 | 
			
		||||
  /^dall-e-3$/,
 | 
			
		||||
  /gpt-4-turbo(?!.*preview)/, // Matches "gpt-4-turbo" but not "gpt-4-turbo-preview"
 | 
			
		||||
  /^dall-e-3$/, // Matches exactly "dall-e-3"
 | 
			
		||||
  /glm-4v/,
 | 
			
		||||
  /vl/i,
 | 
			
		||||
  /o3/,
 | 
			
		||||
  /o4-mini/,
 | 
			
		||||
  /grok-4/i,
 | 
			
		||||
  /gpt-5/
 | 
			
		||||
];
 | 
			
		||||
 | 
			
		||||
export const EXCLUDE_VISION_MODEL_REGEXES = [/claude-3-5-haiku-20241022/];
 | 
			
		||||
@@ -518,11 +504,6 @@ const openaiModels = [
 | 
			
		||||
  "gpt-4.1-nano-2025-04-14",
 | 
			
		||||
  "gpt-4.5-preview",
 | 
			
		||||
  "gpt-4.5-preview-2025-02-27",
 | 
			
		||||
  "gpt-5-chat",
 | 
			
		||||
  "gpt-5-mini",
 | 
			
		||||
  "gpt-5-nano",
 | 
			
		||||
  "gpt-5",
 | 
			
		||||
  "gpt-5-chat-2025-01-01-preview",
 | 
			
		||||
  "gpt-4o",
 | 
			
		||||
  "gpt-4o-2024-05-13",
 | 
			
		||||
  "gpt-4o-2024-08-06",
 | 
			
		||||
@@ -542,15 +523,20 @@ const openaiModels = [
 | 
			
		||||
];
 | 
			
		||||
 | 
			
		||||
const googleModels = [
 | 
			
		||||
  "gemini-1.0-pro", // Deprecated on 2/15/2025
 | 
			
		||||
  "gemini-1.5-pro-latest",
 | 
			
		||||
  "gemini-1.5-pro",
 | 
			
		||||
  "gemini-1.5-pro-002",
 | 
			
		||||
  "gemini-1.5-pro-exp-0827",
 | 
			
		||||
  "gemini-1.5-flash-latest",
 | 
			
		||||
  "gemini-1.5-flash-8b-latest",
 | 
			
		||||
  "gemini-1.5-flash",
 | 
			
		||||
  "gemini-1.5-flash-8b",
 | 
			
		||||
  "gemini-1.5-flash-002",
 | 
			
		||||
  "gemini-1.5-flash-exp-0827",
 | 
			
		||||
  "learnlm-1.5-pro-experimental",
 | 
			
		||||
  "gemini-exp-1114",
 | 
			
		||||
  "gemini-exp-1121",
 | 
			
		||||
  "gemini-exp-1206",
 | 
			
		||||
  "gemini-2.0-flash",
 | 
			
		||||
  "gemini-2.0-flash-exp",
 | 
			
		||||
@@ -560,8 +546,6 @@ const googleModels = [
 | 
			
		||||
  "gemini-2.0-flash-thinking-exp-01-21",
 | 
			
		||||
  "gemini-2.0-pro-exp",
 | 
			
		||||
  "gemini-2.0-pro-exp-02-05",
 | 
			
		||||
  "gemini-2.5-pro-preview-06-05",
 | 
			
		||||
  "gemini-2.5-pro"
 | 
			
		||||
];
 | 
			
		||||
 | 
			
		||||
const anthropicModels = [
 | 
			
		||||
@@ -579,8 +563,6 @@ const anthropicModels = [
 | 
			
		||||
  "claude-3-5-sonnet-latest",
 | 
			
		||||
  "claude-3-7-sonnet-20250219",
 | 
			
		||||
  "claude-3-7-sonnet-latest",
 | 
			
		||||
  "claude-sonnet-4-20250514",
 | 
			
		||||
  "claude-opus-4-20250514",
 | 
			
		||||
];
 | 
			
		||||
 | 
			
		||||
const baiduModels = [
 | 
			
		||||
@@ -629,18 +611,7 @@ const tencentModels = [
 | 
			
		||||
  "hunyuan-vision",
 | 
			
		||||
];
 | 
			
		||||
 | 
			
		||||
const moonshotModels = [
 | 
			
		||||
  "moonshot-v1-auto",
 | 
			
		||||
  "moonshot-v1-8k",
 | 
			
		||||
  "moonshot-v1-32k",
 | 
			
		||||
  "moonshot-v1-128k",
 | 
			
		||||
  "moonshot-v1-8k-vision-preview",
 | 
			
		||||
  "moonshot-v1-32k-vision-preview",
 | 
			
		||||
  "moonshot-v1-128k-vision-preview",
 | 
			
		||||
  "kimi-thinking-preview",
 | 
			
		||||
  "kimi-k2-0711-preview",
 | 
			
		||||
  "kimi-latest",
 | 
			
		||||
];
 | 
			
		||||
const moonshotModes = ["moonshot-v1-8k", "moonshot-v1-32k", "moonshot-v1-128k"];
 | 
			
		||||
 | 
			
		||||
const iflytekModels = [
 | 
			
		||||
  "general",
 | 
			
		||||
@@ -661,18 +632,6 @@ const xAIModes = [
 | 
			
		||||
  "grok-2-vision-1212",
 | 
			
		||||
  "grok-2-vision",
 | 
			
		||||
  "grok-2-vision-latest",
 | 
			
		||||
  "grok-3-mini-fast-beta",
 | 
			
		||||
  "grok-3-mini-fast",
 | 
			
		||||
  "grok-3-mini-fast-latest",
 | 
			
		||||
  "grok-3-mini-beta",
 | 
			
		||||
  "grok-3-mini",
 | 
			
		||||
  "grok-3-mini-latest",
 | 
			
		||||
  "grok-3-fast-beta",
 | 
			
		||||
  "grok-3-fast",
 | 
			
		||||
  "grok-3-fast-latest",
 | 
			
		||||
  "grok-3-beta",
 | 
			
		||||
  "grok-3",
 | 
			
		||||
  "grok-3-latest",
 | 
			
		||||
];
 | 
			
		||||
 | 
			
		||||
const chatglmModels = [
 | 
			
		||||
@@ -712,31 +671,6 @@ const siliconflowModels = [
 | 
			
		||||
  "Pro/deepseek-ai/DeepSeek-V3",
 | 
			
		||||
];
 | 
			
		||||
 | 
			
		||||
const ai302Models = [
 | 
			
		||||
  "deepseek-chat",
 | 
			
		||||
  "gpt-4o",
 | 
			
		||||
  "chatgpt-4o-latest",
 | 
			
		||||
  "llama3.3-70b",
 | 
			
		||||
  "deepseek-reasoner",
 | 
			
		||||
  "gemini-2.0-flash",
 | 
			
		||||
  "claude-3-7-sonnet-20250219",
 | 
			
		||||
  "claude-3-7-sonnet-latest",
 | 
			
		||||
  "grok-3-beta",
 | 
			
		||||
  "grok-3-mini-beta",
 | 
			
		||||
  "gpt-4.1",
 | 
			
		||||
  "gpt-4.1-mini",
 | 
			
		||||
  "o3",
 | 
			
		||||
  "o4-mini",
 | 
			
		||||
  "qwen3-235b-a22b",
 | 
			
		||||
  "qwen3-32b",
 | 
			
		||||
  "gemini-2.5-pro-preview-05-06",
 | 
			
		||||
  "llama-4-maverick",
 | 
			
		||||
  "gemini-2.5-flash",
 | 
			
		||||
  "claude-sonnet-4-20250514",
 | 
			
		||||
  "claude-opus-4-20250514",
 | 
			
		||||
  "gemini-2.5-pro",
 | 
			
		||||
];
 | 
			
		||||
 | 
			
		||||
let seq = 1000; // 内置的模型序号生成器从1000开始
 | 
			
		||||
export const DEFAULT_MODELS = [
 | 
			
		||||
  ...openaiModels.map((name) => ({
 | 
			
		||||
@@ -827,7 +761,7 @@ export const DEFAULT_MODELS = [
 | 
			
		||||
      sorted: 8,
 | 
			
		||||
    },
 | 
			
		||||
  })),
 | 
			
		||||
  ...moonshotModels.map((name) => ({
 | 
			
		||||
  ...moonshotModes.map((name) => ({
 | 
			
		||||
    name,
 | 
			
		||||
    available: true,
 | 
			
		||||
    sorted: seq++,
 | 
			
		||||
@@ -893,17 +827,6 @@ export const DEFAULT_MODELS = [
 | 
			
		||||
      sorted: 14,
 | 
			
		||||
    },
 | 
			
		||||
  })),
 | 
			
		||||
  ...ai302Models.map((name) => ({
 | 
			
		||||
    name,
 | 
			
		||||
    available: true,
 | 
			
		||||
    sorted: seq++,
 | 
			
		||||
    provider: {
 | 
			
		||||
      id: "ai302",
 | 
			
		||||
      providerName: "302.AI",
 | 
			
		||||
      providerType: "ai302",
 | 
			
		||||
      sorted: 15,
 | 
			
		||||
    },
 | 
			
		||||
  })),
 | 
			
		||||
] as const;
 | 
			
		||||
 | 
			
		||||
export const CHAT_PAGE_SIZE = 15;
 | 
			
		||||
 
 | 
			
		||||
@@ -416,17 +416,6 @@ const ar: PartialLocaleType = {
 | 
			
		||||
          SubTitle: "مثال:",
 | 
			
		||||
        },
 | 
			
		||||
      },
 | 
			
		||||
      AI302: {
 | 
			
		||||
        ApiKey: {
 | 
			
		||||
          Title: "مفتاح 302.AI API",
 | 
			
		||||
          SubTitle: "استخدم مفتاح 302.AI API مخصص",
 | 
			
		||||
          Placeholder: "مفتاح 302.AI API",
 | 
			
		||||
        },
 | 
			
		||||
        Endpoint: {
 | 
			
		||||
          Title: "عنوان الواجهة",
 | 
			
		||||
          SubTitle: "مثال:",
 | 
			
		||||
        },
 | 
			
		||||
      },
 | 
			
		||||
      CustomModel: {
 | 
			
		||||
        Title: "اسم النموذج المخصص",
 | 
			
		||||
        SubTitle: "أضف خيارات نموذج مخصص، مفصولة بفواصل إنجليزية",
 | 
			
		||||
 
 | 
			
		||||
@@ -423,17 +423,6 @@ const bn: PartialLocaleType = {
 | 
			
		||||
          SubTitle: "উদাহরণ:",
 | 
			
		||||
        },
 | 
			
		||||
      },
 | 
			
		||||
      AI302: {
 | 
			
		||||
        ApiKey: {
 | 
			
		||||
          Title: "ইন্টারফেস কী",
 | 
			
		||||
          SubTitle: "স্বনির্ধারিত 302.AI API কী ব্যবহার করুন",
 | 
			
		||||
          Placeholder: "302.AI API কী",
 | 
			
		||||
        },
 | 
			
		||||
        Endpoint: {
 | 
			
		||||
          Title: "ইন্টারফেস ঠিকানা",
 | 
			
		||||
          SubTitle: "উদাহরণ:",
 | 
			
		||||
        },
 | 
			
		||||
      },
 | 
			
		||||
      CustomModel: {
 | 
			
		||||
        Title: "স্বনির্ধারিত মডেল নাম",
 | 
			
		||||
        SubTitle:
 | 
			
		||||
 
 | 
			
		||||
@@ -538,17 +538,6 @@ const cn = {
 | 
			
		||||
        Title: "自定义模型名",
 | 
			
		||||
        SubTitle: "增加自定义模型可选项,使用英文逗号隔开",
 | 
			
		||||
      },
 | 
			
		||||
      AI302: {
 | 
			
		||||
        ApiKey: {
 | 
			
		||||
          Title: "接口密钥",
 | 
			
		||||
          SubTitle: "使用自定义302.AI API Key",
 | 
			
		||||
          Placeholder: "302.AI API Key",
 | 
			
		||||
        },
 | 
			
		||||
        Endpoint: {
 | 
			
		||||
          Title: "接口地址",
 | 
			
		||||
          SubTitle: "样例:",
 | 
			
		||||
        },
 | 
			
		||||
      },
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    Model: "模型 (model)",
 | 
			
		||||
 
 | 
			
		||||
@@ -423,17 +423,6 @@ const cs: PartialLocaleType = {
 | 
			
		||||
          SubTitle: "Příklad:",
 | 
			
		||||
        },
 | 
			
		||||
      },
 | 
			
		||||
      AI302: {
 | 
			
		||||
        ApiKey: {
 | 
			
		||||
          Title: "Rozhraní klíč",
 | 
			
		||||
          SubTitle: "Použijte vlastní 302.AI API Key",
 | 
			
		||||
          Placeholder: "302.AI API Key",
 | 
			
		||||
        },
 | 
			
		||||
        Endpoint: {
 | 
			
		||||
          Title: "Adresa rozhraní",
 | 
			
		||||
          SubTitle: "Příklad:",
 | 
			
		||||
        },
 | 
			
		||||
      },
 | 
			
		||||
      CustomModel: {
 | 
			
		||||
        Title: "Vlastní názvy modelů",
 | 
			
		||||
        SubTitle: "Přidejte možnosti vlastních modelů, oddělené čárkami",
 | 
			
		||||
 
 | 
			
		||||
@@ -517,17 +517,6 @@ const da: PartialLocaleType = {
 | 
			
		||||
          SubTitle: "Vælg et niveau for indholdskontrol",
 | 
			
		||||
        },
 | 
			
		||||
      },
 | 
			
		||||
      AI302: {
 | 
			
		||||
        ApiKey: {
 | 
			
		||||
          Title: "302.AI API Key",
 | 
			
		||||
          SubTitle: "Brug en custom 302.AI API Key",
 | 
			
		||||
          Placeholder: "302.AI API Key",
 | 
			
		||||
        },
 | 
			
		||||
        Endpoint: {
 | 
			
		||||
          Title: "Endpoint-adresse",
 | 
			
		||||
          SubTitle: "Eksempel: ",
 | 
			
		||||
        },
 | 
			
		||||
      },
 | 
			
		||||
    },
 | 
			
		||||
    Model: "Model",
 | 
			
		||||
    CompressModel: {
 | 
			
		||||
 
 | 
			
		||||
@@ -434,17 +434,6 @@ const de: PartialLocaleType = {
 | 
			
		||||
          SubTitle: "Beispiel:",
 | 
			
		||||
        },
 | 
			
		||||
      },
 | 
			
		||||
      AI302: {
 | 
			
		||||
        ApiKey: {
 | 
			
		||||
          Title: "Schnittstellenschlüssel",
 | 
			
		||||
          SubTitle: "Verwenden Sie einen benutzerdefinierten 302.AI API-Schlüssel",
 | 
			
		||||
          Placeholder: "302.AI API-Schlüssel",
 | 
			
		||||
        },
 | 
			
		||||
        Endpoint: {
 | 
			
		||||
          Title: "Endpunktadresse",
 | 
			
		||||
          SubTitle: "Beispiel:",
 | 
			
		||||
        },
 | 
			
		||||
      },
 | 
			
		||||
      CustomModel: {
 | 
			
		||||
        Title: "Benutzerdefinierter Modellname",
 | 
			
		||||
        SubTitle:
 | 
			
		||||
 
 | 
			
		||||
@@ -543,17 +543,6 @@ const en: LocaleType = {
 | 
			
		||||
          SubTitle: "Select a safety filtering level",
 | 
			
		||||
        },
 | 
			
		||||
      },
 | 
			
		||||
      AI302: {
 | 
			
		||||
        ApiKey: {
 | 
			
		||||
          Title: "302.AI API Key",
 | 
			
		||||
          SubTitle: "Use a custom 302.AI API Key",
 | 
			
		||||
          Placeholder: "302.AI API Key",
 | 
			
		||||
        },
 | 
			
		||||
        Endpoint: {
 | 
			
		||||
          Title: "Endpoint Address",
 | 
			
		||||
          SubTitle: "Example: ",
 | 
			
		||||
        },
 | 
			
		||||
      },
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    Model: "Model",
 | 
			
		||||
 
 | 
			
		||||
@@ -436,17 +436,6 @@ const es: PartialLocaleType = {
 | 
			
		||||
          SubTitle: "Ejemplo:",
 | 
			
		||||
        },
 | 
			
		||||
      },
 | 
			
		||||
      AI302: {
 | 
			
		||||
        ApiKey: {
 | 
			
		||||
          Title: "Clave de interfaz",
 | 
			
		||||
          SubTitle: "Usa una clave API de 302.AI personalizada",
 | 
			
		||||
          Placeholder: "Clave API de 302.AI",
 | 
			
		||||
        },
 | 
			
		||||
        Endpoint: {
 | 
			
		||||
          Title: "Dirección del endpoint",
 | 
			
		||||
          SubTitle: "Ejemplo:",
 | 
			
		||||
        },
 | 
			
		||||
      },
 | 
			
		||||
      CustomModel: {
 | 
			
		||||
        Title: "Nombre del modelo personalizado",
 | 
			
		||||
        SubTitle:
 | 
			
		||||
 
 | 
			
		||||
@@ -435,17 +435,6 @@ const fr: PartialLocaleType = {
 | 
			
		||||
          SubTitle: "Exemple :",
 | 
			
		||||
        },
 | 
			
		||||
      },
 | 
			
		||||
      AI302: {
 | 
			
		||||
        ApiKey: {
 | 
			
		||||
          Title: "Clé d'interface",
 | 
			
		||||
          SubTitle: "Utiliser une clé API 302.AI personnalisée",
 | 
			
		||||
          Placeholder: "Clé API 302.AI",
 | 
			
		||||
        },
 | 
			
		||||
        Endpoint: {
 | 
			
		||||
          Title: "Adresse de l'endpoint",
 | 
			
		||||
          SubTitle: "Exemple :",
 | 
			
		||||
        },
 | 
			
		||||
      },
 | 
			
		||||
      CustomModel: {
 | 
			
		||||
        Title: "Nom du modèle personnalisé",
 | 
			
		||||
        SubTitle:
 | 
			
		||||
 
 | 
			
		||||
@@ -424,17 +424,6 @@ const id: PartialLocaleType = {
 | 
			
		||||
          SubTitle: "Contoh:",
 | 
			
		||||
        },
 | 
			
		||||
      },
 | 
			
		||||
      AI302: {
 | 
			
		||||
        ApiKey: {
 | 
			
		||||
          Title: "Kunci Antarmuka",
 | 
			
		||||
          SubTitle: "Gunakan 302.AI API Key kustom",
 | 
			
		||||
          Placeholder: "302.AI API Key",
 | 
			
		||||
        },
 | 
			
		||||
        Endpoint: {
 | 
			
		||||
          Title: "Alamat Antarmuka",
 | 
			
		||||
          SubTitle: "Contoh:",
 | 
			
		||||
        },
 | 
			
		||||
      },
 | 
			
		||||
      CustomModel: {
 | 
			
		||||
        Title: "Nama Model Kustom",
 | 
			
		||||
        SubTitle: "Tambahkan opsi model kustom, pisahkan dengan koma",
 | 
			
		||||
 
 | 
			
		||||
@@ -436,17 +436,6 @@ const it: PartialLocaleType = {
 | 
			
		||||
          SubTitle: "Esempio:",
 | 
			
		||||
        },
 | 
			
		||||
      },
 | 
			
		||||
      AI302: {
 | 
			
		||||
        ApiKey: {
 | 
			
		||||
          Title: "Chiave dell'interfaccia",
 | 
			
		||||
          SubTitle: "Utilizza una chiave API 302.AI personalizzata",
 | 
			
		||||
          Placeholder: "Chiave API 302.AI",
 | 
			
		||||
        },
 | 
			
		||||
        Endpoint: {
 | 
			
		||||
          Title: "Indirizzo dell'interfaccia",
 | 
			
		||||
          SubTitle: "Esempio:",
 | 
			
		||||
        },
 | 
			
		||||
      },
 | 
			
		||||
      CustomModel: {
 | 
			
		||||
        Title: "Nome del modello personalizzato",
 | 
			
		||||
        SubTitle:
 | 
			
		||||
 
 | 
			
		||||
@@ -420,17 +420,6 @@ const jp: PartialLocaleType = {
 | 
			
		||||
          SubTitle: "例:",
 | 
			
		||||
        },
 | 
			
		||||
      },
 | 
			
		||||
      AI302: {
 | 
			
		||||
        ApiKey: {
 | 
			
		||||
          Title: "APIキー",
 | 
			
		||||
          SubTitle: "カスタム302.AI APIキーを使用",
 | 
			
		||||
          Placeholder: "302.AI APIキー",
 | 
			
		||||
        },
 | 
			
		||||
        Endpoint: {
 | 
			
		||||
          Title: "エンドポイント",
 | 
			
		||||
          SubTitle: "例:",
 | 
			
		||||
        },
 | 
			
		||||
      },
 | 
			
		||||
      CustomModel: {
 | 
			
		||||
        Title: "カスタムモデル名",
 | 
			
		||||
        SubTitle: "カスタムモデルの選択肢を追加、英語のカンマで区切る",
 | 
			
		||||
 
 | 
			
		||||
@@ -9,10 +9,10 @@ const ko: PartialLocaleType = {
 | 
			
		||||
  Error: {
 | 
			
		||||
    Unauthorized: isApp
 | 
			
		||||
      ? `😆 대화 중 문제가 발생했습니다, 걱정하지 마세요:
 | 
			
		||||
    \\ 1️⃣ 세팅 없이 시작하고 싶다면, [여기를 클릭하여 즉시 대화를 시작하세요 🚀](${SAAS_CHAT_UTM_URL})
 | 
			
		||||
    \\ 1️⃣ 제로 구성으로 시작하고 싶다면, [여기를 클릭하여 즉시 대화를 시작하세요 🚀](${SAAS_CHAT_UTM_URL})
 | 
			
		||||
    \\ 2️⃣ 자신의 OpenAI 리소스를 사용하고 싶다면, [여기를 클릭하여](/#/settings) 설정을 수정하세요 ⚙️`
 | 
			
		||||
      : `😆 대화 중 문제가 발생했습니다, 걱정하지 마세요:
 | 
			
		||||
    \ 1️⃣ 세팅 없이 시작하고 싶다면, [여기를 클릭하여 즉시 대화를 시작하세요 🚀](${SAAS_CHAT_UTM_URL})
 | 
			
		||||
    \ 1️⃣ 제로 구성으로 시작하고 싶다면, [여기를 클릭하여 즉시 대화를 시작하세요 🚀](${SAAS_CHAT_UTM_URL})
 | 
			
		||||
    \ 2️⃣ 개인 배포 버전을 사용하고 있다면, [여기를 클릭하여](/#/auth) 접근 키를 입력하세요 🔑
 | 
			
		||||
    \ 3️⃣ 자신의 OpenAI 리소스를 사용하고 싶다면, [여기를 클릭하여](/#/settings) 설정을 수정하세요 ⚙️
 | 
			
		||||
 `,
 | 
			
		||||
@@ -27,7 +27,7 @@ const ko: PartialLocaleType = {
 | 
			
		||||
    Return: "돌아가기",
 | 
			
		||||
    SaasTips: "설정이 너무 복잡합니다. 즉시 사용하고 싶습니다.",
 | 
			
		||||
    TopTips:
 | 
			
		||||
      "🥳 NextChat AI 출시 기념 할인: 지금 OpenAI o1, GPT-4o, Claude-3.5 및 최신 대형 모델을 사용해보세요!",
 | 
			
		||||
      "🥳 NextChat AI 출시 기념 할인, 지금 OpenAI o1, GPT-4o, Claude-3.5 및 최신 대형 모델을 해제하세요",
 | 
			
		||||
  },
 | 
			
		||||
  ChatItem: {
 | 
			
		||||
    ChatItemCount: (count: number) => `${count} 개의 대화`,
 | 
			
		||||
@@ -53,11 +53,8 @@ const ko: PartialLocaleType = {
 | 
			
		||||
      PinToastAction: "보기",
 | 
			
		||||
      Delete: "삭제",
 | 
			
		||||
      Edit: "편집",
 | 
			
		||||
      FullScreen: "전체 화면",
 | 
			
		||||
      RefreshTitle: "제목 새로고침",
 | 
			
		||||
      RefreshToast: "제목 새로고침 요청이 전송되었습니다",
 | 
			
		||||
      Speech: "재생",
 | 
			
		||||
      StopSpeech: "정지",
 | 
			
		||||
    },
 | 
			
		||||
    Commands: {
 | 
			
		||||
      new: "새 채팅",
 | 
			
		||||
@@ -65,7 +62,6 @@ const ko: PartialLocaleType = {
 | 
			
		||||
      next: "다음 채팅",
 | 
			
		||||
      prev: "이전 채팅",
 | 
			
		||||
      clear: "컨텍스트 지우기",
 | 
			
		||||
      fork: "채팅 복사",
 | 
			
		||||
      del: "채팅 삭제",
 | 
			
		||||
    },
 | 
			
		||||
    InputActions: {
 | 
			
		||||
@@ -92,22 +88,11 @@ const ko: PartialLocaleType = {
 | 
			
		||||
      return inputHints + ",/ 자동 완성,: 명령어 입력";
 | 
			
		||||
    },
 | 
			
		||||
    Send: "전송",
 | 
			
		||||
    StartSpeak: "재생 시작",
 | 
			
		||||
    StopSpeak: "재생 정지",
 | 
			
		||||
    Config: {
 | 
			
		||||
      Reset: "기억 지우기",
 | 
			
		||||
      SaveAs: "마스크로 저장",
 | 
			
		||||
    },
 | 
			
		||||
    IsContext: "프롬프트 설정",
 | 
			
		||||
    ShortcutKey: {
 | 
			
		||||
      Title: "키보드 단축키",
 | 
			
		||||
      newChat: "새 채팅 열기",
 | 
			
		||||
      focusInput: "입력 필드 포커스",
 | 
			
		||||
      copyLastMessage: "마지막 답변 복사",
 | 
			
		||||
      copyLastCode: "마지막 코드 블록 복사",
 | 
			
		||||
      showShortcutKey: "단축키 보기",
 | 
			
		||||
      clearContext: "컨텍스트 지우기",
 | 
			
		||||
    },
 | 
			
		||||
  },
 | 
			
		||||
  Export: {
 | 
			
		||||
    Title: "채팅 기록 공유",
 | 
			
		||||
@@ -129,13 +114,9 @@ const ko: PartialLocaleType = {
 | 
			
		||||
      Preview: "미리보기",
 | 
			
		||||
    },
 | 
			
		||||
    Image: {
 | 
			
		||||
      Toast: "스크린샷 생성 중...",
 | 
			
		||||
      Toast: "스크린샷 생성 중",
 | 
			
		||||
      Modal: "길게 누르거나 오른쪽 클릭하여 이미지를 저장하십시오.",
 | 
			
		||||
    },
 | 
			
		||||
    Artifacts: {
 | 
			
		||||
      Title: "공유 아티팩트",
 | 
			
		||||
      Error: "공유 오류",
 | 
			
		||||
    },
 | 
			
		||||
  },
 | 
			
		||||
  Select: {
 | 
			
		||||
    Search: "메시지 검색",
 | 
			
		||||
@@ -160,7 +141,7 @@ const ko: PartialLocaleType = {
 | 
			
		||||
  Settings: {
 | 
			
		||||
    Title: "설정",
 | 
			
		||||
    SubTitle: "모든 설정 옵션",
 | 
			
		||||
    ShowPassword: "비밀번호 보기",
 | 
			
		||||
 | 
			
		||||
    Danger: {
 | 
			
		||||
      Reset: {
 | 
			
		||||
        Title: "모든 설정 초기화",
 | 
			
		||||
@@ -206,10 +187,8 @@ const ko: PartialLocaleType = {
 | 
			
		||||
      IsChecking: "업데이트 확인 중...",
 | 
			
		||||
      FoundUpdate: (x: string) => `새 버전 발견: ${x}`,
 | 
			
		||||
      GoToUpdate: "업데이트로 이동",
 | 
			
		||||
      Success: "업데이트 성공",
 | 
			
		||||
      Failed: "업데이트 실패",
 | 
			
		||||
    },
 | 
			
		||||
    SendKey: "키 전송",
 | 
			
		||||
    SendKey: "전송 키",
 | 
			
		||||
    Theme: "테마",
 | 
			
		||||
    TightBorder: "테두리 없는 모드",
 | 
			
		||||
    SendPreviewBubble: {
 | 
			
		||||
@@ -242,7 +221,7 @@ const ko: PartialLocaleType = {
 | 
			
		||||
        },
 | 
			
		||||
        ProxyUrl: {
 | 
			
		||||
          Title: "프록시 주소",
 | 
			
		||||
          SubTitle: "이 프로젝트에서 제공하는 CORS 프록시만 해당",
 | 
			
		||||
          SubTitle: "이 프로젝트에서 제공하는 교차 출처 프록시만 해당",
 | 
			
		||||
        },
 | 
			
		||||
 | 
			
		||||
        WebDav: {
 | 
			
		||||
@@ -316,7 +295,7 @@ const ko: PartialLocaleType = {
 | 
			
		||||
        Title: "NextChat AI 사용하기",
 | 
			
		||||
        Label: "(가장 비용 효율적인 솔루션)",
 | 
			
		||||
        SubTitle:
 | 
			
		||||
          "NextChat에 의해 공식적으로 유지 관리되며, 설정 없이 즉시 사용할 수 있으며, OpenAI o1, GPT-4o, Claude-3.5와 같은 최신 대형 모델을 지원합니다",
 | 
			
		||||
          "NextChat에 의해 공식적으로 유지 관리되며, 제로 구성으로 즉시 사용할 수 있으며, OpenAI o1, GPT-4o, Claude-3.5와 같은 최신 대형 모델을 지원합니다",
 | 
			
		||||
        ChatNow: "지금 채팅하기",
 | 
			
		||||
      },
 | 
			
		||||
 | 
			
		||||
@@ -416,22 +395,6 @@ const ko: PartialLocaleType = {
 | 
			
		||||
          SubTitle: "커스터마이즈는 .env에서 설정",
 | 
			
		||||
        },
 | 
			
		||||
      },
 | 
			
		||||
      Tencent: {
 | 
			
		||||
        ApiKey: {
 | 
			
		||||
          Title: "Tencent API 키",
 | 
			
		||||
          SubTitle: "커스텀 Tencent API 키 사용",
 | 
			
		||||
          Placeholder: "Tencent API 키",
 | 
			
		||||
        },
 | 
			
		||||
        SecretKey: {
 | 
			
		||||
          Title: "Tencent Secret 키",
 | 
			
		||||
          SubTitle: "커스텀 Tencent Secret 키 사용",
 | 
			
		||||
          Placeholder: "Tencent Secret 키",
 | 
			
		||||
        },
 | 
			
		||||
        Endpoint: {
 | 
			
		||||
          Title: "엔드포인트 주소",
 | 
			
		||||
          SubTitle: "지원되지 않음, .env에서 설정",
 | 
			
		||||
        },
 | 
			
		||||
      },
 | 
			
		||||
      ByteDance: {
 | 
			
		||||
        ApiKey: {
 | 
			
		||||
          Title: "엔드포인트 키",
 | 
			
		||||
@@ -454,103 +417,10 @@ const ko: PartialLocaleType = {
 | 
			
		||||
          SubTitle: "예: ",
 | 
			
		||||
        },
 | 
			
		||||
      },
 | 
			
		||||
      Moonshot: {
 | 
			
		||||
        ApiKey: {
 | 
			
		||||
          Title: "Moonshot API 키",
 | 
			
		||||
          SubTitle: "커스텀 Moonshot API 키 사용",
 | 
			
		||||
          Placeholder: "Moonshot API 키",
 | 
			
		||||
        },
 | 
			
		||||
        Endpoint: {
 | 
			
		||||
          Title: "엔드포인트 주소",
 | 
			
		||||
          SubTitle: "예: ",
 | 
			
		||||
        },
 | 
			
		||||
      },
 | 
			
		||||
      DeepSeek: {
 | 
			
		||||
        ApiKey: {
 | 
			
		||||
          Title: "DeepSeek API 키",
 | 
			
		||||
          SubTitle: "커스텀 DeepSeek API 키 사용",
 | 
			
		||||
          Placeholder: "DeepSeek API 키",
 | 
			
		||||
        },
 | 
			
		||||
        Endpoint: {
 | 
			
		||||
          Title: "엔드포인트 주소",
 | 
			
		||||
          SubTitle: "예: ",
 | 
			
		||||
        },
 | 
			
		||||
      },
 | 
			
		||||
      XAI: {
 | 
			
		||||
        ApiKey: {
 | 
			
		||||
          Title: "XAI API 키",
 | 
			
		||||
          SubTitle: "커스텀 XAI API 키 사용",
 | 
			
		||||
          Placeholder: "XAI API 키",
 | 
			
		||||
        },
 | 
			
		||||
        Endpoint: {
 | 
			
		||||
          Title: "엔드포인트 주소",
 | 
			
		||||
          SubTitle: "예: ",
 | 
			
		||||
        },
 | 
			
		||||
      },
 | 
			
		||||
      ChatGLM: {
 | 
			
		||||
        ApiKey: {
 | 
			
		||||
          Title: "ChatGLM API 키",
 | 
			
		||||
          SubTitle: "커스텀 ChatGLM API 키 사용",
 | 
			
		||||
          Placeholder: "ChatGLM API 키",
 | 
			
		||||
        },
 | 
			
		||||
        Endpoint: {
 | 
			
		||||
          Title: "엔드포인트 주소",
 | 
			
		||||
          SubTitle: "예: ",
 | 
			
		||||
        },
 | 
			
		||||
      },
 | 
			
		||||
      SiliconFlow: {
 | 
			
		||||
        ApiKey: {
 | 
			
		||||
          Title: "SiliconFlow API 키",
 | 
			
		||||
          SubTitle: "커스텀 SiliconFlow API 키 사용",
 | 
			
		||||
          Placeholder: "SiliconFlow API 키",
 | 
			
		||||
        },
 | 
			
		||||
        Endpoint: {
 | 
			
		||||
          Title: "엔드포인트 주소",
 | 
			
		||||
          SubTitle: "예: ",
 | 
			
		||||
        },
 | 
			
		||||
      },
 | 
			
		||||
      Stability: {
 | 
			
		||||
        ApiKey: {
 | 
			
		||||
          Title: "Stability API 키",
 | 
			
		||||
          SubTitle: "커스텀 Stability API 키 사용",
 | 
			
		||||
          Placeholder: "Stability API 키",
 | 
			
		||||
        },
 | 
			
		||||
        Endpoint: {
 | 
			
		||||
          Title: "엔드포인트 주소",
 | 
			
		||||
          SubTitle: "예: ",
 | 
			
		||||
        },
 | 
			
		||||
      },
 | 
			
		||||
      Iflytek: {
 | 
			
		||||
        ApiKey: {
 | 
			
		||||
          Title: "Iflytek API 키",
 | 
			
		||||
          SubTitle: "커스텀 Iflytek API 키 사용",
 | 
			
		||||
          Placeholder: "Iflytek API 키",
 | 
			
		||||
        },
 | 
			
		||||
        ApiSecret: {
 | 
			
		||||
          Title: "Iflytek API Secret",
 | 
			
		||||
          SubTitle: "커스텀 Iflytek API Secret 키 사용",
 | 
			
		||||
          Placeholder: "Iflytek API Secret 키",
 | 
			
		||||
        },
 | 
			
		||||
        Endpoint: {
 | 
			
		||||
          Title: "엔드포인트 주소",
 | 
			
		||||
          SubTitle: "예: ",
 | 
			
		||||
        },
 | 
			
		||||
      },
 | 
			
		||||
      CustomModel: {
 | 
			
		||||
        Title: "커스텀 모델 이름",
 | 
			
		||||
        SubTitle: "커스텀 모델 옵션 추가, 영어 쉼표로 구분",
 | 
			
		||||
      },
 | 
			
		||||
      AI302: {
 | 
			
		||||
        ApiKey: {
 | 
			
		||||
          Title: "엔드포인트 키",
 | 
			
		||||
          SubTitle: "커스텀 302.AI API 키 사용",
 | 
			
		||||
          Placeholder: "302.AI API 키",
 | 
			
		||||
        },
 | 
			
		||||
        Endpoint: {
 | 
			
		||||
          Title: "엔드포인트 주소",
 | 
			
		||||
          SubTitle: "예: ",
 | 
			
		||||
        },
 | 
			
		||||
      },
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    Model: "모델 (model)",
 | 
			
		||||
@@ -578,67 +448,13 @@ const ko: PartialLocaleType = {
 | 
			
		||||
      Title: "빈도 벌점 (frequency_penalty)",
 | 
			
		||||
      SubTitle: "값이 클수록 중복 단어 감소 가능성 높음",
 | 
			
		||||
    },
 | 
			
		||||
    TTS: {
 | 
			
		||||
      Enable: {
 | 
			
		||||
        Title: "TTS 활성화",
 | 
			
		||||
        SubTitle: "TTS 서비스 활성화",
 | 
			
		||||
      },
 | 
			
		||||
      Autoplay: {
 | 
			
		||||
        Title: "자동 재생 활성화",
 | 
			
		||||
        SubTitle:
 | 
			
		||||
          "자동으로 음성을 생성하고 재생, 먼저 TTS 스위치를 활성화해야 함",
 | 
			
		||||
      },
 | 
			
		||||
      Model: "모델",
 | 
			
		||||
      Voice: {
 | 
			
		||||
        Title: "음성",
 | 
			
		||||
        SubTitle: "음성을 생성할 때 사용할 음성",
 | 
			
		||||
      },
 | 
			
		||||
      Speed: {
 | 
			
		||||
        Title: "속도",
 | 
			
		||||
        SubTitle: "생성된 음성의 속도",
 | 
			
		||||
      },
 | 
			
		||||
      Engine: "TTS Engine",
 | 
			
		||||
    },
 | 
			
		||||
    Realtime: {
 | 
			
		||||
      Enable: {
 | 
			
		||||
        Title: "실시간 채팅",
 | 
			
		||||
        SubTitle: "실시간 채팅 기능 활성화",
 | 
			
		||||
      },
 | 
			
		||||
      Provider: {
 | 
			
		||||
        Title: "모델 제공업체",
 | 
			
		||||
        SubTitle: "다른 제공업체 간 전환",
 | 
			
		||||
      },
 | 
			
		||||
      Model: {
 | 
			
		||||
        Title: "모델",
 | 
			
		||||
        SubTitle: "모델 선택",
 | 
			
		||||
      },
 | 
			
		||||
      ApiKey: {
 | 
			
		||||
        Title: "API 키",
 | 
			
		||||
        SubTitle: "API 키",
 | 
			
		||||
        Placeholder: "API 키",
 | 
			
		||||
      },
 | 
			
		||||
      Azure: {
 | 
			
		||||
        Endpoint: {
 | 
			
		||||
          Title: "엔드포인트",
 | 
			
		||||
          SubTitle: "엔드포인트",
 | 
			
		||||
        },
 | 
			
		||||
        Deployment: {
 | 
			
		||||
          Title: "배포 이름",
 | 
			
		||||
          SubTitle: "배포 이름",
 | 
			
		||||
        },
 | 
			
		||||
      },
 | 
			
		||||
      Temperature: {
 | 
			
		||||
        Title: "무작위성 (temperature)",
 | 
			
		||||
        SubTitle: "값이 클수록 응답이 더 무작위적",
 | 
			
		||||
      },
 | 
			
		||||
    },
 | 
			
		||||
  },
 | 
			
		||||
  Store: {
 | 
			
		||||
    DefaultTopic: "새 채팅",
 | 
			
		||||
    BotHello: "무엇을 도와드릴까요?",
 | 
			
		||||
    Error: "오류가 발생했습니다. 나중에 다시 시도해 주세요.",
 | 
			
		||||
    Prompt: {
 | 
			
		||||
      History: (content: string) => "이전 채팅 요약: " + content,
 | 
			
		||||
      History: (content: string) => "이것은 이전 채팅 요약입니다: " + content,
 | 
			
		||||
      Topic:
 | 
			
		||||
        "네 글자에서 다섯 글자로 이 문장의 간략한 주제를 반환하세요. 설명이나 문장 부호, 어미, 불필요한 텍스트, 굵은 글씨는 필요 없습니다. 주제가 없다면 '잡담'이라고만 반환하세요.",
 | 
			
		||||
      Summarize:
 | 
			
		||||
@@ -660,11 +476,8 @@ const ko: PartialLocaleType = {
 | 
			
		||||
    Clear: "컨텍스트가 지워졌습니다.",
 | 
			
		||||
    Revert: "컨텍스트 복원",
 | 
			
		||||
  },
 | 
			
		||||
  Discovery: {
 | 
			
		||||
    Name: "디스커버리",
 | 
			
		||||
  },
 | 
			
		||||
  Mcp: {
 | 
			
		||||
    Name: "MCP 플러그인",
 | 
			
		||||
  Plugin: {
 | 
			
		||||
    Name: "플러그인",
 | 
			
		||||
  },
 | 
			
		||||
  FineTuned: {
 | 
			
		||||
    Sysmessage: "당신은 보조자입니다.",
 | 
			
		||||
@@ -676,7 +489,7 @@ const ko: PartialLocaleType = {
 | 
			
		||||
      Search: "검색어 입력",
 | 
			
		||||
      NoResult: "결과를 찾을 수 없습니다",
 | 
			
		||||
      NoData: "데이터가 없습니다",
 | 
			
		||||
      Loading: "로딩 중...",
 | 
			
		||||
      Loading: "로딩 중",
 | 
			
		||||
 | 
			
		||||
      SubTitle: (count: number) => `${count}개의 결과를 찾았습니다`,
 | 
			
		||||
    },
 | 
			
		||||
@@ -684,47 +497,6 @@ const ko: PartialLocaleType = {
 | 
			
		||||
      View: "보기",
 | 
			
		||||
    },
 | 
			
		||||
  },
 | 
			
		||||
  Plugin: {
 | 
			
		||||
    Name: "플러그인",
 | 
			
		||||
    Page: {
 | 
			
		||||
      Title: "플러그인",
 | 
			
		||||
      SubTitle: (count: number) => `${count} 개의 플러그인`,
 | 
			
		||||
      Search: "플러그인 검색",
 | 
			
		||||
      Create: "새로 만들기",
 | 
			
		||||
      Find: "github에서 멋진 플러그인을 찾을 수 있습니다: ",
 | 
			
		||||
    },
 | 
			
		||||
    Item: {
 | 
			
		||||
      Info: (count: number) => `${count} 개의 메서드`,
 | 
			
		||||
      View: "보기",
 | 
			
		||||
      Edit: "편집",
 | 
			
		||||
      Delete: "삭제",
 | 
			
		||||
      DeleteConfirm: "삭제하시겠습니까?",
 | 
			
		||||
    },
 | 
			
		||||
    Auth: {
 | 
			
		||||
      None: "없음",
 | 
			
		||||
      Basic: "기본",
 | 
			
		||||
      Bearer: "Bearer",
 | 
			
		||||
      Custom: "커스텀",
 | 
			
		||||
      CustomHeader: "파라미터 이름",
 | 
			
		||||
      Token: "토큰",
 | 
			
		||||
      Proxy: "프록시 사용",
 | 
			
		||||
      ProxyDescription: "CORS 오류 해결을 위해 프록시 사용",
 | 
			
		||||
      Location: "위치",
 | 
			
		||||
      LocationHeader: "헤더",
 | 
			
		||||
      LocationQuery: "쿼리",
 | 
			
		||||
      LocationBody: "바디",
 | 
			
		||||
    },
 | 
			
		||||
    EditModal: {
 | 
			
		||||
      Title: (readonly: boolean) =>
 | 
			
		||||
        `플러그인 편집 ${readonly ? "(읽기 전용)" : ""}`,
 | 
			
		||||
      Download: "다운로드",
 | 
			
		||||
      Auth: "인증 유형",
 | 
			
		||||
      Content: "OpenAPI Schema",
 | 
			
		||||
      Load: "URL에서 로드",
 | 
			
		||||
      Method: "메서드",
 | 
			
		||||
      Error: "OpenAPI Schema 오류",
 | 
			
		||||
    },
 | 
			
		||||
  },
 | 
			
		||||
  Mask: {
 | 
			
		||||
    Name: "마스크",
 | 
			
		||||
    Page: {
 | 
			
		||||
@@ -804,61 +576,6 @@ const ko: PartialLocaleType = {
 | 
			
		||||
    Topic: "주제",
 | 
			
		||||
    Time: "시간",
 | 
			
		||||
  },
 | 
			
		||||
  SdPanel: {
 | 
			
		||||
    Prompt: "프롬프트",
 | 
			
		||||
    NegativePrompt: "부정적 프롬프트",
 | 
			
		||||
    PleaseInput: (name: string) => `${name}을 입력하세요`,
 | 
			
		||||
    AspectRatio: "비율",
 | 
			
		||||
    ImageStyle: "이미지 스타일",
 | 
			
		||||
    OutFormat: "출력 형식",
 | 
			
		||||
    AIModel: "AI 모델",
 | 
			
		||||
    ModelVersion: "모델 버전",
 | 
			
		||||
    Submit: "제출",
 | 
			
		||||
    ParamIsRequired: (name: string) => `${name}은 필수 입력 항목입니다`,
 | 
			
		||||
    Styles: {
 | 
			
		||||
      D3Model: "3d-model",
 | 
			
		||||
      AnalogFilm: "analog-film",
 | 
			
		||||
      Anime: "anime",
 | 
			
		||||
      Cinematic: "cinematic",
 | 
			
		||||
      ComicBook: "comic-book",
 | 
			
		||||
      DigitalArt: "digital-art",
 | 
			
		||||
      Enhance: "enhance",
 | 
			
		||||
      FantasyArt: "fantasy-art",
 | 
			
		||||
      Isometric: "isometric",
 | 
			
		||||
      LineArt: "line-art",
 | 
			
		||||
      LowPoly: "low-poly",
 | 
			
		||||
      ModelingCompound: "modeling-compound",
 | 
			
		||||
      NeonPunk: "neon-punk",
 | 
			
		||||
      Origami: "origami",
 | 
			
		||||
      Photographic: "photographic",
 | 
			
		||||
      PixelArt: "pixel-art",
 | 
			
		||||
      TileTexture: "tile-texture",
 | 
			
		||||
    },
 | 
			
		||||
  },
 | 
			
		||||
  Sd: {
 | 
			
		||||
    SubTitle: (count: number) => `${count} 개의 이미지`,
 | 
			
		||||
    Actions: {
 | 
			
		||||
      Params: "파라미터 보기",
 | 
			
		||||
      Copy: "프롬프트 복사",
 | 
			
		||||
      Delete: "삭제",
 | 
			
		||||
      Retry: "다시 시도",
 | 
			
		||||
      ReturnHome: "홈으로 돌아가기",
 | 
			
		||||
      History: "기록",
 | 
			
		||||
    },
 | 
			
		||||
    EmptyRecord: "아직 이미지가 없습니다",
 | 
			
		||||
    Status: {
 | 
			
		||||
      Name: "상태",
 | 
			
		||||
      Success: "성공",
 | 
			
		||||
      Error: "오류",
 | 
			
		||||
      Wait: "대기",
 | 
			
		||||
      Running: "실행 중",
 | 
			
		||||
    },
 | 
			
		||||
    Danger: {
 | 
			
		||||
      Delete: "삭제하시겠습니까?",
 | 
			
		||||
    },
 | 
			
		||||
    GenerateParams: "파라미터 생성",
 | 
			
		||||
    Detail: "상세",
 | 
			
		||||
  },
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
export default ko;
 | 
			
		||||
 
 | 
			
		||||
@@ -433,17 +433,6 @@ const no: PartialLocaleType = {
 | 
			
		||||
        Title: "Egendefinert modellnavn",
 | 
			
		||||
        SubTitle: "Legg til egendefinerte modellalternativer, skill med komma",
 | 
			
		||||
      },
 | 
			
		||||
      AI302: {
 | 
			
		||||
        ApiKey: {
 | 
			
		||||
          Title: "API-nøkkel",
 | 
			
		||||
          SubTitle: "Bruk egendefinert 302.AI API-nøkkel",
 | 
			
		||||
          Placeholder: "302.AI API-nøkkel",
 | 
			
		||||
        },
 | 
			
		||||
        Endpoint: {
 | 
			
		||||
          Title: "API-adresse",
 | 
			
		||||
          SubTitle: "Eksempel:",
 | 
			
		||||
        },
 | 
			
		||||
      },
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    Model: "Modell",
 | 
			
		||||
 
 | 
			
		||||
@@ -359,17 +359,6 @@ const pt: PartialLocaleType = {
 | 
			
		||||
          SubTitle: "Verifique sua versão API do console Anthropic",
 | 
			
		||||
        },
 | 
			
		||||
      },
 | 
			
		||||
      AI302: {
 | 
			
		||||
        ApiKey: {
 | 
			
		||||
          Title: "Chave API 302.AI",
 | 
			
		||||
          SubTitle: "Use uma chave API 302.AI personalizada",
 | 
			
		||||
          Placeholder: "302.AI API Key",
 | 
			
		||||
        },
 | 
			
		||||
        Endpoint: {
 | 
			
		||||
          Title: "Endpoint Address",
 | 
			
		||||
          SubTitle: "Exemplo: ",
 | 
			
		||||
        },
 | 
			
		||||
      },
 | 
			
		||||
      CustomModel: {
 | 
			
		||||
        Title: "Modelos Personalizados",
 | 
			
		||||
        SubTitle: "Opções de modelo personalizado, separados por vírgula",
 | 
			
		||||
 
 | 
			
		||||
@@ -426,17 +426,6 @@ const ru: PartialLocaleType = {
 | 
			
		||||
          SubTitle: "Пример:",
 | 
			
		||||
        },
 | 
			
		||||
      },
 | 
			
		||||
      AI302: {
 | 
			
		||||
        ApiKey: {
 | 
			
		||||
          Title: "Ключ интерфейса",
 | 
			
		||||
          SubTitle: "Использовать пользовательский 302.AI API-ключ",
 | 
			
		||||
          Placeholder: "302.AI API-ключ",
 | 
			
		||||
        },
 | 
			
		||||
        Endpoint: {
 | 
			
		||||
          Title: "Адрес интерфейса",
 | 
			
		||||
          SubTitle: "Пример:",
 | 
			
		||||
        },
 | 
			
		||||
      },
 | 
			
		||||
      CustomModel: {
 | 
			
		||||
        Title: "Название пользовательской модели",
 | 
			
		||||
        SubTitle:
 | 
			
		||||
 
 | 
			
		||||
@@ -381,17 +381,6 @@ const sk: PartialLocaleType = {
 | 
			
		||||
          SubTitle: "Vyberte špecifickú verziu časti",
 | 
			
		||||
        },
 | 
			
		||||
      },
 | 
			
		||||
      AI302: {
 | 
			
		||||
        ApiKey: {
 | 
			
		||||
          Title: "API kľúč",
 | 
			
		||||
          SubTitle: "Použiť vlastný API kľúč 302.AI",
 | 
			
		||||
          Placeholder: "302.AI API kľúč",
 | 
			
		||||
        },
 | 
			
		||||
        Endpoint: {
 | 
			
		||||
          Title: "Adresa koncového bodu",
 | 
			
		||||
          SubTitle: "Príklad:",
 | 
			
		||||
        },
 | 
			
		||||
      },
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    Model: "Model",
 | 
			
		||||
 
 | 
			
		||||
@@ -426,17 +426,6 @@ const tr: PartialLocaleType = {
 | 
			
		||||
          SubTitle: "Örnek:",
 | 
			
		||||
        },
 | 
			
		||||
      },
 | 
			
		||||
      AI302: {
 | 
			
		||||
        ApiKey: {
 | 
			
		||||
          Title: "API Anahtarı",
 | 
			
		||||
          SubTitle: "Özelleştirilmiş 302.AI API Anahtarı kullanın",
 | 
			
		||||
          Placeholder: "302.AI API Anahtarı",
 | 
			
		||||
        },
 | 
			
		||||
        Endpoint: {
 | 
			
		||||
          Title: "API Adresi",
 | 
			
		||||
          SubTitle: "Örnek:",
 | 
			
		||||
        },
 | 
			
		||||
      },
 | 
			
		||||
      CustomModel: {
 | 
			
		||||
        Title: "Özelleştirilmiş Model Adı",
 | 
			
		||||
        SubTitle:
 | 
			
		||||
 
 | 
			
		||||
@@ -382,17 +382,6 @@ const tw = {
 | 
			
		||||
          SubTitle: "選擇一個特定的 API 版本",
 | 
			
		||||
        },
 | 
			
		||||
      },
 | 
			
		||||
      AI302: {
 | 
			
		||||
        ApiKey: {
 | 
			
		||||
          Title: "API 金鑰",
 | 
			
		||||
          SubTitle: "使用自訂 302.AI API 金鑰",
 | 
			
		||||
          Placeholder: "302.AI API 金鑰",
 | 
			
		||||
        },
 | 
			
		||||
        Endpoint: {
 | 
			
		||||
          Title: "端點位址",
 | 
			
		||||
          SubTitle: "範例:",
 | 
			
		||||
        },
 | 
			
		||||
      },
 | 
			
		||||
      CustomModel: {
 | 
			
		||||
        Title: "自訂模型名稱",
 | 
			
		||||
        SubTitle: "增加自訂模型可選擇項目,使用英文逗號隔開",
 | 
			
		||||
 
 | 
			
		||||
@@ -422,17 +422,6 @@ const vi: PartialLocaleType = {
 | 
			
		||||
          SubTitle: "Ví dụ:",
 | 
			
		||||
        },
 | 
			
		||||
      },
 | 
			
		||||
      AI302: {
 | 
			
		||||
        ApiKey: {
 | 
			
		||||
          Title: "Khóa API 302.AI",
 | 
			
		||||
          SubTitle: "Sử dụng khóa API 302.AI tùy chỉnh",
 | 
			
		||||
          Placeholder: "302.AI API Key",
 | 
			
		||||
        },
 | 
			
		||||
        Endpoint: {
 | 
			
		||||
          Title: "Địa chỉ giao diện",
 | 
			
		||||
          SubTitle: "Ví dụ:",
 | 
			
		||||
        },
 | 
			
		||||
      },
 | 
			
		||||
      CustomModel: {
 | 
			
		||||
        Title: "Tên mô hình tùy chỉnh",
 | 
			
		||||
        SubTitle:
 | 
			
		||||
 
 | 
			
		||||
@@ -17,7 +17,6 @@ import {
 | 
			
		||||
  XAI_BASE_URL,
 | 
			
		||||
  CHATGLM_BASE_URL,
 | 
			
		||||
  SILICONFLOW_BASE_URL,
 | 
			
		||||
  AI302_BASE_URL,
 | 
			
		||||
} from "../constant";
 | 
			
		||||
import { getHeaders } from "../client/api";
 | 
			
		||||
import { getClientConfig } from "../config/client";
 | 
			
		||||
@@ -60,8 +59,6 @@ const DEFAULT_SILICONFLOW_URL = isApp
 | 
			
		||||
  ? SILICONFLOW_BASE_URL
 | 
			
		||||
  : ApiPath.SiliconFlow;
 | 
			
		||||
 | 
			
		||||
const DEFAULT_AI302_URL = isApp ? AI302_BASE_URL : ApiPath["302.AI"];
 | 
			
		||||
 | 
			
		||||
const DEFAULT_ACCESS_STATE = {
 | 
			
		||||
  accessCode: "",
 | 
			
		||||
  useCustomConfig: false,
 | 
			
		||||
@@ -135,10 +132,6 @@ const DEFAULT_ACCESS_STATE = {
 | 
			
		||||
  siliconflowUrl: DEFAULT_SILICONFLOW_URL,
 | 
			
		||||
  siliconflowApiKey: "",
 | 
			
		||||
 | 
			
		||||
  // 302.AI
 | 
			
		||||
  ai302Url: DEFAULT_AI302_URL,
 | 
			
		||||
  ai302ApiKey: "",
 | 
			
		||||
 | 
			
		||||
  // server config
 | 
			
		||||
  needCode: true,
 | 
			
		||||
  hideUserApiKey: false,
 | 
			
		||||
 
 | 
			
		||||
@@ -34,6 +34,6 @@
 | 
			
		||||
12. "저장 후 배포"를 클릭합니다.
 | 
			
		||||
13. 호환성 플래그를 입력해야 하므로 "배포 취소"를 클릭합니다.
 | 
			
		||||
14. "빌드 설정", "기능"으로 이동하여 "호환성 플래그"를 찾습니다.
 | 
			
		||||
15. "프로덕션 호환성 플래그 구성" 및 "프리뷰 호환성 플래그 구성"에서 "nodejs_compat"를 입력합니다.
 | 
			
		||||
"프로덕션 호환성 플래그 구성" 및 "프리뷰 호환성 플래그 구성"에서 "nodejs_compat"를 입력합니다.
 | 
			
		||||
16. "배포"로 이동하여 "배포 다시 시도"를 클릭합니다.
 | 
			
		||||
17. 즐기세요!
 | 
			
		||||
@@ -9,7 +9,7 @@
 | 
			
		||||
3. 프로젝트를 선택합니다.
 | 
			
		||||
 | 
			
		||||

 | 
			
		||||
1. Git 리포지토리 가져오기에서 chatgpt-next-web을 검색합니다.
 | 
			
		||||
1. Git 리포지토리 가져오기에서 chatgpt-next-web을 검색합니다. 2. 새 포크를 선택합니다;
 | 
			
		||||
2. 새로 포크된 프로젝트를 선택하고 가져오기를 클릭합니다.
 | 
			
		||||
 | 
			
		||||

 | 
			
		||||
 
 | 
			
		||||
@@ -56,7 +56,7 @@
 | 
			
		||||
    "spark-md5": "^3.0.2",
 | 
			
		||||
    "use-debounce": "^9.0.4",
 | 
			
		||||
    "zod": "^3.24.1",
 | 
			
		||||
    "zustand": "^5.0.8"
 | 
			
		||||
    "zustand": "^4.3.8"
 | 
			
		||||
  },
 | 
			
		||||
  "devDependencies": {
 | 
			
		||||
    "@tauri-apps/api": "^2.1.1",
 | 
			
		||||
 
 | 
			
		||||
@@ -2,16 +2,16 @@
 | 
			
		||||
  {
 | 
			
		||||
    "id": "dalle3",
 | 
			
		||||
    "name": "Dalle3",
 | 
			
		||||
    "schema": "https://ghp.ci/https://raw.githubusercontent.com/ChatGPTNextWeb/NextChat-Awesome-Plugins/main/plugins/dalle/openapi.json"
 | 
			
		||||
    "schema": "https://cdn.jsdelivr.net/gh/ChatGPTNextWeb/NextChat-Awesome-Plugins@main/plugins/dalle/openapi.json"
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    "id": "arxivsearch",
 | 
			
		||||
    "name": "ArxivSearch",
 | 
			
		||||
    "schema": "https://ghp.ci/https://raw.githubusercontent.com/ChatGPTNextWeb/NextChat-Awesome-Plugins/main/plugins/arxivsearch/openapi.json"
 | 
			
		||||
    "schema": "https://cdn.jsdelivr.net/gh/ChatGPTNextWeb/NextChat-Awesome-Plugins@main/plugins/arxivsearch/openapi.json"
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    "id": "duckduckgolite",
 | 
			
		||||
    "name": "DuckDuckGoLiteSearch",
 | 
			
		||||
    "schema": "https://ghp.ci/https://raw.githubusercontent.com/ChatGPTNextWeb/NextChat-Awesome-Plugins/main/plugins/duckduckgolite/openapi.json"
 | 
			
		||||
    "schema": "https://cdn.jsdelivr.net/gh/ChatGPTNextWeb/NextChat-Awesome-Plugins@main/plugins/duckduckgolite/openapi.json"
 | 
			
		||||
  }
 | 
			
		||||
]
 | 
			
		||||
 
 | 
			
		||||
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							@@ -1,14 +1,13 @@
 | 
			
		||||
import fetch from "node-fetch";
 | 
			
		||||
import fs from "fs/promises";
 | 
			
		||||
 | 
			
		||||
const RAW_FILE_URL = "https://raw.githubusercontent.com/";
 | 
			
		||||
const MIRRORF_FILE_URL = "http://raw.fgit.ml/";
 | 
			
		||||
const MIRRORF_FILE_URL = "https://cdn.jsdelivr.net/gh/";
 | 
			
		||||
 | 
			
		||||
const RAW_CN_URL = "PlexPt/awesome-chatgpt-prompts-zh/main/prompts-zh.json";
 | 
			
		||||
const RAW_CN_URL = "PlexPt/awesome-chatgpt-prompts-zh@main/prompts-zh.json";
 | 
			
		||||
const CN_URL = MIRRORF_FILE_URL + RAW_CN_URL;
 | 
			
		||||
const RAW_TW_URL = "PlexPt/awesome-chatgpt-prompts-zh/main/prompts-zh-TW.json";
 | 
			
		||||
const RAW_TW_URL = "PlexPt/awesome-chatgpt-prompts-zh@main/prompts-zh-TW.json";
 | 
			
		||||
const TW_URL = MIRRORF_FILE_URL + RAW_TW_URL;
 | 
			
		||||
const RAW_EN_URL = "f/awesome-chatgpt-prompts/main/prompts.csv";
 | 
			
		||||
const RAW_EN_URL = "f/awesome-chatgpt-prompts@main/prompts.csv";
 | 
			
		||||
const EN_URL = MIRRORF_FILE_URL + RAW_EN_URL;
 | 
			
		||||
const FILE = "./public/prompts.json";
 | 
			
		||||
 | 
			
		||||
@@ -84,11 +83,11 @@ async function fetchEN() {
 | 
			
		||||
async function main() {
 | 
			
		||||
  Promise.all([fetchCN(), fetchTW(), fetchEN()])
 | 
			
		||||
    .then(([cn, tw, en]) => {
 | 
			
		||||
      fs.writeFile(FILE, JSON.stringify({ cn, tw, en }));
 | 
			
		||||
      fs.writeFile(FILE, JSON.stringify({ cn, tw, en }, null, 2));
 | 
			
		||||
    })
 | 
			
		||||
    .catch((e) => {
 | 
			
		||||
      console.error("[Fetch] failed to fetch prompts");
 | 
			
		||||
      fs.writeFile(FILE, JSON.stringify({ cn: [], tw: [], en: [] }));
 | 
			
		||||
      fs.writeFile(FILE, JSON.stringify({ cn: [], tw: [], en: [] }, null, 2));
 | 
			
		||||
    })
 | 
			
		||||
    .finally(() => {
 | 
			
		||||
      console.log("[Fetch] saved to " + FILE);
 | 
			
		||||
 
 | 
			
		||||
@@ -9,7 +9,7 @@
 | 
			
		||||
  },
 | 
			
		||||
  "package": {
 | 
			
		||||
    "productName": "NextChat",
 | 
			
		||||
    "version": "2.16.1"
 | 
			
		||||
    "version": "2.15.8"
 | 
			
		||||
  },
 | 
			
		||||
  "tauri": {
 | 
			
		||||
    "allowlist": {
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										24
									
								
								yarn.lock
									
									
									
									
									
								
							
							
						
						
									
										24
									
								
								yarn.lock
									
									
									
									
									
								
							@@ -3077,9 +3077,9 @@ camelcase@^6.2.0:
 | 
			
		||||
  integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==
 | 
			
		||||
 | 
			
		||||
caniuse-lite@^1.0.30001449, caniuse-lite@^1.0.30001503, caniuse-lite@^1.0.30001579, caniuse-lite@^1.0.30001646:
 | 
			
		||||
  version "1.0.30001724"
 | 
			
		||||
  resolved "https://mirrors.huaweicloud.com/repository/npm/caniuse-lite/-/caniuse-lite-1.0.30001724.tgz"
 | 
			
		||||
  integrity sha512-WqJo7p0TbHDOythNTqYujmaJTvtYRZrjpP8TCvH6Vb9CYJerJNKamKzIWOM4BkQatWj9H2lYulpdAQNBe7QhNA==
 | 
			
		||||
  version "1.0.30001692"
 | 
			
		||||
  resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001692.tgz"
 | 
			
		||||
  integrity sha512-A95VKan0kdtrsnMubMKxEKUKImOPSuCpYgxSQBo036P5YYgVIcOYJEgt/txJWqObiRQeISNCfef9nvlQ0vbV7A==
 | 
			
		||||
 | 
			
		||||
ccount@^2.0.0:
 | 
			
		||||
  version "2.0.1"
 | 
			
		||||
@@ -4334,14 +4334,14 @@ eslint-plugin-react@^7.31.7:
 | 
			
		||||
 | 
			
		||||
eslint-plugin-unused-imports@^3.2.0:
 | 
			
		||||
  version "3.2.0"
 | 
			
		||||
  resolved "https://mirrors.huaweicloud.com/repository/npm/eslint-plugin-unused-imports/-/eslint-plugin-unused-imports-3.2.0.tgz#63a98c9ad5f622cd9f830f70bc77739f25ccfe0d"
 | 
			
		||||
  resolved "https://registry.yarnpkg.com/eslint-plugin-unused-imports/-/eslint-plugin-unused-imports-3.2.0.tgz#63a98c9ad5f622cd9f830f70bc77739f25ccfe0d"
 | 
			
		||||
  integrity sha512-6uXyn6xdINEpxE1MtDjxQsyXB37lfyO2yKGVVgtD7WEWQGORSOZjgrD6hBhvGv4/SO+TOlS+UnC6JppRqbuwGQ==
 | 
			
		||||
  dependencies:
 | 
			
		||||
    eslint-rule-composer "^0.3.0"
 | 
			
		||||
 | 
			
		||||
eslint-rule-composer@^0.3.0:
 | 
			
		||||
  version "0.3.0"
 | 
			
		||||
  resolved "https://mirrors.huaweicloud.com/repository/npm/eslint-rule-composer/-/eslint-rule-composer-0.3.0.tgz#79320c927b0c5c0d3d3d2b76c8b4a488f25bbaf9"
 | 
			
		||||
  resolved "https://registry.yarnpkg.com/eslint-rule-composer/-/eslint-rule-composer-0.3.0.tgz#79320c927b0c5c0d3d3d2b76c8b4a488f25bbaf9"
 | 
			
		||||
  integrity sha512-bt+Sh8CtDmn2OajxvNO+BX7Wn4CIWMpTRm3MaiKPCQcnnlm0CS2mhui6QaoeQugs+3Kj2ESKEEGJUdVafwhiCg==
 | 
			
		||||
 | 
			
		||||
eslint-scope@5.1.1:
 | 
			
		||||
@@ -8156,7 +8156,7 @@ typed-array-length@^1.0.4:
 | 
			
		||||
 | 
			
		||||
typescript@5.2.2:
 | 
			
		||||
  version "5.2.2"
 | 
			
		||||
  resolved "https://mirrors.huaweicloud.com/repository/npm/typescript/-/typescript-5.2.2.tgz#5ebb5e5a5b75f085f22bc3f8460fba308310fa78"
 | 
			
		||||
  resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.2.2.tgz#5ebb5e5a5b75f085f22bc3f8460fba308310fa78"
 | 
			
		||||
  integrity sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==
 | 
			
		||||
 | 
			
		||||
unbox-primitive@^1.0.2:
 | 
			
		||||
@@ -8328,7 +8328,7 @@ use-memo-one@^1.1.3:
 | 
			
		||||
  resolved "https://registry.npmmirror.com/use-memo-one/-/use-memo-one-1.1.3.tgz#2fd2e43a2169eabc7496960ace8c79efef975e99"
 | 
			
		||||
  integrity sha512-g66/K7ZQGYrI6dy8GLpVcMsBp4s17xNkYJVSMvTEevGy3nDxHOfE6z8BVE22+5G5x7t3+bhzrlTDB7ObrEE0cQ==
 | 
			
		||||
 | 
			
		||||
use-sync-external-store@^1.0.0:
 | 
			
		||||
use-sync-external-store@1.2.0, use-sync-external-store@^1.0.0:
 | 
			
		||||
  version "1.2.0"
 | 
			
		||||
  resolved "https://registry.yarnpkg.com/use-sync-external-store/-/use-sync-external-store-1.2.0.tgz#7dbefd6ef3fe4e767a0cf5d7287aacfb5846928a"
 | 
			
		||||
  integrity sha512-eEgnFxGQ1Ife9bzYs6VLi8/4X6CObHMw9Qr9tPY43iKwsPw8xE8+EFsf/2cFZ5S3esXgpWgtSCtLNS41F+sKPA==
 | 
			
		||||
@@ -8637,10 +8637,12 @@ zod@^3.23.8, zod@^3.24.1:
 | 
			
		||||
  resolved "https://registry.yarnpkg.com/zod/-/zod-3.24.1.tgz#27445c912738c8ad1e9de1bea0359fa44d9d35ee"
 | 
			
		||||
  integrity sha512-muH7gBL9sI1nciMZV67X5fTKKBLtwpZ5VBp1vsOQzj1MhrBZ4wlVCm3gedKZWLp0Oyel8sIGfeiz54Su+OVT+A==
 | 
			
		||||
 | 
			
		||||
zustand@^5.0.8:
 | 
			
		||||
  version "5.0.8"
 | 
			
		||||
  resolved "https://registry.yarnpkg.com/zustand/-/zustand-5.0.8.tgz#b998a0c088c7027a20f2709141a91cb07ac57f8a"
 | 
			
		||||
  integrity sha512-gyPKpIaxY9XcO2vSMrLbiER7QMAMGOQZVRdJ6Zi782jkbzZygq5GI9nG8g+sMgitRtndwaBSl7uiqC49o1SSiw==
 | 
			
		||||
zustand@^4.3.8:
 | 
			
		||||
  version "4.3.8"
 | 
			
		||||
  resolved "https://registry.yarnpkg.com/zustand/-/zustand-4.3.8.tgz#37113df8e9e1421b0be1b2dca02b49b76210e7c4"
 | 
			
		||||
  integrity sha512-4h28KCkHg5ii/wcFFJ5Fp+k1J3gJoasaIbppdgZFO4BPJnsNxL0mQXBSFgOgAdCdBj35aDTPvdAJReTMntFPGg==
 | 
			
		||||
  dependencies:
 | 
			
		||||
    use-sync-external-store "1.2.0"
 | 
			
		||||
 | 
			
		||||
zwitch@^2.0.0:
 | 
			
		||||
  version "2.0.4"
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user