diff --git a/.env.template b/.env.template index 4efaa2ff8..96dedddc8 100644 --- a/.env.template +++ b/.env.template @@ -81,3 +81,9 @@ SILICONFLOW_API_KEY= ### siliconflow Api url (optional) SILICONFLOW_URL= + +### 302.AI Api key (optional) +AI302_API_KEY= + +### 302.AI Api url (optional) +AI302_URL= diff --git a/README.md b/README.md index d0a6b409d..01a223d3b 100644 --- a/README.md +++ b/README.md @@ -4,17 +4,13 @@ icon - - -

NextChat

English / [简体中文](./README_CN.md) ChatGPTNextWeb%2FChatGPT-Next-Web | Trendshift - -✨ 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] @@ -22,41 +18,49 @@ 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.dev) / [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.club) / [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.dev/ +[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 -[Deploy on Zeabur](https://zeabur.com/templates/ZBUEFA) [Deploy on Vercel](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) [Open in Gitpod](https://gitpod.io/#https://github.com/ChatGPTNextWeb/NextChat) +[Deploy on Zeabur](https://zeabur.com/templates/ZBUEFA) [Deploy on Vercel](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) [Open in Gitpod](https://gitpod.io/#https://github.com/ChatGPTNextWeb/NextChat) [](https://monica.im/?utm=nxcrp) +## ❤️ Sponsor AI API + + + icon + + +[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) ![Github iOS Image](https://github.com/user-attachments/assets/e0aa334f-4c13-4dc9-8310-e3b09fa4b9f3) - -## 🫣 NextChat Support MCP ! +## 🫣 NextChat Support MCP ! + > Before build, please set env ENABLE_MCP=true - ## 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. @@ -73,7 +77,6 @@ For enterprise inquiries, please contact: **business@nextchat.dev** ![More](./docs/images/more.png) - ## Features - **Deploy for free with one-click** on Vercel in under 1 minute @@ -109,10 +112,11 @@ 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! @@ -312,10 +316,12 @@ 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) @@ -332,8 +338,9 @@ 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) @@ -348,7 +355,6 @@ Stability API key. Customize Stability API url. - ### `ENABLE_MCP` (optional) Enable MCP(Model Context Protocol)Feature @@ -361,13 +367,20 @@ 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 - [![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](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: @@ -391,7 +404,6 @@ yarn dev ## Deployment - ### Docker (Recommended) ```shell @@ -449,8 +461,6 @@ 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). @@ -461,8 +471,6 @@ If you want to add a new translation, read this [document](./docs/translation.md ## Special Thanks - - ### Contributors diff --git a/README_CN.md b/README_CN.md index 5576231cc..f4c441ad0 100644 --- a/README_CN.md +++ b/README_CN.md @@ -10,13 +10,22 @@ [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) -[Deploy on Zeabur](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) [Deploy on Zeabur](https://zeabur.com/templates/ZBUEFA) [Open in Gitpod](https://gitpod.io/#https://github.com/Yidadaa/ChatGPT-Next-Web) +[Deploy on Zeabur](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) [Deploy on Zeabur](https://zeabur.com/templates/ZBUEFA) [Open in Gitpod](https://gitpod.io/#https://github.com/Yidadaa/ChatGPT-Next-Web) +## Sponsor AI API + + + icon + + +[302.AI](https://302.ai/) 是一个按需付费的AI应用平台,提供市面上最全的AI API和AI在线应用。 + ## 企业版 满足您公司私有化部署和定制需求 + - **品牌定制**:企业量身定制 VI/UI,与企业品牌形象无缝契合 - **资源集成**:由企业管理人员统一配置和管理数十种 AI 资源,团队成员开箱即用 - **权限管理**:成员权限、资源权限、知识库权限层级分明,企业级 Admin Panel 统一控制 @@ -29,7 +38,6 @@ - ## 开始使用 1. 准备好你的 [OpenAI API Key](https://platform.openai.com/account/api-keys); @@ -201,7 +209,6 @@ DeepSeek Api Key. DeepSeek Api Url. - ### `HIDE_USER_API_KEY` (可选) 如果你不想让用户自行填入 API Key,将此环境变量设置为 1 即可。 @@ -221,8 +228,9 @@ DeepSeek Api Url. ### `WHITE_WEBDAV_ENDPOINTS` (可选) 如果你想增加允许访问的webdav服务地址,可以使用该选项,格式要求: + - 每一个地址必须是一个完整的 endpoint -> `https://xxxx/xxx` + > `https://xxxx/xxx` - 多个地址以`,`相连 ### `CUSTOM_MODELS` (可选) @@ -233,12 +241,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)`的选项 +> 示例: `+Doubao-lite-4k@bytedance=ep-xxxxx-xxx`这个配置会在模型列表显示一个`Doubao-lite-4k(ByteDance)`的选项 ### `DEFAULT_MODEL` (可选) @@ -275,6 +284,14 @@ SiliconFlow API Key. SiliconFlow API URL. +### `AI302_API_KEY` (optional) + +302.AI API Key. + +### `AI302_URL` (optional) + +302.AI API URL. + ## 开发 点击下方按钮,开始二次开发: @@ -299,6 +316,7 @@ BASE_URL=https://b.nextweb.fun/api/proxy ## 部署 ### 宝塔面板部署 + > [简体中文 > 如何通过宝塔一键部署](./docs/bt-cn.md) ### 容器部署 (推荐) diff --git a/README_JA.md b/README_JA.md index f1c2da457..917cc1262 100644 --- a/README_JA.md +++ b/README_JA.md @@ -7,14 +7,22 @@ [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) -[Zeaburでデプロイ](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) [Zeaburでデプロイ](https://zeabur.com/templates/ZBUEFA) [Gitpodで開く](https://gitpod.io/#https://github.com/Yidadaa/ChatGPT-Next-Web) - +[Zeaburでデプロイ](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) [Zeaburでデプロイ](https://zeabur.com/templates/ZBUEFA) [Gitpodで開く](https://gitpod.io/#https://github.com/Yidadaa/ChatGPT-Next-Web) +## Sponsor AI API + + + icon + + +[302.AI](https://302.ai/) は、オンデマンドで支払うAIアプリケーションプラットフォームで、最も安全なAI APIとAIオンラインアプリケーションを提供します。 + ## 企業版 あなたの会社のプライベートデプロイとカスタマイズのニーズに応える + - **ブランドカスタマイズ**:企業向けに特別に設計された VI/UI、企業ブランドイメージとシームレスにマッチ - **リソース統合**:企業管理者が数十種類のAIリソースを統一管理、チームメンバーはすぐに使用可能 - **権限管理**:メンバーの権限、リソースの権限、ナレッジベースの権限を明確にし、企業レベルのAdmin Panelで統一管理 @@ -25,7 +33,6 @@ 企業版のお問い合わせ: **business@nextchat.dev** - ## 始めに 1. [OpenAI API Key](https://platform.openai.com/account/api-keys)を準備する; @@ -40,7 +47,6 @@ - ## 更新を維持する もし上記の手順に従ってワンクリックでプロジェクトをデプロイした場合、「更新があります」というメッセージが常に表示されることがあります。これは、Vercel がデフォルトで新しいプロジェクトを作成するためで、本プロジェクトを fork していないことが原因です。そのため、正しく更新を検出できません。 @@ -51,7 +57,6 @@ - ページ右上の fork ボタンを使って、本プロジェクトを fork する - Vercel で再度選択してデプロイする、[詳細な手順はこちらを参照してください](./docs/vercel-ja.md)。 - ### 自動更新を開く > Upstream Sync の実行エラーが発生した場合は、[手動で Sync Fork](./README_JA.md#手動でコードを更新する) してください! @@ -62,15 +67,12 @@ ![自動更新を有効にする](./docs/images/enable-actions-sync.jpg) - ### 手動でコードを更新する 手動で即座に更新したい場合は、[GitHub のドキュメント](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork)を参照して、fork したプロジェクトを上流のコードと同期する方法を確認してください。 このプロジェクトをスターまたはウォッチしたり、作者をフォローすることで、新機能の更新通知をすぐに受け取ることができます。 - - ## ページアクセスパスワードを設定する > パスワードを設定すると、ユーザーは設定ページでアクセスコードを手動で入力しない限り、通常のチャットができず、未承認の状態であることを示すメッセージが表示されます。 @@ -85,7 +87,6 @@ code1,code2,code3 この環境変数を追加または変更した後、**プロジェクトを再デプロイ**して変更を有効にしてください。 - ## 環境変数 > 本プロジェクトのほとんどの設定は環境変数で行います。チュートリアル:[Vercel の環境変数を変更する方法](./docs/vercel-ja.md)。 @@ -196,8 +197,9 @@ ByteDance API の URL。 ### `WHITE_WEBDAV_ENDPOINTS` (オプション) アクセス許可を与える WebDAV サービスのアドレスを追加したい場合、このオプションを使用します。フォーマット要件: + - 各アドレスは完全なエンドポイントでなければなりません。 -> `https://xxxx/xxx` + > `https://xxxx/xxx` - 複数のアドレスは `,` で接続します。 ### `CUSTOM_MODELS` (オプション) @@ -208,9 +210,11 @@ 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` (オプション) @@ -228,6 +232,13 @@ ByteDance モードでは、`modelName@bytedance=deploymentName` 形式でモデ 『設定』の『ユーザー入力前処理』の初期設定に使用するテンプレートをカスタマイズします。 +### `AI302_API_KEY` (オプション) + +302.AI API キー. + +### `AI302_URL` (オプション) + +302.AI API の URL. ## 開発 @@ -241,14 +252,12 @@ ByteDance モードでは、`modelName@bytedance=deploymentName` 形式でモデ OPENAI_API_KEY= ``` - ### ローカル開発 1. Node.js 18 と Yarn をインストールします。具体的な方法は ChatGPT にお尋ねください。 2. `yarn install && yarn dev` を実行します。⚠️ 注意:このコマンドはローカル開発用であり、デプロイには使用しないでください。 3. ローカルでデプロイしたい場合は、`yarn install && yarn build && yarn start` コマンドを使用してください。プロセスを守るために pm2 を使用することもできます。詳細は ChatGPT にお尋ねください。 - ## デプロイ ### コンテナデプロイ(推奨) @@ -285,7 +294,6 @@ docker run -d -p 3000:3000 \ 他の環境変数を指定する必要がある場合は、上記のコマンドに `-e 環境変数=環境変数値` を追加して指定してください。 - ### ローカルデプロイ コンソールで以下のコマンドを実行します: @@ -296,7 +304,6 @@ bash <(curl -s https://raw.githubusercontent.com/Yidadaa/ChatGPT-Next-Web/main/s ⚠️ 注意:インストール中に問題が発生した場合は、Docker を使用してデプロイしてください。 - ## 謝辞 ### 寄付者 @@ -311,7 +318,6 @@ 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/) diff --git a/README_KO.md b/README_KO.md new file mode 100644 index 000000000..40ba5a6a1 --- /dev/null +++ b/README_KO.md @@ -0,0 +1,492 @@ +
+ + + icon + + +

NextChat

+ +영어 / [简体中文](./README_CN.md) + + + ChatGPTNextWeb%2FChatGPT-Next-Web | Trendshift + + +✨ 빠르고 가벼운 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 + +[Deploy on Zeabur](https://zeabur.com/templates/ZBUEFA) [Deploy on Vercel](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) [Open in Gitpod](https://gitpod.io/#https://github.com/ChatGPTNextWeb/NextChat) + +[](https://monica.im/?utm=nxcrp) + +
+ +## ❤️ AI API 후원사 + + + icon + + +[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) + +![Github iOS Image](https://github.com/user-attachments/assets/e0aa334f-4c13-4dc9-8310-e3b09fa4b9f3) + +## 🫣 NextChat, MCP 지원! + +> 빌드 전 환경 변수(env) `ENABLE_MCP=true` 설정 필요 + + + +## 엔터프라이즈 버전 + +회사 내부 시스템에 맞춘 프라이빗 배포 및 맞춤형 커스터마이징 지원: + +- **브랜드 커스터마이징**: 기업 이미지에 맞는 UI/UX 테마 적용 +- **리소스 통합 관리**: 다양한 AI 모델을 통합하여 팀원이 손쉽게 사용 가능 +- **권한 제어**: 관리자 패널을 통한 멤버·리소스·지식 베이스 권한 설정 +- **지식 통합**: 사내 문서 및 데이터와 AI를 결합한 맞춤형 답변 제공 +- **보안 감사**: 민감한 질문 차단 및 모든 기록 추적 가능 +- **프라이빗 배포 지원**: 주요 클라우드 서비스에 맞춘 배포 옵션 +- **지속적 업데이트**: 멀티모달 등 최신 AI 기능 지속 반영 + +엔터프라이즈 문의: **business@nextchat.dev** + +## 🖼️ 스크린샷 + +![설정](./docs/images/settings.png) +![기타](./docs/images/more.png) + +## 주요 기능 소개 + +- 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 + +
+ +![主界面](./docs/images/cover.png) + +
+ +## 개발 로드맵 + +- [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. + [![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2FYidadaa%2FChatGPT-Next-Web&env=OPENAI_API_KEY&env=CODE&project-name=chatgpt-next-web&repository-name=ChatGPT-Next-Web) 버튼을 클릭해 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` + +이후 매 시간 자동으로 업데이트됩니다: + +![자동 업데이트 활성화](./docs/images/enable-actions.jpg) +![업스트림 동기화 활성화](./docs/images/enable-actions-sync.jpg) + +### 수동 업데이트 방법 (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) + +[![Gitpod에서 열기](https://gitpod.io/button/open-in-gitpod.svg)](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) + + + + + +## 라이선스 (LICENSE) + +[MIT](https://opensource.org/license/mit/) diff --git a/app/api/302ai.ts b/app/api/302ai.ts new file mode 100644 index 000000000..b4636bcd7 --- /dev/null +++ b/app/api/302ai.ts @@ -0,0 +1,128 @@ +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); + } +} diff --git a/app/api/[provider]/[...path]/route.ts b/app/api/[provider]/[...path]/route.ts index 8975bf971..e8af34f29 100644 --- a/app/api/[provider]/[...path]/route.ts +++ b/app/api/[provider]/[...path]/route.ts @@ -15,6 +15,7 @@ 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, @@ -52,6 +53,8 @@ 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 }); } diff --git a/app/client/api.ts b/app/client/api.ts index f5288593d..f60b0e2ad 100644 --- a/app/client/api.ts +++ b/app/client/api.ts @@ -24,6 +24,7 @@ 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]; @@ -173,6 +174,9 @@ 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(); } @@ -265,6 +269,7 @@ 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 @@ -290,6 +295,8 @@ export function getHeaders(ignoreHeaders: boolean = false) { ? accessStore.iflytekApiKey && accessStore.iflytekApiSecret ? accessStore.iflytekApiKey + ":" + accessStore.iflytekApiSecret : "" + : isAI302 + ? accessStore.ai302ApiKey : accessStore.openaiApiKey; return { isGoogle, @@ -304,6 +311,7 @@ export function getHeaders(ignoreHeaders: boolean = false) { isXAI, isChatGLM, isSiliconFlow, + isAI302, apiKey, isEnabledAccessControl, }; @@ -332,6 +340,7 @@ export function getHeaders(ignoreHeaders: boolean = false) { isXAI, isChatGLM, isSiliconFlow, + isAI302, apiKey, isEnabledAccessControl, } = getConfig(); @@ -382,6 +391,8 @@ 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); } diff --git a/app/client/platforms/ai302.ts b/app/client/platforms/ai302.ts new file mode 100644 index 000000000..7bd18f96d --- /dev/null +++ b/app/client/platforms/ai302.ts @@ -0,0 +1,287 @@ +"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 { + 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 { + 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, + }, + })); + } +} diff --git a/app/client/platforms/anthropic.ts b/app/client/platforms/anthropic.ts index 6747221a8..237747090 100644 --- a/app/client/platforms/anthropic.ts +++ b/app/client/platforms/anthropic.ts @@ -224,7 +224,7 @@ export class ClaudeApi implements LLMApi { let chunkJson: | undefined | { - type: "content_block_delta" | "content_block_stop"; + type: "content_block_delta" | "content_block_stop" | "message_delta" | "message_stop"; content_block?: { type: "tool_use"; id: string; @@ -234,11 +234,20 @@ 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; diff --git a/app/client/platforms/openai.ts b/app/client/platforms/openai.ts index 4cad6bf94..51ae71ea6 100644 --- a/app/client/platforms/openai.ts +++ b/app/client/platforms/openai.ts @@ -56,7 +56,7 @@ export interface OpenAIListModelResponse { export interface RequestPayload { messages: { - role: "system" | "user" | "assistant"; + role: "developer" | "system" | "user" | "assistant"; content: string | MultimodalContent[]; }[]; stream?: boolean; @@ -238,8 +238,16 @@ 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. }; - // O1 使用 max_completion_tokens 控制token数 (https://platform.openai.com/docs/guides/reasoning#controlling-costs) 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) requestPayload["max_completion_tokens"] = modelConfig.max_tokens; } diff --git a/app/components/artifacts.tsx b/app/components/artifacts.tsx index ce187fbcb..7546260d9 100644 --- a/app/components/artifacts.tsx +++ b/app/components/artifacts.tsx @@ -29,11 +29,11 @@ type HTMLPreviewProps = { onLoad?: (title?: string) => void; }; -export type HTMLPreviewHander = { +export type HTMLPreviewHandler = { reload: () => void; }; -export const HTMLPreview = forwardRef( +export const HTMLPreview = forwardRef( function HTMLPreview(props, ref) { const iframeRef = useRef(null); const [frameId, setFrameId] = useState(nanoid()); @@ -207,7 +207,7 @@ export function Artifacts() { const [code, setCode] = useState(""); const [loading, setLoading] = useState(true); const [fileName, setFileName] = useState(""); - const previewRef = useRef(null); + const previewRef = useRef(null); useEffect(() => { if (id) { diff --git a/app/components/markdown.tsx b/app/components/markdown.tsx index ba85f0970..97a4f4e7a 100644 --- a/app/components/markdown.tsx +++ b/app/components/markdown.tsx @@ -17,7 +17,7 @@ import { showImageModal, FullScreen } from "./ui-lib"; import { ArtifactsShareButton, HTMLPreview, - HTMLPreviewHander, + HTMLPreviewHandler, } 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(null); - const previewRef = useRef(null); + const previewRef = useRef(null); const [mermaidCode, setMermaidCode] = useState(""); const [htmlCode, setHtmlCode] = useState(""); const { height } = useWindowSize(); diff --git a/app/components/settings.tsx b/app/components/settings.tsx index 68ebcf084..881c12cae 100644 --- a/app/components/settings.tsx +++ b/app/components/settings.tsx @@ -75,6 +75,7 @@ import { ChatGLM, DeepSeek, SiliconFlow, + AI302, } from "../constant"; import { Prompt, SearchService, usePromptStore } from "../store/prompt"; import { ErrorBoundary } from "./error"; @@ -1458,6 +1459,46 @@ export function Settings() { ); + const ai302ConfigComponent = accessStore.provider === ServiceProvider["302.AI"] && ( + <> + + + accessStore.update( + (access) => (access.ai302Url = e.currentTarget.value), + ) + } + > + + + { + accessStore.update( + (access) => (access.ai302ApiKey = e.currentTarget.value), + ); + }} + /> + + + ); + return (
@@ -1822,6 +1863,7 @@ export function Settings() { {XAIConfigComponent} {chatglmConfigComponent} {siliconflowConfigComponent} + {ai302ConfigComponent} )} diff --git a/app/config/server.ts b/app/config/server.ts index 43d4ff833..14175eadc 100644 --- a/app/config/server.ts +++ b/app/config/server.ts @@ -88,6 +88,10 @@ 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; @@ -163,6 +167,7 @@ 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); @@ -246,6 +251,10 @@ 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, diff --git a/app/constant.ts b/app/constant.ts index 9fcea1187..6bececb55 100644 --- a/app/constant.ts +++ b/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.cn"; +export const MOONSHOT_BASE_URL = "https://api.moonshot.ai"; export const IFLYTEK_BASE_URL = "https://spark-api-open.xf-yun.com"; export const DEEPSEEK_BASE_URL = "https://api.deepseek.com"; @@ -36,6 +36,8 @@ 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`; @@ -72,6 +74,7 @@ export enum ApiPath { ChatGLM = "/api/chatglm", DeepSeek = "/api/deepseek", SiliconFlow = "/api/siliconflow", + "302.AI" = "/api/302ai", } export enum SlotID { @@ -130,6 +133,7 @@ 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 @@ -156,6 +160,7 @@ export enum ModelProvider { ChatGLM = "ChatGLM", DeepSeek = "DeepSeek", SiliconFlow = "SiliconFlow", + "302.AI" = "302.AI", } export const Stability = { @@ -266,6 +271,13 @@ 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}}. @@ -467,19 +479,20 @@ export const VISION_MODEL_REGEXES = [ /vision/, /gpt-4o/, /gpt-4\.1/, - /claude-3/, + /claude.*[34]/, /gemini-1\.5/, /gemini-exp/, - /gemini-2\.0/, + /gemini-2\.[05]/, /learnlm/, /qwen-vl/, /qwen2-vl/, - /gpt-4-turbo(?!.*preview)/, // Matches "gpt-4-turbo" but not "gpt-4-turbo-preview" - /^dall-e-3$/, // Matches exactly "dall-e-3" + /gpt-4-turbo(?!.*preview)/, + /^dall-e-3$/, /glm-4v/, /vl/i, /o3/, /o4-mini/, + /grok-4/i, ]; export const EXCLUDE_VISION_MODEL_REGEXES = [/claude-3-5-haiku-20241022/]; @@ -523,20 +536,15 @@ 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", @@ -546,6 +554,8 @@ 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 = [ @@ -563,6 +573,8 @@ 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 = [ @@ -611,7 +623,18 @@ const tencentModels = [ "hunyuan-vision", ]; -const moonshotModes = ["moonshot-v1-8k", "moonshot-v1-32k", "moonshot-v1-128k"]; +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 iflytekModels = [ "general", @@ -632,6 +655,18 @@ 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 = [ @@ -671,6 +706,31 @@ 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) => ({ @@ -761,7 +821,7 @@ export const DEFAULT_MODELS = [ sorted: 8, }, })), - ...moonshotModes.map((name) => ({ + ...moonshotModels.map((name) => ({ name, available: true, sorted: seq++, @@ -827,6 +887,17 @@ 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; diff --git a/app/locales/ar.ts b/app/locales/ar.ts index e2fad3494..6237e11b3 100644 --- a/app/locales/ar.ts +++ b/app/locales/ar.ts @@ -416,6 +416,17 @@ const ar: PartialLocaleType = { SubTitle: "مثال:", }, }, + AI302: { + ApiKey: { + Title: "مفتاح 302.AI API", + SubTitle: "استخدم مفتاح 302.AI API مخصص", + Placeholder: "مفتاح 302.AI API", + }, + Endpoint: { + Title: "عنوان الواجهة", + SubTitle: "مثال:", + }, + }, CustomModel: { Title: "اسم النموذج المخصص", SubTitle: "أضف خيارات نموذج مخصص، مفصولة بفواصل إنجليزية", diff --git a/app/locales/bn.ts b/app/locales/bn.ts index f52f101ce..6ec3606f3 100644 --- a/app/locales/bn.ts +++ b/app/locales/bn.ts @@ -423,6 +423,17 @@ const bn: PartialLocaleType = { SubTitle: "উদাহরণ:", }, }, + AI302: { + ApiKey: { + Title: "ইন্টারফেস কী", + SubTitle: "স্বনির্ধারিত 302.AI API কী ব্যবহার করুন", + Placeholder: "302.AI API কী", + }, + Endpoint: { + Title: "ইন্টারফেস ঠিকানা", + SubTitle: "উদাহরণ:", + }, + }, CustomModel: { Title: "স্বনির্ধারিত মডেল নাম", SubTitle: diff --git a/app/locales/cn.ts b/app/locales/cn.ts index 81b609cde..2cb7dd1e5 100644 --- a/app/locales/cn.ts +++ b/app/locales/cn.ts @@ -538,6 +538,17 @@ const cn = { Title: "自定义模型名", SubTitle: "增加自定义模型可选项,使用英文逗号隔开", }, + AI302: { + ApiKey: { + Title: "接口密钥", + SubTitle: "使用自定义302.AI API Key", + Placeholder: "302.AI API Key", + }, + Endpoint: { + Title: "接口地址", + SubTitle: "样例:", + }, + }, }, Model: "模型 (model)", diff --git a/app/locales/cs.ts b/app/locales/cs.ts index d62a20367..c4ce2653a 100644 --- a/app/locales/cs.ts +++ b/app/locales/cs.ts @@ -423,6 +423,17 @@ 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", diff --git a/app/locales/da.ts b/app/locales/da.ts index 7090b062b..7c976188a 100644 --- a/app/locales/da.ts +++ b/app/locales/da.ts @@ -517,6 +517,17 @@ 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: { diff --git a/app/locales/de.ts b/app/locales/de.ts index 3490190a8..1e5c75985 100644 --- a/app/locales/de.ts +++ b/app/locales/de.ts @@ -434,6 +434,17 @@ 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: diff --git a/app/locales/en.ts b/app/locales/en.ts index 8fecf8bf7..a6d191904 100644 --- a/app/locales/en.ts +++ b/app/locales/en.ts @@ -543,6 +543,17 @@ 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", diff --git a/app/locales/es.ts b/app/locales/es.ts index 03af9b439..be229c20c 100644 --- a/app/locales/es.ts +++ b/app/locales/es.ts @@ -436,6 +436,17 @@ 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: diff --git a/app/locales/fr.ts b/app/locales/fr.ts index d25c60eb6..0675d925c 100644 --- a/app/locales/fr.ts +++ b/app/locales/fr.ts @@ -435,6 +435,17 @@ 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: diff --git a/app/locales/id.ts b/app/locales/id.ts index af96fd272..68cf43e30 100644 --- a/app/locales/id.ts +++ b/app/locales/id.ts @@ -424,6 +424,17 @@ 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", diff --git a/app/locales/it.ts b/app/locales/it.ts index 59bc1eb15..c098f63d1 100644 --- a/app/locales/it.ts +++ b/app/locales/it.ts @@ -436,6 +436,17 @@ 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: diff --git a/app/locales/jp.ts b/app/locales/jp.ts index e7c81e186..d605b578f 100644 --- a/app/locales/jp.ts +++ b/app/locales/jp.ts @@ -420,6 +420,17 @@ const jp: PartialLocaleType = { SubTitle: "例:", }, }, + AI302: { + ApiKey: { + Title: "APIキー", + SubTitle: "カスタム302.AI APIキーを使用", + Placeholder: "302.AI APIキー", + }, + Endpoint: { + Title: "エンドポイント", + SubTitle: "例:", + }, + }, CustomModel: { Title: "カスタムモデル名", SubTitle: "カスタムモデルの選択肢を追加、英語のカンマで区切る", diff --git a/app/locales/ko.ts b/app/locales/ko.ts index f2c433b76..023edca4a 100644 --- a/app/locales/ko.ts +++ b/app/locales/ko.ts @@ -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,8 +53,11 @@ const ko: PartialLocaleType = { PinToastAction: "보기", Delete: "삭제", Edit: "편집", + FullScreen: "전체 화면", RefreshTitle: "제목 새로고침", RefreshToast: "제목 새로고침 요청이 전송되었습니다", + Speech: "재생", + StopSpeech: "정지", }, Commands: { new: "새 채팅", @@ -62,6 +65,7 @@ const ko: PartialLocaleType = { next: "다음 채팅", prev: "이전 채팅", clear: "컨텍스트 지우기", + fork: "채팅 복사", del: "채팅 삭제", }, InputActions: { @@ -88,11 +92,22 @@ const ko: PartialLocaleType = { return inputHints + ",/ 자동 완성,: 명령어 입력"; }, Send: "전송", + StartSpeak: "재생 시작", + StopSpeak: "재생 정지", Config: { Reset: "기억 지우기", SaveAs: "마스크로 저장", }, IsContext: "프롬프트 설정", + ShortcutKey: { + Title: "키보드 단축키", + newChat: "새 채팅 열기", + focusInput: "입력 필드 포커스", + copyLastMessage: "마지막 답변 복사", + copyLastCode: "마지막 코드 블록 복사", + showShortcutKey: "단축키 보기", + clearContext: "컨텍스트 지우기", + }, }, Export: { Title: "채팅 기록 공유", @@ -114,9 +129,13 @@ const ko: PartialLocaleType = { Preview: "미리보기", }, Image: { - Toast: "스크린샷 생성 중", + Toast: "스크린샷 생성 중...", Modal: "길게 누르거나 오른쪽 클릭하여 이미지를 저장하십시오.", }, + Artifacts: { + Title: "공유 아티팩트", + Error: "공유 오류", + }, }, Select: { Search: "메시지 검색", @@ -141,7 +160,7 @@ const ko: PartialLocaleType = { Settings: { Title: "설정", SubTitle: "모든 설정 옵션", - + ShowPassword: "비밀번호 보기", Danger: { Reset: { Title: "모든 설정 초기화", @@ -187,8 +206,10 @@ const ko: PartialLocaleType = { IsChecking: "업데이트 확인 중...", FoundUpdate: (x: string) => `새 버전 발견: ${x}`, GoToUpdate: "업데이트로 이동", + Success: "업데이트 성공", + Failed: "업데이트 실패", }, - SendKey: "전송 키", + SendKey: "키 전송", Theme: "테마", TightBorder: "테두리 없는 모드", SendPreviewBubble: { @@ -221,7 +242,7 @@ const ko: PartialLocaleType = { }, ProxyUrl: { Title: "프록시 주소", - SubTitle: "이 프로젝트에서 제공하는 교차 출처 프록시만 해당", + SubTitle: "이 프로젝트에서 제공하는 CORS 프록시만 해당", }, WebDav: { @@ -295,7 +316,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: "지금 채팅하기", }, @@ -395,6 +416,22 @@ 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: "엔드포인트 키", @@ -417,10 +454,103 @@ 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)", @@ -448,13 +578,67 @@ 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: @@ -476,8 +660,11 @@ const ko: PartialLocaleType = { Clear: "컨텍스트가 지워졌습니다.", Revert: "컨텍스트 복원", }, - Plugin: { - Name: "플러그인", + Discovery: { + Name: "디스커버리", + }, + Mcp: { + Name: "MCP 플러그인", }, FineTuned: { Sysmessage: "당신은 보조자입니다.", @@ -489,7 +676,7 @@ const ko: PartialLocaleType = { Search: "검색어 입력", NoResult: "결과를 찾을 수 없습니다", NoData: "데이터가 없습니다", - Loading: "로딩 중", + Loading: "로딩 중...", SubTitle: (count: number) => `${count}개의 결과를 찾았습니다`, }, @@ -497,6 +684,47 @@ 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: { @@ -576,6 +804,61 @@ 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; diff --git a/app/locales/no.ts b/app/locales/no.ts index f056ef12f..e0556a853 100644 --- a/app/locales/no.ts +++ b/app/locales/no.ts @@ -433,6 +433,17 @@ 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", diff --git a/app/locales/pt.ts b/app/locales/pt.ts index 152f50228..6b80c2ec1 100644 --- a/app/locales/pt.ts +++ b/app/locales/pt.ts @@ -359,6 +359,17 @@ 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", diff --git a/app/locales/ru.ts b/app/locales/ru.ts index 4294a3b34..a4f0c949c 100644 --- a/app/locales/ru.ts +++ b/app/locales/ru.ts @@ -426,6 +426,17 @@ const ru: PartialLocaleType = { SubTitle: "Пример:", }, }, + AI302: { + ApiKey: { + Title: "Ключ интерфейса", + SubTitle: "Использовать пользовательский 302.AI API-ключ", + Placeholder: "302.AI API-ключ", + }, + Endpoint: { + Title: "Адрес интерфейса", + SubTitle: "Пример:", + }, + }, CustomModel: { Title: "Название пользовательской модели", SubTitle: diff --git a/app/locales/sk.ts b/app/locales/sk.ts index 36454de75..6508f7f38 100644 --- a/app/locales/sk.ts +++ b/app/locales/sk.ts @@ -381,6 +381,17 @@ 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", diff --git a/app/locales/tr.ts b/app/locales/tr.ts index 2082488a5..15d21fb7d 100644 --- a/app/locales/tr.ts +++ b/app/locales/tr.ts @@ -426,6 +426,17 @@ 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: diff --git a/app/locales/tw.ts b/app/locales/tw.ts index 83dd547b8..d09465d9e 100644 --- a/app/locales/tw.ts +++ b/app/locales/tw.ts @@ -382,6 +382,17 @@ const tw = { SubTitle: "選擇一個特定的 API 版本", }, }, + AI302: { + ApiKey: { + Title: "API 金鑰", + SubTitle: "使用自訂 302.AI API 金鑰", + Placeholder: "302.AI API 金鑰", + }, + Endpoint: { + Title: "端點位址", + SubTitle: "範例:", + }, + }, CustomModel: { Title: "自訂模型名稱", SubTitle: "增加自訂模型可選擇項目,使用英文逗號隔開", diff --git a/app/locales/vi.ts b/app/locales/vi.ts index c53baf35d..7f6ed3f6f 100644 --- a/app/locales/vi.ts +++ b/app/locales/vi.ts @@ -422,6 +422,17 @@ 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: diff --git a/app/store/access.ts b/app/store/access.ts index 7025a1814..fd55fbdd3 100644 --- a/app/store/access.ts +++ b/app/store/access.ts @@ -17,6 +17,7 @@ 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"; @@ -59,6 +60,8 @@ 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, @@ -132,6 +135,10 @@ const DEFAULT_ACCESS_STATE = { siliconflowUrl: DEFAULT_SILICONFLOW_URL, siliconflowApiKey: "", + // 302.AI + ai302Url: DEFAULT_AI302_URL, + ai302ApiKey: "", + // server config needCode: true, hideUserApiKey: false, diff --git a/docs/cloudflare-pages-ko.md b/docs/cloudflare-pages-ko.md index 3b489a729..072402183 100644 --- a/docs/cloudflare-pages-ko.md +++ b/docs/cloudflare-pages-ko.md @@ -34,6 +34,6 @@ 12. "저장 후 배포"를 클릭합니다. 13. 호환성 플래그를 입력해야 하므로 "배포 취소"를 클릭합니다. 14. "빌드 설정", "기능"으로 이동하여 "호환성 플래그"를 찾습니다. -"프로덕션 호환성 플래그 구성" 및 "프리뷰 호환성 플래그 구성"에서 "nodejs_compat"를 입력합니다. +15. "프로덕션 호환성 플래그 구성" 및 "프리뷰 호환성 플래그 구성"에서 "nodejs_compat"를 입력합니다. 16. "배포"로 이동하여 "배포 다시 시도"를 클릭합니다. 17. 즐기세요! \ No newline at end of file diff --git a/docs/vercel-ko.md b/docs/vercel-ko.md index 725a827dc..b6ba71f58 100644 --- a/docs/vercel-ko.md +++ b/docs/vercel-ko.md @@ -9,7 +9,7 @@ 3. 프로젝트를 선택합니다. ![vercel-create-2](./images/vercel/vercel-create-2.jpg) -1. Git 리포지토리 가져오기에서 chatgpt-next-web을 검색합니다. 2. 새 포크를 선택합니다; +1. Git 리포지토리 가져오기에서 chatgpt-next-web을 검색합니다. 2. 새로 포크된 프로젝트를 선택하고 가져오기를 클릭합니다. ![vercel-create-3](./images/vercel/vercel-create-3.jpg) diff --git a/public/prompts.json b/public/prompts.json index 24782690f..ae997b989 100644 --- a/public/prompts.json +++ b/public/prompts.json @@ -1,8 +1,7 @@ { "cn": [ [ - " ", - " " +main ] ], "tw": [ @@ -17,8 +16,6 @@ "Optimiere den Text und behalte die Struktur und Inhalt. Überprüfe nur die Rechtschreibung und Satzstellung:\n" ], [ - "Optimize the text", - "Optimize the text:\n" - ] +main ] } diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index 8f5dd4ab3..bfa82b298 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -9,7 +9,7 @@ }, "package": { "productName": "NextChat", - "version": "2.15.8" + "version": "2.16.1" }, "tauri": { "allowlist": { diff --git a/yarn.lock b/yarn.lock index a99ff0804..af53517c4 100644 --- a/yarn.lock +++ b/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.30001692" - resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001692.tgz" - integrity sha512-A95VKan0kdtrsnMubMKxEKUKImOPSuCpYgxSQBo036P5YYgVIcOYJEgt/txJWqObiRQeISNCfef9nvlQ0vbV7A== + version "1.0.30001724" + resolved "https://mirrors.huaweicloud.com/repository/npm/caniuse-lite/-/caniuse-lite-1.0.30001724.tgz" + integrity sha512-WqJo7p0TbHDOythNTqYujmaJTvtYRZrjpP8TCvH6Vb9CYJerJNKamKzIWOM4BkQatWj9H2lYulpdAQNBe7QhNA== 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://registry.yarnpkg.com/eslint-plugin-unused-imports/-/eslint-plugin-unused-imports-3.2.0.tgz#63a98c9ad5f622cd9f830f70bc77739f25ccfe0d" + resolved "https://mirrors.huaweicloud.com/repository/npm/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://registry.yarnpkg.com/eslint-rule-composer/-/eslint-rule-composer-0.3.0.tgz#79320c927b0c5c0d3d3d2b76c8b4a488f25bbaf9" + resolved "https://mirrors.huaweicloud.com/repository/npm/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://registry.yarnpkg.com/typescript/-/typescript-5.2.2.tgz#5ebb5e5a5b75f085f22bc3f8460fba308310fa78" + resolved "https://mirrors.huaweicloud.com/repository/npm/typescript/-/typescript-5.2.2.tgz#5ebb5e5a5b75f085f22bc3f8460fba308310fa78" integrity sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w== unbox-primitive@^1.0.2: