diff --git a/README.md b/README.md index 24967c16403a..3be26b6939ee 100644 --- a/README.md +++ b/README.md @@ -47,7 +47,7 @@ One-Click to get a well-designed cross-platform ChatGPT web UI, with GPT3, GPT4 - New in v2: create, share and debug your chat tools with prompt templates (mask) - Awesome prompts powered by [awesome-chatgpt-prompts-zh](https://github.com/PlexPt/awesome-chatgpt-prompts-zh) and [awesome-chatgpt-prompts](https://github.com/f/awesome-chatgpt-prompts) - Automatically compresses chat history to support long conversations while also saving your tokens -- I18n: English, 简体中文, 繁体中文, 日本語, Français, Español, Italiano, Türkçe, Deutsch, Tiếng Việt, Русский, Čeština, 한국어, Indonesia +- I18n: English, 简体中文, 繁體中文, 日本語, Français, Español, Italiano, Türkçe, Deutsch, Tiếng Việt, Русский, Čeština, 한국어, Indonesia ## Roadmap @@ -124,7 +124,7 @@ We recommend that you follow the steps below to re-deploy: - Delete the original repository; - Use the fork button in the upper right corner of the page to fork this project; -- Choose and deploy in Vercel again, [please see the detailed tutorial](./docs/vercel-cn.md). +- Choose and deploy in Vercel again, please follow [detailed tutorial](./docs/vercel-cn.md). ### Enable Automatic Updates @@ -158,114 +158,112 @@ After adding or modifying this environment variable, please redeploy the project > [简体中文 > 如何配置 api key、访问密码、接口代理](./README_CN.md#环境变量) -### `CODE` (optional) +### `CODE` Access password, separated by comma. -### `OPENAI_API_KEY` (required) +### `OPENAI_API_KEY` -Your openai api key, join multiple api keys with comma. +Your OpenAI api key, join multiple api keys with comma. -### `BASE_URL` (optional) +### `BASE_URL` -> Default: `https://api.openai.com` +> Default: `https://api.openai.com` +> Example: `http://{your-openai-proxy}.com` -> Examples: `http://your-openai-proxy.com` +Override OpenAI api request base url. -Override openai api request base url. - -### `OPENAI_ORG_ID` (optional) +### `OPENAI_ORG_ID` Specify OpenAI organization ID. -### `AZURE_URL` (optional) +### `AZURE_URL` -> Example: https://{azure-resource-url}/openai/deployments/{deploy-name} -> if you config deployment name in `CUSTOM_MODELS`, you can remove `{deploy-name}` in `AZURE_URL` +> Example: `https://{azure-resource-url}/openai` -Azure deploy url. +Azure OpenAI resource url. -### `AZURE_API_KEY` (optional) +### `AZURE_API_KEY` Azure Api Key. -### `AZURE_API_VERSION` (optional) +### `AZURE_API_VERSION` Azure Api Version, find it at [Azure Documentation](https://learn.microsoft.com/en-us/azure/ai-services/openai/reference#chat-completions). -### `GOOGLE_API_KEY` (optional) +### `GOOGLE_API_KEY` Google Gemini Pro Api Key. -### `GOOGLE_URL` (optional) +### `GOOGLE_URL` Google Gemini Pro Api Url. -### `ANTHROPIC_API_KEY` (optional) +### `ANTHROPIC_API_KEY` anthropic claude Api Key. -### `ANTHROPIC_API_VERSION` (optional) +### `ANTHROPIC_API_VERSION` anthropic claude Api version. -### `ANTHROPIC_URL` (optional) +### `ANTHROPIC_URL` anthropic claude Api Url. -### `BAIDU_API_KEY` (optional) +### `BAIDU_API_KEY` Baidu Api Key. -### `BAIDU_SECRET_KEY` (optional) +### `BAIDU_SECRET_KEY` Baidu Secret Key. -### `BAIDU_URL` (optional) +### `BAIDU_URL` Baidu Api Url. -### `BYTEDANCE_API_KEY` (optional) +### `BYTEDANCE_API_KEY` ByteDance Api Key. -### `BYTEDANCE_URL` (optional) +### `BYTEDANCE_URL` ByteDance Api Url. -### `ALIBABA_API_KEY` (optional) +### `ALIBABA_API_KEY` Alibaba Cloud Api Key. -### `ALIBABA_URL` (optional) +### `ALIBABA_URL` Alibaba Cloud Api Url. -### `HIDE_USER_API_KEY` (optional) +### `HIDE_USER_API_KEY` > Default: Empty If you do not want users to input their own API key, set this value to 1. -### `DISABLE_GPT4` (optional) +### `DISABLE_GPT4` > Default: Empty If you do not want users to use GPT-4, set this value to 1. -### `ENABLE_BALANCE_QUERY` (optional) +### `ENABLE_BALANCE_QUERY` > Default: Empty If you do want users to query balance, set this value to 1. -### `DISABLE_FAST_LINK` (optional) +### `DISABLE_FAST_LINK` > Default: Empty If you want to disable parse settings from url, set this to 1. -### `CUSTOM_MODELS` (optional) +### `CUSTOM_MODELS` > Default: Empty > Example: `+llama,+claude-2,-gpt-3.5-turbo,gpt-4-1106-preview=gpt-4-turbo` means add `llama, claude-2` to model list, and remove `gpt-3.5-turbo` from list, and display `gpt-4-1106-preview` as `gpt-4-turbo`. @@ -280,18 +278,18 @@ For Azure: use `modelName@azure=deploymentName` to customize model name and depl 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) +### `DEFAULT_MODEL` Change default model -### `WHITE_WEBDEV_ENDPOINTS` (optional) +### `WHITE_WEBDEV_ENDPOINTS` 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` - Multiple addresses are connected by ', ' -### `DEFAULT_INPUT_TEMPLATE` (optional) +### `DEFAULT_INPUT_TEMPLATE` Customize the default template used to initialize the User Input Preprocessing configuration item in Settings. @@ -310,7 +308,7 @@ Before starting development, you must create a new `.env.local` file at project ``` OPENAI_API_KEY= -# if you are not able to access openai service, use this BASE_URL +# if you are not able to access OpenAI service, use this BASE_URL BASE_URL=https://chatgpt1.nextweb.fun/api/proxy ``` diff --git a/README_CN.md b/README_CN.md index 5400bb276fa5..04e7bce0e494 100644 --- a/README_CN.md +++ b/README_CN.md @@ -3,7 +3,7 @@

NextChat

-一键免费部署你的私人 ChatGPT 网页应用,支持 GPT3, GPT4 & Gemini Pro 模型。 +一键免费部署你的私人 ChatGPT 网页应用,支持 GPT3、GPT4、Gemini Pro 等模型。 [演示 Demo](https://chat-gpt-next-web.vercel.app/) / [反馈 Issues](https://github.com/Yidadaa/ChatGPT-Next-Web/issues) / [加入 Discord](https://discord.gg/zrhvHCr79N) @@ -20,8 +20,8 @@ ## 开始使用 1. 准备好你的 [OpenAI API Key](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&env=GOOGLE_API_KEY&project-name=chatgpt-next-web&repository-name=ChatGPT-Next-Web),直接使用 Github 账号登录即可,记得在环境变量页填入 API Key 和[页面访问密码](#配置页面访问密码) CODE; +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&env=GOOGLE_API_KEY&project-name=chatgpt-next-web&repository-name=ChatGPT-Next-Web)开始部署。直接使用 GitHub 账号登录即可,记得在环境变量页填入 API Key 和[页面访问密码](#配置页面访问密码) `CODE`; 3. 部署完毕后,即可开始使用; 4. (可选)[绑定自定义域名](https://vercel.com/docs/concepts/projects/domains/add-a-domain):Vercel 分配的域名 DNS 在某些区域被污染了,绑定自定义域名即可直连。 @@ -38,7 +38,7 @@ > 如果你遇到了 Upstream Sync 执行错误,请手动 Sync Fork 一次! -当你 fork 项目之后,由于 Github 的限制,需要手动去你 fork 后的项目的 Actions 页面启用 Workflows,并启用 Upstream Sync Action,启用之后即可开启每小时定时自动更新: +当你 fork 项目之后,由于 GitHub 的限制,需要手动去你 fork 后的项目的 Actions 页面启用 Workflows,并启用 Upstream Sync Action,启用之后即可开启每小时定时自动更新: ![自动更新](./docs/images/enable-actions.jpg) @@ -46,7 +46,7 @@ ### 手动更新代码 -如果你想让手动立即更新,可以查看 [Github 的文档](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork) 了解如何让 fork 的项目与上游代码同步。 +如果你想让手动立即更新,可以查看 [GitHub 文档](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork) 了解如何让 fork 的项目与上游代码同步。 你可以 star/watch 本项目或者 follow 作者来及时获得新功能更新通知。 @@ -68,42 +68,39 @@ code1,code2,code3 > 本项目大多数配置项都通过环境变量来设置,教程:[如何修改 Vercel 环境变量](./docs/vercel-cn.md)。 -### `OPENAI_API_KEY` (必填项) +### `OPENAI_API_KEY` -OpanAI 密钥,你在 openai 账户页面申请的 api key,使用英文逗号隔开多个 key,这样可以随机轮询这些 key。 +OpanAI 密钥,你在 OpenAI 账户页面申请的 api key,使用英文逗号隔开多个 key,这样可以随机轮询这些 key。 -### `CODE` (可选) +### `CODE` 访问密码,可选,可以使用逗号隔开多个密码。 **警告**:如果不填写此项,则任何人都可以直接使用你部署后的网站,可能会导致你的 token 被急速消耗完毕,建议填写此选项。 -### `BASE_URL` (可选) +### `BASE_URL` > Default: `https://api.openai.com` -> Examples: `http://your-openai-proxy.com` +> Examples: `http://{your-openai-proxy}.com` -OpenAI 接口代理 URL,如果你手动配置了 openai 接口代理,请填写此选项。 +OpenAI 接口代理 URL,如果你手动配置了 OpenAI 接口代理,请填写此选项。如果遇到 ssl 证书问题,请将 `BASE_URL` 的协议设置为 http。 -> 如果遇到 ssl 证书问题,请将 `BASE_URL` 的协议设置为 http。 - -### `OPENAI_ORG_ID` (可选) +### `OPENAI_ORG_ID` 指定 OpenAI 中的组织 ID。 -### `AZURE_URL` (可选) +### `AZURE_URL` -> 形如:https://{azure-resource-url}/openai/deployments/{deploy-name} -> 如果你已经在`CUSTOM_MODELS`中参考`displayName`的方式配置了{deploy-name},那么可以从`AZURE_URL`中移除`{deploy-name}` +> Example: `https://{azure-resource-url}/openai` -Azure 部署地址。 +Azure OpenAI 部署地址。 -### `AZURE_API_KEY` (可选) +### `AZURE_API_KEY` Azure 密钥。 -### `AZURE_API_VERSION` (可选) +### `AZURE_API_VERSION` Azure Api 版本,你可以在这里找到:[Azure 文档](https://learn.microsoft.com/en-us/azure/ai-services/openai/reference#chat-completions)。 @@ -155,19 +152,19 @@ ByteDance Api Url. 阿里云(千问)Api Url. -### `HIDE_USER_API_KEY` (可选) +### `HIDE_USER_API_KEY` 如果你不想让用户自行填入 API Key,将此环境变量设置为 1 即可。 -### `DISABLE_GPT4` (可选) +### `DISABLE_GPT4` 如果你不想让用户使用 GPT-4,将此环境变量设置为 1 即可。 -### `ENABLE_BALANCE_QUERY` (可选) +### `ENABLE_BALANCE_QUERY` 如果你想启用余额查询功能,将此环境变量设置为 1 即可。 -### `DISABLE_FAST_LINK` (可选) +### `DISABLE_FAST_LINK` 如果你想禁用从链接解析预制设置,将此环境变量设置为 1 即可。 @@ -178,7 +175,7 @@ ByteDance Api Url. > `https://xxxx/xxx` - 多个地址以`,`相连 -### `CUSTOM_MODELS` (可选) +### `CUSTOM_MODELS` > 示例:`+qwen-7b-chat,+glm-6b,-gpt-3.5-turbo,gpt-4-1106-preview=gpt-4-turbo` 表示增加 `qwen-7b-chat` 和 `glm-6b` 到模型列表,而从列表中删除 `gpt-3.5-turbo`,并将 `gpt-4-1106-preview` 模型名字展示为 `gpt-4-turbo`。 > 如果你想先禁用所有模型,再启用指定模型,可以使用 `-all,+gpt-3.5-turbo`,则表示仅启用 `gpt-3.5-turbo` @@ -192,11 +189,11 @@ ByteDance Api Url. > 示例: `+Doubao-lite-4k@bytedance=ep-xxxxx-xxx`这个配置会在模型列表显示一个`Doubao-lite-4k(ByteDance)`的选项 -### `DEFAULT_MODEL` (可选) +### `DEFAULT_MODEL` 更改默认模型 -### `DEFAULT_INPUT_TEMPLATE` (可选) +### `DEFAULT_INPUT_TEMPLATE` 自定义默认的 template,用于初始化『设置』中的『用户输入预处理』配置项