@lobehub/chat 0.128.4 → 0.128.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (74) hide show
  1. package/.i18nrc.js +1 -1
  2. package/CHANGELOG.md +50 -0
  3. package/README.md +3 -3
  4. package/README.zh-CN.md +2 -2
  5. package/contributing/Upstream-Sync.md +58 -0
  6. package/contributing/Upstream-Sync.zh-CN.md +58 -0
  7. package/docs/{environment-variables/common.mdx → self-hosting/environment-variables/basic.mdx} +7 -0
  8. package/docs/{environment-variables/common.zh-CN.mdx → self-hosting/environment-variables/basic.zh-CN.mdx} +7 -0
  9. package/docs/self-hosting/platform/sealos.mdx +28 -0
  10. package/docs/self-hosting/platform/sealos.zh-CN.mdx +28 -0
  11. package/docs/self-hosting/platform/zeabur.mdx +28 -0
  12. package/docs/self-hosting/platform/zeabur.zh-CN.mdx +28 -0
  13. package/docs/{agents → usage/agents}/prompt.mdx +1 -1
  14. package/docs/{agents → usage/agents}/topics.mdx +1 -2
  15. package/package.json +2 -2
  16. package/src/app/api/auth/next-auth.ts +1 -0
  17. package/src/const/url.ts +4 -6
  18. package/src/middleware.ts +4 -1
  19. package/docs/self-hosting/environment-variable.mdx +0 -340
  20. package/docs/self-hosting/environment-variable.zh-CN.mdx +0 -344
  21. /package/docs/self-hosting/{analytics.mdx → advanced/analytics.mdx} +0 -0
  22. /package/docs/self-hosting/{analytics.zh-CN.mdx → advanced/analytics.zh-CN.mdx} +0 -0
  23. /package/docs/self-hosting/{authentication.mdx → advanced/authentication.mdx} +0 -0
  24. /package/docs/self-hosting/{authentication.zh-CN.mdx → advanced/authentication.zh-CN.mdx} +0 -0
  25. /package/docs/self-hosting/{upstream-sync.mdx → advanced/upstream-sync.mdx} +0 -0
  26. /package/docs/self-hosting/{upstream-sync.zh-CN.mdx → advanced/upstream-sync.zh-CN.mdx} +0 -0
  27. /package/docs/{environment-variables → self-hosting/environment-variables}/model-provider.mdx +0 -0
  28. /package/docs/{environment-variables → self-hosting/environment-variables}/model-provider.zh-CN.mdx +0 -0
  29. /package/docs/self-hosting/{deploy-with-azure-openai.mdx → examples/azure-openai.mdx} +0 -0
  30. /package/docs/self-hosting/{deploy-with-azure-openai.zh-CN.mdx → examples/azure-openai.zh-CN.mdx} +0 -0
  31. /package/docs/{common-errors → self-hosting/faq}/no-v1-suffix.mdx +0 -0
  32. /package/docs/{common-errors → self-hosting/faq}/no-v1-suffix.zh-CN.mdx +0 -0
  33. /package/docs/{common-errors → self-hosting/faq}/proxy-with-unable-to-verify-leaf-signature.mdx +0 -0
  34. /package/docs/{common-errors → self-hosting/faq}/proxy-with-unable-to-verify-leaf-signature.zh-CN.mdx +0 -0
  35. /package/docs/self-hosting/{docker-compose.mdx → platform/docker-compose.mdx} +0 -0
  36. /package/docs/self-hosting/{docker-compose.zh-CN.mdx → platform/docker-compose.zh-CN.mdx} +0 -0
  37. /package/docs/self-hosting/{docker.mdx → platform/docker.mdx} +0 -0
  38. /package/docs/self-hosting/{docker.zh-CN.mdx → platform/docker.zh-CN.mdx} +0 -0
  39. /package/docs/self-hosting/{vercel.mdx → platform/vercel.mdx} +0 -0
  40. /package/docs/self-hosting/{vercel.zh-CN.mdx → platform/vercel.zh-CN.mdx} +0 -0
  41. /package/docs/{agents → usage/agents}/concepts.mdx +0 -0
  42. /package/docs/{agents → usage/agents}/concepts.zh-CN.mdx +0 -0
  43. /package/docs/{agents → usage/agents}/custom-agent.mdx +0 -0
  44. /package/docs/{agents → usage/agents}/custom-agent.zh-CN.mdx +0 -0
  45. /package/docs/{agents → usage/agents}/model.mdx +0 -0
  46. /package/docs/{agents → usage/agents}/model.zh-CN.mdx +0 -0
  47. /package/docs/{agents → usage/agents}/prompt.zh-CN.mdx +0 -0
  48. /package/docs/{agents → usage/agents}/topics.zh-CN.mdx +0 -0
  49. /package/docs/usage/{agent-market.mdx → features/agent-market.mdx} +0 -0
  50. /package/docs/usage/{agent-market.zh-CN.mdx → features/agent-market.zh-CN.mdx} +0 -0
  51. /package/docs/usage/{mobile.mdx → features/mobile.mdx} +0 -0
  52. /package/docs/usage/{mobile.zh-CN.mdx → features/mobile.zh-CN.mdx} +0 -0
  53. /package/docs/usage/{more.mdx → features/more.mdx} +0 -0
  54. /package/docs/usage/{more.zh-CN.mdx → features/more.zh-CN.mdx} +0 -0
  55. /package/docs/usage/{plugin-system.mdx → features/plugin-system.mdx} +0 -0
  56. /package/docs/usage/{plugin-system.zh-CN.mdx → features/plugin-system.zh-CN.mdx} +0 -0
  57. /package/docs/usage/{pwa.mdx → features/pwa.mdx} +0 -0
  58. /package/docs/usage/{pwa.zh-CN.mdx → features/pwa.zh-CN.mdx} +0 -0
  59. /package/docs/usage/{text-to-image.mdx → features/text-to-image.mdx} +0 -0
  60. /package/docs/usage/{text-to-image.zh-CN.mdx → features/text-to-image.zh-CN.mdx} +0 -0
  61. /package/docs/usage/{theme.mdx → features/theme.mdx} +0 -0
  62. /package/docs/usage/{theme.zh-CN.mdx → features/theme.zh-CN.mdx} +0 -0
  63. /package/docs/usage/{tts.mdx → features/tts.mdx} +0 -0
  64. /package/docs/usage/{tts.zh-CN.mdx → features/tts.zh-CN.mdx} +0 -0
  65. /package/docs/usage/{vision.mdx → features/vision.mdx} +0 -0
  66. /package/docs/usage/{vision.zh-CN.mdx → features/vision.zh-CN.mdx} +0 -0
  67. /package/docs/{plugins → usage/plugins}/basic-usage.mdx +0 -0
  68. /package/docs/{plugins → usage/plugins}/basic-usage.zh-CN.mdx +0 -0
  69. /package/docs/{plugins → usage/plugins}/custom-plugin.mdx +0 -0
  70. /package/docs/{plugins → usage/plugins}/custom-plugin.zh-CN.mdx +0 -0
  71. /package/docs/{plugins → usage/plugins}/plugin-development.mdx +0 -0
  72. /package/docs/{plugins → usage/plugins}/plugin-development.zh-CN.mdx +0 -0
  73. /package/docs/{plugins → usage/plugins}/plugin-store.mdx +0 -0
  74. /package/docs/{plugins → usage/plugins}/plugin-store.zh-CN.mdx +0 -0
