From 9e8a81e66020d1618fef54541ee427460838a8d7 Mon Sep 17 00:00:00 2001 From: wehub-resource-sync Date: Mon, 13 Jul 2026 10:28:35 +0000 Subject: [PATCH] docs: make Chinese README the default --- README.md | 174 ++++++++++++++++++++++++++++-------------------------- 1 file changed, 90 insertions(+), 84 deletions(-) diff --git a/README.md b/README.md index 1d50749..0c36421 100644 --- a/README.md +++ b/README.md @@ -1,78 +1,84 @@ + +> [!NOTE] +> 本文档由 WeHub 基于上游 README 翻译整理,属于社区翻译,非官方中文文档。 +> [English](./README.en.md) · [原始项目](https://github.com/mckaywrigley/chatbot-ui) · [上游 README](https://github.com/mckaywrigley/chatbot-ui/blob/HEAD/README.md) +> 原作者、版权与许可证归属以原始项目及本仓库 LICENSE 文件为准。 + # Chatbot UI -The open-source AI chat app for everyone. +面向所有人的开源 AI 聊天应用。 Chatbot UI ## Demo -View the latest demo [here](https://x.com/mckaywrigley/status/1738273242283151777?s=20). +在此查看最新演示 [here](https://x.com/mckaywrigley/status/1738273242283151777?s=20). ## Updates -Hey everyone! I've heard your feedback and am working hard on a big update. +大家好!我已收到大家的反馈,正在努力推进一次重大更新。 -Things like simpler deployment, better backend compatibility, and improved mobile layouts are on their way. +更简单的部署方式、更好的后端兼容性,以及改进的移动端布局等功能即将推出。 -Be back soon. +很快回来。 -- Mckay ## Official Hosted Version -Use Chatbot UI without having to host it yourself! +无需自行托管即可使用 Chatbot UI! -Find the official hosted version of Chatbot UI [here](https://chatbotui.com). +在此查找 Chatbot UI 的官方托管版本 [here](https://chatbotui.com). ## Sponsor -If you find Chatbot UI useful, please consider [sponsoring](https://github.com/sponsors/mckaywrigley) me to support my open-source work :) +如果你觉得 Chatbot UI 有用,请考虑 [sponsoring](https://github.com/sponsors/mckaywrigley) 我以支持我的开源工作 :) ## Issues -We restrict "Issues" to actual issues related to the codebase. +我们将 "Issues" 限制为与代码库相关的实际问题。 -We're getting excessive amounts of issues that amount to things like feature requests, cloud provider issues, etc. +我们收到了过多与功能请求、云服务商问题等类似的问题。 -If you are having issues with things like setup, please refer to the "Help" section in the "Discussions" tab above. +如果你在设置等方面遇到问题,请参阅上方 "Discussions" 标签页中的 "Help" 部分。 -Issues unrelated to the codebase will likely be closed immediately. +与代码库无关的 Issue 可能会被立即关闭。 ## Discussions -We highly encourage you to participate in the "Discussions" tab above! +我们强烈鼓励你参与上方的 "Discussions" 标签页! -Discussions are a great place to ask questions, share ideas, and get help. +Discussions 是提问、分享想法和获取帮助的好地方。 -Odds are if you have a question, someone else has the same question. +很可能如果你有某个问题,其他人也有同样的问题。 ## Legacy Code -Chatbot UI was recently updated to its 2.0 version. +Chatbot UI 最近已更新至 2.0 版本。 -The code for 1.0 can be found on the `legacy` branch. +1.0 版本的代码可在 `legacy` 分支上找到。 ## Updating -In your terminal at the root of your local Chatbot UI repository, run: +在你本地 Chatbot UI 仓库根目录的终端中,运行: ```bash npm run update ``` -If you run a hosted instance you'll also need to run: +如果你运行的是托管实例,还需要运行: ```bash npm run db-push ``` -to apply the latest migrations to your live database. +以将最新迁移应用到你的线上数据库。 ## Local Quickstart -Follow these steps to get your own Chatbot UI instance running locally. +按照以下步骤在本地运行你自己的 Chatbot UI 实例。 -You can watch the full video tutorial [here](https://www.youtube.com/watch?v=9Qq3-7-HNgw). +你可以在此观看完整视频教程 [here](https://www.youtube.com/watch?v=9Qq3-7-HNgw). ### 1. Clone the Repo @@ -82,7 +88,7 @@ git clone https://github.com/mckaywrigley/chatbot-ui.git ### 2. Install Dependencies -Open a terminal in the root directory of your local Chatbot UI repository and run: +在你本地 Chatbot UI 仓库根目录打开终端并运行: ```bash npm install @@ -92,19 +98,19 @@ npm install #### Why Supabase? -Previously, we used local browser storage to store data. However, this was not a good solution for a few reasons: +此前,我们使用本地浏览器存储来保存数据。然而,出于以下几个原因,这并不是一个好的解决方案: -- Security issues -- Limited storage -- Limits multi-modal use cases +- 安全问题 +- 存储空间有限 +- 限制多模态(multi-modal)使用场景 -We now use Supabase because it's easy to use, it's open-source, it's Postgres, and it has a free tier for hosted instances. +我们现在使用 Supabase,因为它易于使用、开源、基于 Postgres,并且为托管实例提供免费套餐。 -We will support other providers in the future to give you more options. +未来我们将支持其他服务商,为你提供更多选择。 #### 1. Install Docker -You will need to install Docker to run Supabase locally. You can download it [here](https://docs.docker.com/get-docker) for free. +你需要安装 Docker 才能在本地运行 Supabase。你可以在此 [here](https://docs.docker.com/get-docker) 免费下载。 #### 2. Install Supabase CLI @@ -123,7 +129,7 @@ scoop install supabase #### 3. Start Supabase -In your terminal at the root of your local Chatbot UI repository, run: +在你本地 Chatbot UI 仓库根目录的终端中,运行: ```bash supabase start @@ -133,160 +139,160 @@ supabase start #### 1. Environment Variables -In your terminal at the root of your local Chatbot UI repository, run: +在你本地 Chatbot UI 仓库根目录的终端中,运行: ```bash cp .env.local.example .env.local ``` -Get the required values by running: +通过运行以下命令获取所需值: ```bash supabase status ``` -Note: Use `API URL` from `supabase status` for `NEXT_PUBLIC_SUPABASE_URL` +Note: 对 `NEXT_PUBLIC_SUPABASE_URL` 使用来自 `supabase status` 的 `API URL` -Now go to your `.env.local` file and fill in the values. +现在前往你的 `.env.local` 文件并填写这些值。 -If the environment variable is set, it will disable the input in the user settings. +如果设置了该环境变量,用户设置中的对应输入框将被禁用。 #### 2. SQL Setup -In the 1st migration file `supabase/migrations/20240108234540_setup.sql` you will need to replace 2 values with the values you got above: +在第 1 个迁移文件 `supabase/migrations/20240108234540_setup.sql` 中,你需要将 2 个值替换为上面获取的值: -- `project_url` (line 53): `http://supabase_kong_chatbotui:8000` (default) can remain unchanged if you don't change your `project_id` in the `config.toml` file -- `service_role_key` (line 54): You got this value from running `supabase status` +- `project_url`(第 53 行):如果你不更改 `config.toml` 文件中的 `project_id`,则 `http://supabase_kong_chatbotui:8000`(默认值)可以保持不变 +- `service_role_key`(第 54 行):该值来自运行 `supabase status` -This prevents issues with storage files not being deleted properly. +这可以防止存储文件无法被正确删除的问题。 ### 5. Install Ollama (optional for local models) -Follow the instructions [here](https://github.com/jmorganca/ollama#macos). +按照此处的说明操作 [here](https://github.com/jmorganca/ollama#macos). ### 6. Run app locally -In your terminal at the root of your local Chatbot UI repository, run: +在你本地 Chatbot UI 仓库根目录的终端中,运行: ```bash npm run chat ``` -Your local instance of Chatbot UI should now be running at [http://localhost:3000](http://localhost:3000). Be sure to use a compatible node version (i.e. v18). +你的本地 Chatbot UI 实例现在应已在 [http://localhost:3000](http://localhost:3000). 运行。请务必使用兼容的 Node 版本(即 v18)。 -You can view your backend GUI at [http://localhost:54323/project/default/editor](http://localhost:54323/project/default/editor). +你可以在 [http://localhost:54323/project/default/editor](http://localhost:54323/project/default/editor). 查看后端 GUI。 ## Hosted Quickstart -Follow these steps to get your own Chatbot UI instance running in the cloud. +按照以下步骤在云端运行你自己的 Chatbot UI 实例。 -Video tutorial coming soon. +视频教程即将推出。 ### 1. Follow Local Quickstart -Repeat steps 1-4 in "Local Quickstart" above. +重复上文 "Local Quickstart" 中的步骤 1-4。 -You will want separate repositories for your local and hosted instances. +你的本地实例和托管实例应使用不同的仓库。 -Create a new repository for your hosted instance of Chatbot UI on GitHub and push your code to it. +在 GitHub 上为你的 Chatbot UI 托管实例创建一个新仓库,并将代码推送到该仓库。 ### 2. Setup Backend with Supabase #### 1. Create a new project -Go to [Supabase](https://supabase.com/) and create a new project. +前往 [Supabase](https://supabase.com/) 并创建一个新项目。 #### 2. Get Project Values -Once you are in the project dashboard, click on the "Project Settings" icon tab on the far bottom left. +进入项目仪表板后,点击左下角最下方的 "Project Settings" 图标标签页。 -Here you will get the values for the following environment variables: +在此你可以获取以下环境变量的值: -- `Project Ref`: Found in "General settings" as "Reference ID" +- `Project Ref`:在 "General settings" 中以 "Reference ID" 显示 -- `Project ID`: Found in the URL of your project dashboard (Ex: https://supabase.com/dashboard/project//settings/general) +- `Project ID`:在你的项目仪表板 URL 中(例如:https://supabase.com/dashboard/project//settings/general) -While still in "Settings" click on the "API" text tab on the left. +仍在 "Settings" 中时,点击左侧的 "API" 文本标签页。 -Here you will get the values for the following environment variables: +在此你可以获取以下环境变量的值: -- `Project URL`: Found in "API Settings" as "Project URL" +- `Project URL`:在 "API Settings" 中以 "Project URL" 显示 -- `Anon key`: Found in "Project API keys" as "anon public" +- `Anon key`:在 "Project API keys" 中以 "anon public" 显示 -- `Service role key`: Found in "Project API keys" as "service_role" (Reminder: Treat this like a password!) +- `Service role key`:在 "Project API keys" 中以 "service_role" 显示(提醒:请像对待密码一样保管!) #### 3. Configure Auth -Next, click on the "Authentication" icon tab on the far left. +接下来,点击最左侧的 "Authentication" 图标标签页。 -In the text tabs, click on "Providers" and make sure "Email" is enabled. +在文本标签页中,点击 "Providers",并确保 "Email" 已启用。 -We recommend turning off "Confirm email" for your own personal instance. +我们建议为你自己的个人实例关闭 "Confirm email"。 #### 4. Connect to Hosted DB -Open up your repository for your hosted instance of Chatbot UI. +打开你的 Chatbot UI 托管实例仓库。 -In the 1st migration file `supabase/migrations/20240108234540_setup.sql` you will need to replace 2 values with the values you got above: +在第 1 个迁移文件 `supabase/migrations/20240108234540_setup.sql` 中,你需要将 2 个值替换为上面获取的值: -- `project_url` (line 53): Use the `Project URL` value from above -- `service_role_key` (line 54): Use the `Service role key` value from above +- `project_url`(第 53 行):使用上面的 `Project URL` 值 +- `service_role_key`(第 54 行):使用上面的 `Service role key` 值 -Now, open a terminal in the root directory of your local Chatbot UI repository. We will execute a few commands here. +现在,在你本地 Chatbot UI 仓库根目录打开终端。我们将在此执行几条命令。 -Login to Supabase by running: +通过运行以下命令登录 Supabase: ```bash supabase login ``` -Next, link your project by running the following command with the "Project ID" you got above: +接下来,使用上面获取的 "Project ID" 运行以下命令以关联你的项目: ```bash supabase link --project-ref ``` -Your project should now be linked. +你的项目现在应已关联。 -Finally, push your database to Supabase by running: +最后,通过运行以下命令将数据库推送到 Supabase: ```bash supabase db push ``` -Your hosted database should now be set up! +你的托管数据库现在应已设置完成! ### 3. Setup Frontend with Vercel -Go to [Vercel](https://vercel.com/) and create a new project. +前往 [Vercel](https://vercel.com/) 并创建一个新项目。 -In the setup page, import your GitHub repository for your hosted instance of Chatbot UI. Within the project Settings, in the "Build & Development Settings" section, switch Framework Preset to "Next.js". +在设置页面中,导入你 Chatbot UI 托管实例的 GitHub 仓库。在项目 Settings 的 "Build & Development Settings" 部分,将 Framework Preset 切换为 "Next.js"。 -In environment variables, add the following from the values you got above: +在环境变量中,添加上面获取的以下值: - `NEXT_PUBLIC_SUPABASE_URL` - `NEXT_PUBLIC_SUPABASE_ANON_KEY` - `SUPABASE_SERVICE_ROLE_KEY` -- `NEXT_PUBLIC_OLLAMA_URL` (only needed when using local Ollama models; default: `http://localhost:11434`) +- `NEXT_PUBLIC_OLLAMA_URL`(仅在使用本地 Ollama 模型时需要;默认值:`http://localhost:11434`) -You can also add API keys as environment variables. +你也可以将 API 密钥添加为环境变量。 - `OPENAI_API_KEY` - `AZURE_OPENAI_API_KEY` - `AZURE_OPENAI_ENDPOINT` - `AZURE_GPT_45_VISION_NAME` -For the full list of environment variables, refer to the '.env.local.example' file. If the environment variables are set for API keys, it will disable the input in the user settings. +有关环境变量的完整列表,请参阅 '.env.local.example' 文件。如果为 API 密钥设置了环境变量,用户设置中的对应输入框将被禁用。 -Click "Deploy" and wait for your frontend to deploy. +点击 "Deploy" 并等待前端部署完成。 -Once deployed, you should be able to use your hosted instance of Chatbot UI via the URL Vercel gives you. +部署完成后,你应该可以通过 Vercel 提供的 URL 使用你的 Chatbot UI 托管实例。 -## Contributing +## 贡献 -We are working on a guide for contributing. +我们正在编写贡献指南。 -## Contact +## 联系方式 -Message Mckay on [Twitter/X](https://twitter.com/mckaywrigley) +请在 [Twitter/X](https://twitter.com/mckaywrigley) 联系 Mckay