package/.i18nrc.js CHANGED
@@ -22,7 +22,7 @@ module.exports = defineConfig({
22
22
  'vi-VN',
23
23
  ],
24
24
  temperature: 0,
25
- modelName: 'gpt-3.5-turbo-0125',
25
+ modelName: 'gpt-3.5-turbo-1106',
26
26
  splitToken: 1024,
27
27
  experimental: {
28
28
  jsonMode: true,
package/CHANGELOG.md CHANGED
@@ -2,6 +2,56 @@
2
2
 
3
3
  # Changelog
4
4
 
5
+ ### [Version 0.128.6](https://github.com/lobehub/lobe-chat/compare/v0.128.5...v0.128.6)
6
+
7
+ <sup>Released on **2024-02-20**</sup>
8
+
9
+ #### 🐛 Bug Fixes
10
+
11
+ - **misc**: Fix OAuth errors on Docker deployment.
12
+
13
+ <br/>
14
+
15
+ <details>
16
+ <summary><kbd>Improvements and Fixes</kbd></summary>
17
+
18
+ #### What's fixed
19
+
20
+ - **misc**: Fix OAuth errors on Docker deployment, closes [#1323](https://github.com/lobehub/lobe-chat/issues/1323) ([922e843](https://github.com/lobehub/lobe-chat/commit/922e843))
21
+
22
+ </details>
23
+
24
+ <div align="right">
25
+
26
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top)
27
+
28
+ </div>
29
+
30
+ ### [Version 0.128.5](https://github.com/lobehub/lobe-chat/compare/v0.128.4...v0.128.5)
31
+
32
+ <sup>Released on **2024-02-18**</sup>
33
+
34
+ #### 🐛 Bug Fixes
35
+
36
+ - **misc**: Fix the document url.
37
+
38
+ <br/>
39
+
40
+ <details>
41
+ <summary><kbd>Improvements and Fixes</kbd></summary>
42
+
43
+ #### What's fixed
44
+
45
+ - **misc**: Fix the document url ([43b5677](https://github.com/lobehub/lobe-chat/commit/43b5677))
46
+
47
+ </details>
48
+
49
+ <div align="right">
50
+
51
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top)
52
+
53
+ </div>
54
+
5
55
  ### [Version 0.128.4](https://github.com/lobehub/lobe-chat/compare/v0.128.3...v0.128.4)
6
56
 
7
57
  <sup>Released on **2024-02-18**</sup>
package/README.md CHANGED
@@ -227,12 +227,12 @@ Our marketplace is not just a showcase platform but also a collaborative space.
227
227
 
228
228
  | Recent Submits | Description |
229
229
  | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
230
+ | [SPI Generator](https://chat-preview.lobehub.com/market?agent=spi-generator)<br/><sup>By **[fanling](https://github.com/fanling)** on **2024-02-18**</sup> | Enter the potential customer's name to generate SPI<br/>`tezign` |
230
231
  | [Product Copywriting](https://chat-preview.lobehub.com/market?agent=copywriting)<br/><sup>By **[pllz7](https://github.com/pllz7)** on **2024-02-14**</sup> | Expert in persuasive copywriting and consumer psychology<br/>`ecommerce` |
231
232
  | [Private Domain Operations Expert](https://chat-preview.lobehub.com/market?agent=gl-syyy)<br/><sup>By **[guling-io](https://github.com/guling-io)** on **2024-02-14**</sup> | Specializing in private domain operations, traffic acquisition, user retention, conversion, and content planning. Familiar with marketing theories and related classic works.<br/>`private-domain-operations` `traffic-acquisition` `user-retention` `conversion` `content-planning` |
232
233
  | [Self-Media Operation Expert](https://chat-preview.lobehub.com/market?agent=gl-zmtyy)<br/><sup>By **[guling-io](https://github.com/guling-io)** on **2024-02-14**</sup> | Specialized in self-media operation and content creation<br/>`self-media-operation` `social-media` `content-creation` `fan-growth` `brand-promotion` |
233
- | [Product Description](https://chat-preview.lobehub.com/market?agent=product-description)<br/><sup>By **[pllz7](https://github.com/pllz7)** on **2024-02-14**</sup> | Craft compelling product descriptions that boost e-commerce sales<br/>`ecommerce` |
234
234
 
235
- > 📊 Total agents: [<kbd>**177**</kbd> ](https://github.com/lobehub/lobe-chat-agents)
235
+ > 📊 Total agents: [<kbd>**178**</kbd> ](https://github.com/lobehub/lobe-chat-agents)
236
236
 
237
237
  <!-- AGENT LIST -->
238
238
 
@@ -244,7 +244,7 @@ Our marketplace is not just a showcase platform but also a collaborative space.
244
244
 
245
245
  ![](https://gw.alipayobjects.com/zos/kitchen/69x6bllkX3/pwa.webp)
246
246
 
247
- #### `6` Progress Web App
247
+ #### `6` Progressive Web App
248
248
 
249
249
  We deeply understand the importance of providing a seamless experience for users in today's multi-device environment.
250
250
  Therefore, we have adopted Progressive Web Application ([PWA](https://support.google.com/chrome/answer/9658361)) technology,
package/README.zh-CN.md CHANGED
@@ -207,12 +207,12 @@ LobeChat 的插件生态系统是其核心功能的重要扩展,它极大地
207
207
 
208
208
  | 最近新增 | 助手说明 |
209
209
  | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- |
210
+ | [SPI 生成器](https://chat-preview.lobehub.com/market?agent=spi-generator)<br/><sup>By **[fanling](https://github.com/fanling)** on **2024-02-18**</sup> | 请输入潜在客户名称,生成 SPI<br/>`特赞` |
210
211
  | [产品文案撰写](https://chat-preview.lobehub.com/market?agent=copywriting)<br/><sup>By **[pllz7](https://github.com/pllz7)** on **2024-02-14**</sup> | 精通有说服力的文案撰写和消费者心理学<br/>`电子商务` |
211
212
  | [私域运营专家](https://chat-preview.lobehub.com/market?agent=gl-syyy)<br/><sup>By **[guling-io](https://github.com/guling-io)** on **2024-02-14**</sup> | 擅长私域运营、引流、承接、转化和内容策划,熟悉营销理论和相关经典著作。<br/>`私域运营` `引流` `承接` `转化` `内容策划` |
212
213
  | [自媒体运营专家](https://chat-preview.lobehub.com/market?agent=gl-zmtyy)<br/><sup>By **[guling-io](https://github.com/guling-io)** on **2024-02-14**</sup> | 擅长自媒体运营与内容创作<br/>`自媒体运营` `社交媒体` `内容创作` `粉丝增长` `品牌推广` |
213
- | [产品描述](https://chat-preview.lobehub.com/market?agent=product-description)<br/><sup>By **[pllz7](https://github.com/pllz7)** on **2024-02-14**</sup> | 打造引人入胜的产品描述,提升电子商务销售业绩<br/>`电子商务` |
214
214
 
215
- > 📊 Total agents: [<kbd>**177**</kbd> ](https://github.com/lobehub/lobe-chat-agents)
215
+ > 📊 Total agents: [<kbd>**178**</kbd> ](https://github.com/lobehub/lobe-chat-agents)
216
216
 
217
217
  <!-- AGENT LIST -->
218
218
 
@@ -0,0 +1,58 @@
1
+ # Upstream Sync
2
+
3
+ English | [简体中文](https://github.com/lobehub/lobe-chat/wiki/Upstream-Sync.zh-CN)
4
+
5
+ ## `A` Vercel / Zeabur Deployment
6
+
7
+ If you have deployed your own project following the one-click deployment steps in the README, you might encounter constant prompts indicating "updates available". This is because Vercel defaults to creating a new project instead of forking this one, resulting in an inability to accurately detect updates. We suggest you redeploy using the following steps:
8
+
9
+ - Remove the original repository;
10
+ - Use the <kbd>Fork</kbd> button at the top right corner of the page to fork this project;
11
+ - Re-select and deploy on `Vercel`.
12
+
13
+ ## Enabling Automatic Updates
14
+
15
+ > \[!NOTE]
16
+ >
17
+ > If you encounter an error executing Upstream Sync, manually Sync Fork once
18
+
19
+ Once you have forked the project, due to Github restrictions, you will need to manually enable Workflows on the Actions page of your forked project and activate the Upstream Sync Action. Once enabled, you can set up hourly automatic updates.
20
+
21
+ ![](https://github-production-user-asset-6210df.s3.amazonaws.com/17870709/266985117-4d48fe7b-0412-4667-8129-b25ebcf2c9de.png)
22
+ ![](https://github-production-user-asset-6210df.s3.amazonaws.com/17870709/266985177-7677b4ce-c348-4145-9f60-829d448d5be6.png)
23
+
24
+ ## `B` Docker Deployment
25
+
26
+ Upgrading the Docker deployment version is very simple, just redeploy the latest image of LobeChat. Here are the instructions to perform these steps:
27
+
28
+ 1. Stop and delete the currently running LobeChat container (assuming the name of the LobeChat container is `lobe-chat`):
29
+
30
+ ```fish
31
+ docker stop lobe-chat
32
+ docker rm lobe-chat
33
+ ```
34
+
35
+ 2. Pull the latest Docker image of LobeChat:
36
+
37
+ ```fish
38
+ docker pull lobehub/lobe-chat
39
+ ```
40
+
41
+ 3. Redeploy the LobeChat container using the newly pulled image:
42
+
43
+ ```fish
44
+ docker run -d -p 3210:3210 \
45
+ -e OPENAI_API_KEY=sk-xxxx \
46
+ -e OPENAI_PROXY_URL=https://api-proxy.com/v1 \
47
+ -e ACCESS_CODE=lobe66 \
48
+ --name lobe-chat \
49
+ lobehub/lobe-chat
50
+ ```
51
+
52
+ Make sure you have sufficient permissions to stop and delete the container before executing these commands, and Docker has sufficient permissions to pull the new image.
53
+
54
+ > \[!NOTE]
55
+ >
56
+ > If I redeploy, will my local chat history be lost?
57
+ >
58
+ > Don't worry, all of LobeChat's chat history is stored in your local browser. Therefore, when you redeploy LobeChat using Docker, your chat history will not be lost.
@@ -0,0 +1,58 @@
1
+ # 自部署保持更新
2
+
3
+ [English](https://github.com/lobehub/lobe-chat/wiki/Upstream-Sync) | 简体中文
4
+
5
+ ## `A` Vercel / Zeabur 部署
6
+
7
+ 如果你根据 README 中的一键部署步骤部署了自己的项目,你可能会发现总是被提示 “有可用更新”。这是因为 Vercel 默认为你创建新项目而非 fork 本项目,这将导致无法准确检测更新。我们建议按照以下步骤重新部署:
8
+
9
+ - 删除原有的仓库;
10
+ - 使用页面右上角的 <kbd>Fork</kbd> 按钮,Fork 本项目;
11
+ - 在 `Vercel` 上重新选择并部署。
12
+
13
+ ### 启动自动更新
14
+
15
+ > \[!NOTE]
16
+ >
17
+ > 如果你在执行 `Upstream Sync` 时遇到错误,请手动执再行一次
18
+
19
+ 当你 Fork 了项目后,由于 Github 的限制,你需要手动在你 Fork 的项目的 Actions 页面启用 Workflows,并启动 Upstream Sync Action。启用后,你可以设置每小时进行一次自动更新。
20
+
21
+ ![](https://github-production-user-asset-6210df.s3.amazonaws.com/17870709/266985117-4d48fe7b-0412-4667-8129-b25ebcf2c9de.png)
22
+ ![](https://github-production-user-asset-6210df.s3.amazonaws.com/17870709/266985177-7677b4ce-c348-4145-9f60-829d448d5be6.png)
23
+
24
+ ## `B` Docker 部署
25
+
26
+ Docker 部署版本的升级非常简单,只需要重新部署 LobeChat 的最新镜像即可。 以下是执行这些步骤所需的指令:
27
+
28
+ 1. 停止并删除当前运行的 LobeChat 容器(假设 LobeChat 容器的名称是 `lobe-chat`):
29
+
30
+ ```fish
31
+ docker stop lobe-chat
32
+ docker rm lobe-chat
33
+ ```
34
+
35
+ 2. 拉取 LobeChat 的最新 Docker 镜像:
36
+
37
+ ```fish
38
+ docker pull lobehub/lobe-chat
39
+ ```
40
+
41
+ 3. 使用新拉取的镜像重新部署 LobeChat 容器:
42
+
43
+ ```fish
44
+ docker run -d -p 3210:3210 \
45
+ -e OPENAI_API_KEY=sk-xxxx \
46
+ -e OPENAI_PROXY_URL=https://api-proxy.com/v1 \
47
+ -e ACCESS_CODE=lobe66 \
48
+ --name lobe-chat \
49
+ lobehub/lobe-chat
50
+ ```
51
+
52
+ 确保在执行这些命令之前,您有足够的权限来停止和删除容器,并且 Docker 有足够的权限来拉取新的镜像。
53
+
54
+ > \[!NOTE]
55
+ >
56
+ > 重新部署的话,我本地的聊天记录会丢失吗?
57
+ >
58
+ > 放心,LobeChat 的聊天记录全部都存储在你的本地浏览器中。因此使用 Docker 重新部署 LobeChat 时,你的聊天记录并不会丢失。
@@ -71,6 +71,13 @@ Further reading:
71
71
  - Default: `-`
72
72
  - Example: `Tfhi2t2pelSMEA8eaV61KaqPNEndFFdMIxDaJnS1CUI=`
73
73
 
74
+ #### `NEXTAUTH_URL`
75
+
76
+ - Type: Optional
77
+ - Description: This URL is used to specify the callback address for Auth.js during OAuth authentication. It does not need to be set when deploying on Vercel.
78
+ - Default: `-`
79
+ - Example: `https://example.com/api/auth`
80
+
74
81
  ### Auth0
75
82
 
76
83
  <Callout>
@@ -71,6 +71,13 @@ LobeChat 在部署时提供了一些额外的配置项,你可以使用环境
71
71
  - 默认值: `-`
72
72
  - 示例: `Tfhi2t2pelSMEA8eaV61KaqPNEndFFdMIxDaJnS1CUI=`
73
73
 
74
+ #### `NEXTAUTH_URL`
75
+
76
+ - 类型:可选
77
+ - 描述:该URL用于指定Auth.js在执行OAuth验证时的回调地址,在Vercel上部署时无需设置。
78
+ - 默认值:`-`
79
+ - 示例:`https://example.com/api/auth`
80
+
74
81
  ### Auth0
75
82
 
76
83
  <Callout>
@@ -0,0 +1,28 @@
1
+ import { Steps } from 'nextra/components';
2
+
3
+ # Deploying LobeChat on SealOS
4
+
5
+ If you want to deploy LobeChat on SealOS, you can follow the steps below:
6
+
7
+ ## SealOS Deployment Process
8
+
9
+ <Steps>
10
+
11
+ ### Prepare your OpenAI API Key
12
+
13
+ Go to [OpenAI](https://platform.openai.com/account/api-keys) to get your OpenAI API Key.
14
+
15
+ ### Click the button below to deploy
16
+
17
+ [![][deploy-button-image]][deploy-link]
18
+
19
+ ### After deployment, you can start using it
20
+
21
+ ### Bind a custom domain (optional)
22
+
23
+ You can use the subdomain provided by SealOS, or choose to bind a custom domain. Currently, the domains provided by SealOS have not been contaminated, and can be directly accessed in most regions.
24
+
25
+ </Steps>
26
+
27
+ [deploy-button-image]: https://raw.githubusercontent.com/labring-actions/templates/main/Deploy-on-Sealos.svg
28
+ [deploy-link]: https://cloud.sealos.io/?openapp=system-template%3FtemplateName%3Dlobe-chat
@@ -0,0 +1,28 @@
1
+ import { Steps } from 'nextra/components';
2
+
3
+ # 使用 SealOS 部署
4
+
5
+ 如果想在 SealOS 上部署 LobeChat,可以按照以下步骤进行操作:
6
+
7
+ ## SealOS 部署流程
8
+
9
+ <Steps>
10
+
11
+ ### 准备好你的 OpenAI API Key
12
+
13
+ 前往 [OpenAI](https://platform.openai.com/account/api-keys) 获取你的 OpenAI API Key
14
+
15
+ ### 点击下方按钮进行部署
16
+
17
+ [![][deploy-button-image]][deploy-link]
18
+
19
+ [deploy-button-image]: https://raw.githubusercontent.com/labring-actions/templates/main/Deploy-on-Sealos.svg
20
+ [deploy-link]: https://cloud.sealos.io/?openapp=system-template%3FtemplateName%3Dlobe-chat
21
+
22
+ ### 部署完毕后,即可开始使用
23
+
24
+ ### 绑定自定义域名(可选)
25
+
26
+ 你可以使用 SealOS 提供的子域名,也可以选择绑定自定义域名。目前 SealOS 提供的域名还未被污染,大多数地区都可以直连。
27
+
28
+ </Steps>
@@ -0,0 +1,28 @@
1
+ import { Steps } from 'nextra/components';
2
+
3
+ # Deploying on Zeabur
4
+
5
+ If you want to deploy LobeChat on Zeabur, you can follow the steps below:
6
+
7
+ ## Zeabur Deployment Process
8
+
9
+ <Steps>
10
+
11
+ ### Prepare your OpenAI API Key
12
+
13
+ Go to [OpenAI API Key](https://platform.openai.com/account/api-keys) to get your OpenAI API Key.
14
+
15
+ ### Click the button below to deploy
16
+
17
+ [![][deploy-button-image]][deploy-link]
18
+
19
+ ### Once deployed, you can start using it
20
+
21
+ ### Bind a custom domain (optional)
22
+
23
+ You can use the subdomain provided by Zeabur, or choose to bind a custom domain. Currently, the domains provided by Zeabur have not been contaminated, and most regions can connect directly.
24
+
25
+ </Steps>
26
+
27
+ [deploy-button-image]: https://zeabur.com/button.svg
28
+ [deploy-link]: https://zeabur.com/templates/VZGGTI
@@ -0,0 +1,28 @@
1
+ import { Steps } from 'nextra/components';
2
+
3
+ # 使用 Zeabur 部署
4
+
5
+ 如果想在 Zeabur 上部署 LobeChat,可以按照以下步骤进行操作:
6
+
7
+ ## Zeabur 部署流程
8
+
9
+ <Steps>
10
+
11
+ ### 准备好你的 OpenAI API Key
12
+
13
+ 前往 [OpenAI API Key](https://platform.openai.com/account/api-keys) 获取你的 OpenAI API Key
14
+
15
+ ### 点击下方按钮进行部署
16
+
17
+ [![][deploy-button-image]][deploy-link]
18
+
19
+ [deploy-button-image]: https://zeabur.com/button.svg
20
+ [deploy-link]: https://zeabur.com/templates/VZGGTI
21
+
22
+ ### 部署完毕后,即可开始使用
23
+
24
+ ### 绑定自定义域名(可选)
25
+
26
+ 你可以使用 Zeabur 提供的子域名,也可以选择绑定自定义域名。目前 Zeabur 提供的域名还未被污染,大多数地区都可以直连。
27
+
28
+ </Steps>
@@ -93,4 +93,4 @@ Using the prompt extensions, we can iteratively write and iterate at each step.
93
93
 
94
94
  ## Further Reading
95
95
 
96
- - **Learn Prompting**: https://learnprompting.org/en-US/docs/intro
96
+ - **Learn Prompting**: https://learnprompting.org/en-US/docs/intro
@@ -3,5 +3,4 @@
3
3
  ![](https://github-production-user-asset-6210df.s3.amazonaws.com/17870709/279602496-fd72037a-735e-4cc2-aa56-2994bceaba81.png)
4
4
 
5
5
  - **Save Topic:** During a conversation, if you want to save the current context and start a new topic, you can click the save button next to the send button.
6
- - **Topic List:** Clicking on a topic in the list allows for quick switching of historical conversation records and continuing the conversation. You can also use the star icon <kbd>⭐️</kbd> to pin favorite topics to the top, or use the more button on the right to rename or delete topics.
7
-
6
+ - **Topic List:** Clicking on a topic in the list allows for quick switching of historical conversation records and continuing the conversation. You can also use the star icon <kbd>⭐️</kbd> to pin favorite topics to the top, or use the more button on the right to rename or delete topics.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobehub/chat",
3
- "version": "0.128.4",
3
+ "version": "0.128.6",
4
4
  "description": "Lobe Chat - an open-source, high-performance chatbot framework that supports speech synthesis, multimodal, and extensible Function Call plugin system. Supports one-click free deployment of your private ChatGPT/LLM web application.",
5
5
  "keywords": [
6
6
  "framework",
@@ -106,7 +106,7 @@
106
106
  "modern-screenshot": "^4",
107
107
  "nanoid": "^5",
108
108
  "next": "^14.1",
109
- "next-auth": "beta",
109
+ "next-auth": "5.0.0-beta.11",
110
110
  "numeral": "^2.0.6",
111
111
  "nuqs": "^1.15.4",
112
112
  "openai": "^4.22",
@@ -17,6 +17,7 @@ const nextAuth = NextAuth({
17
17
  ]
18
18
  : [],
19
19
  secret: NEXTAUTH_SECRET,
20
+ trustHost: true,
20
21
  });
21
22
 
22
23
  export const {
package/src/const/url.ts CHANGED
@@ -11,12 +11,11 @@ export const CHANGELOG = urlJoin(GITHUB, 'blob/master/CHANGELOG.md');
11
11
 
12
12
  const { LOBE_CHAT_DOCS } = getClientConfig();
13
13
 
14
- export const DOCUMENTS = !!LOBE_CHAT_DOCS
15
- ? urlJoin(LOBE_CHAT_DOCS, '/docs')
16
- : 'https://chat-docs.lobehub.com';
14
+ export const DOCUMENTS = !!LOBE_CHAT_DOCS ? '/docs' : 'https://chat-docs.lobehub.com';
17
15
 
18
- const WIKI = urlJoin(GITHUB, 'wiki');
19
- export const WIKI_PLUGIN_GUIDE = urlJoin(WIKI, 'Plugin-Development');
16
+ export const WIKI_PLUGIN_GUIDE = urlJoin(GITHUB, 'wiki', 'Plugin-Development');
17
+
18
+ export const MANUAL_UPGRADE_URL = urlJoin(GITHUB, 'wiki', 'Upstream-Sync');
20
19
 
21
20
  export const ABOUT = pkg.homepage;
22
21
  export const FEEDBACK = pkg.bugs.url;
@@ -32,6 +31,5 @@ export const AGENTS_INDEX_GITHUB_ISSUE = urlJoin(AGENTS_INDEX_GITHUB, 'issues/ne
32
31
 
33
32
  export const SESSION_CHAT_URL = (id: string = INBOX_SESSION_ID, mobile?: boolean) =>
34
33
  mobile ? `/chat/mobile?session=${id}` : `/chat?session=${id}`;
35
- export const MANUAL_UPGRADE_URL = 'https://github.com/lobehub/lobe-chat/wiki/Upstream-Sync';
36
34
 
37
35
  export const imageUrl = (filename: string) => withBasePath(`/images/${filename}`);
package/src/middleware.ts CHANGED
@@ -13,7 +13,10 @@ const defaultMiddleware = () => NextResponse.next();
13
13
  const withAuthMiddleware = auth((req) => {
14
14
  // Just check if session exists
15
15
  const session = req.auth;
16
- const isLoggedIn = !!session;
16
+
17
+ // Check if next-auth throws errors
18
+ // refs: https://github.com/lobehub/lobe-chat/pull/1323
19
+ const isLoggedIn = !!session?.expires;
17
20
 
18
21
  // Remove & amend OAuth authorized header
19
22
  const requestHeaders = new Headers(req.headers);