@lobehub/chat 0.147.0 → 0.147.1

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 (103) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/README.md +8 -8
  3. package/README.zh-CN.md +8 -8
  4. package/docs/self-hosting/advanced/analytics.mdx +1 -0
  5. package/docs/self-hosting/advanced/analytics.zh-CN.mdx +1 -0
  6. package/docs/self-hosting/advanced/authentication.mdx +7 -6
  7. package/docs/self-hosting/advanced/authentication.zh-CN.mdx +7 -6
  8. package/docs/self-hosting/advanced/sso-providers/auth0.mdx +58 -32
  9. package/docs/self-hosting/advanced/sso-providers/auth0.zh-CN.mdx +60 -32
  10. package/docs/self-hosting/advanced/sso-providers/authentik.mdx +33 -29
  11. package/docs/self-hosting/advanced/sso-providers/authentik.zh-CN.mdx +30 -27
  12. package/docs/self-hosting/advanced/sso-providers/github.mdx +49 -20
  13. package/docs/self-hosting/advanced/sso-providers/github.zh-CN.mdx +57 -31
  14. package/docs/self-hosting/advanced/sso-providers/microsoft-entra-id.mdx +53 -35
  15. package/docs/self-hosting/advanced/sso-providers/microsoft-entra-id.zh-CN.mdx +43 -31
  16. package/docs/self-hosting/advanced/sso-providers/zitadel.mdx +64 -34
  17. package/docs/self-hosting/advanced/sso-providers/zitadel.zh-CN.mdx +62 -36
  18. package/docs/self-hosting/advanced/upstream-sync.mdx +32 -23
  19. package/docs/self-hosting/advanced/upstream-sync.zh-CN.mdx +32 -23
  20. package/docs/self-hosting/environment-variables/analytics.mdx +1 -0
  21. package/docs/self-hosting/environment-variables/analytics.zh-CN.mdx +1 -0
  22. package/docs/self-hosting/environment-variables/auth.mdx +1 -0
  23. package/docs/self-hosting/environment-variables/auth.zh-CN.mdx +1 -0
  24. package/docs/self-hosting/environment-variables/basic.mdx +1 -0
  25. package/docs/self-hosting/environment-variables/basic.zh-CN.mdx +1 -0
  26. package/docs/self-hosting/environment-variables/model-provider.mdx +1 -0
  27. package/docs/self-hosting/environment-variables/model-provider.zh-CN.mdx +1 -0
  28. package/docs/self-hosting/environment-variables.mdx +1 -0
  29. package/docs/self-hosting/environment-variables.zh-CN.mdx +1 -0
  30. package/docs/self-hosting/examples/azure-openai.mdx +12 -8
  31. package/docs/self-hosting/examples/azure-openai.zh-CN.mdx +12 -8
  32. package/docs/self-hosting/examples/ollama.mdx +1 -0
  33. package/docs/self-hosting/examples/ollama.zh-CN.mdx +1 -0
  34. package/docs/self-hosting/faq/no-v1-suffix.mdx +1 -0
  35. package/docs/self-hosting/faq/no-v1-suffix.zh-CN.mdx +1 -0
  36. package/docs/self-hosting/faq/proxy-with-unable-to-verify-leaf-signature.mdx +1 -0
  37. package/docs/self-hosting/faq/proxy-with-unable-to-verify-leaf-signature.zh-CN.mdx +1 -0
  38. package/docs/self-hosting/platform/docker-compose.mdx +80 -73
  39. package/docs/self-hosting/platform/docker-compose.zh-CN.mdx +79 -73
  40. package/docs/self-hosting/platform/docker.mdx +85 -85
  41. package/docs/self-hosting/platform/docker.zh-CN.mdx +84 -85
  42. package/docs/self-hosting/platform/netlify.mdx +91 -42
  43. package/docs/self-hosting/platform/netlify.zh-CN.mdx +88 -38
  44. package/docs/self-hosting/platform/railway.mdx +8 -6
  45. package/docs/self-hosting/platform/railway.zh-CN.mdx +8 -6
  46. package/docs/self-hosting/platform/repocloud.mdx +8 -6
  47. package/docs/self-hosting/platform/repocloud.zh-CN.mdx +8 -6
  48. package/docs/self-hosting/platform/sealos.mdx +8 -6
  49. package/docs/self-hosting/platform/sealos.zh-CN.mdx +8 -6
  50. package/docs/self-hosting/platform/vercel.mdx +9 -7
  51. package/docs/self-hosting/platform/vercel.zh-CN.mdx +9 -7
  52. package/docs/self-hosting/platform/zeabur.mdx +8 -6
  53. package/docs/self-hosting/platform/zeabur.zh-CN.mdx +8 -6
  54. package/docs/self-hosting/start.mdx +11 -1
  55. package/docs/self-hosting/start.zh-CN.mdx +2 -1
  56. package/docs/usage/agents/concepts.mdx +13 -2
  57. package/docs/usage/agents/concepts.zh-CN.mdx +13 -2
  58. package/docs/usage/agents/custom-agent.mdx +9 -2
  59. package/docs/usage/agents/custom-agent.zh-CN.mdx +8 -4
  60. package/docs/usage/agents/model.mdx +3 -3
  61. package/docs/usage/agents/model.zh-CN.mdx +6 -5
  62. package/docs/usage/agents/prompt.mdx +7 -5
  63. package/docs/usage/agents/prompt.zh-CN.mdx +7 -5
  64. package/docs/usage/agents/topics.mdx +9 -1
  65. package/docs/usage/agents/topics.zh-CN.mdx +9 -1
  66. package/docs/usage/features/agent-market.mdx +5 -5
  67. package/docs/usage/features/agent-market.zh-CN.mdx +1 -0
  68. package/docs/usage/features/local-llm.mdx +6 -1
  69. package/docs/usage/features/local-llm.zh-CN.mdx +6 -1
  70. package/docs/usage/features/mobile.mdx +5 -1
  71. package/docs/usage/features/mobile.zh-CN.mdx +6 -1
  72. package/docs/usage/features/more.mdx +1 -0
  73. package/docs/usage/features/more.zh-CN.mdx +1 -0
  74. package/docs/usage/features/multi-ai-providers.mdx +11 -2
  75. package/docs/usage/features/multi-ai-providers.zh-CN.mdx +12 -2
  76. package/docs/usage/features/plugin-system.mdx +8 -7
  77. package/docs/usage/features/plugin-system.zh-CN.mdx +9 -7
  78. package/docs/usage/features/pwa.mdx +10 -4
  79. package/docs/usage/features/pwa.zh-CN.mdx +11 -4
  80. package/docs/usage/features/text-to-image.zh-CN.mdx +1 -0
  81. package/docs/usage/features/theme.mdx +6 -1
  82. package/docs/usage/features/theme.zh-CN.mdx +7 -1
  83. package/docs/usage/features/tts.zh-CN.mdx +1 -0
  84. package/docs/usage/features/vision.zh-CN.mdx +1 -0
  85. package/docs/usage/plugins/basic-usage.mdx +31 -7
  86. package/docs/usage/plugins/basic-usage.zh-CN.mdx +31 -7
  87. package/docs/usage/plugins/custom-plugin.mdx +1 -0
  88. package/docs/usage/plugins/custom-plugin.zh-CN.mdx +1 -0
  89. package/docs/usage/plugins/development.mdx +79 -30
  90. package/docs/usage/plugins/development.zh-CN.mdx +80 -31
  91. package/docs/usage/plugins/store.mdx +11 -2
  92. package/docs/usage/plugins/store.zh-CN.mdx +11 -2
  93. package/docs/usage/providers/groq.mdx +32 -12
  94. package/docs/usage/providers/groq.zh-CN.mdx +30 -12
  95. package/docs/usage/providers/ollama/gemma.mdx +27 -11
  96. package/docs/usage/providers/ollama/gemma.zh-CN.mdx +28 -11
  97. package/docs/usage/providers/ollama/qwen.mdx +30 -16
  98. package/docs/usage/providers/ollama/qwen.zh-CN.mdx +25 -11
  99. package/docs/usage/providers/ollama.mdx +27 -14
  100. package/docs/usage/providers/ollama.zh-CN.mdx +27 -14
  101. package/package.json +1 -1
  102. package/src/locales/resources.test.ts +49 -0
  103. package/src/locales/resources.ts +7 -20
@@ -9,14 +9,16 @@ tags:
9
9
  - 代理地址
10
10
  - 自动更新脚本
11
11
  ---
12
+
12
13
  # Docker 部署指引
13
14
 
14
15
  <div style={{display:"flex", gap: 4}}>
15
16
  [![][docker-release-shield]][docker-release-link]
16
17
 
17
- [![][docker-size-shield]][docker-size-link]
18
+ [![][docker-size-shield]][docker-size-link]
19
+
20
+ [![][docker-pulls-shield]][docker-pulls-link]
18
21
 
19
- [![][docker-pulls-shield]][docker-pulls-link]
20
22
  </div>
21
23
 
22
24
  我们提供了 [Docker 镜像][docker-release-link],供你在自己的私有设备上部署 LobeChat 服务。
@@ -24,7 +26,7 @@ tags:
24
26
  <Steps>
25
27
  ### 安装 Docker 容器环境
26
28
 
27
- (如果已安装,请跳过此步)
29
+ (如果已安装,请跳过此步)
28
30
 
29
31
  <Tabs items={['Ubuntu', 'CentOS']}>
30
32
  <Tab>
@@ -38,126 +40,123 @@ tags:
38
40
  ```fish
39
41
  $ yum install docker
40
42
  ```
41
-
43
+
42
44
  </Tab>
43
45
 
44
46
  </Tabs>
45
47
 
46
- ### Docker 指令部署
48
+ ### Docker 指令部署
47
49
 
48
- 使用以下命令即可使用一键启动 LobeChat 服务:
50
+ 使用以下命令即可使用一键启动 LobeChat 服务:
49
51
 
50
- ```fish
51
- $ docker run -d -p 3210:3210 \
52
- -e OPENAI_API_KEY=sk-xxxx \
53
- -e ACCESS_CODE=lobe66 \
54
- --name lobe-chat \
55
- lobehub/lobe-chat
56
- ```
52
+ ```fish
53
+ $ docker run -d -p 3210:3210 \
54
+ -e OPENAI_API_KEY=sk-xxxx \
55
+ -e ACCESS_CODE=lobe66 \
56
+ --name lobe-chat \
57
+ lobehub/lobe-chat
58
+ ```
57
59
 
58
- 指令说明:
60
+ 指令说明:
59
61
 
60
- - 默认映射端口为 `3210`, 请确保未被占用或手动更改端口映射
61
- - 使用你的 OpenAI API Key 替换上述命令中的 `sk-xxxx`
62
+ - 默认映射端口为 `3210`, 请确保未被占用或手动更改端口映射
63
+ - 使用你的 OpenAI API Key 替换上述命令中的 `sk-xxxx`
62
64
 
63
- <Callout type={'tip'}>
64
- LobeChat 支持的完整环境变量列表请参考 [📘 环境变量](/zh/self-hosting/environment-variables) 部分
65
-
65
+ <Callout type={'tip'}>
66
+ LobeChat 支持的完整环境变量列表请参考 [📘 环境变量](/zh/self-hosting/environment-variables) 部分
66
67
  </Callout>
67
68
 
68
- <Callout>
69
- 由于官方的 Docker
70
- 镜像构建大约需要半小时左右,如果在更新部署后会出现「存在更新」的提示,可以等待镜像构建完成后再次部署。
71
-
69
+ <Callout>
70
+ 由于官方的 Docker
71
+ 镜像构建大约需要半小时左右,如果在更新部署后会出现「存在更新」的提示,可以等待镜像构建完成后再次部署。
72
72
  </Callout>
73
73
 
74
- <Callout type="warning">
75
- 官方 Docker 镜像中未设定密码,强烈建议添加密码以提升安全性,否则你可能会遇到 [My API Key was
76
- stolen!!!](https://github.com/lobehub/lobe-chat/issues/1123) 这样的情况
77
-
74
+ <Callout type="warning">
75
+ 官方 Docker 镜像中未设定密码,强烈建议添加密码以提升安全性,否则你可能会遇到 [My API Key was
76
+ stolen!!!](https://github.com/lobehub/lobe-chat/issues/1123) 这样的情况
78
77
  </Callout>
79
78
 
80
- <Callout type="important">
81
- 注意,当**部署架构与镜像的不一致时**,需要对 **Sharp** 进行交叉编译,详见 [Sharp
82
- 交叉编译](https://sharp.pixelplumbing.com/install#cross-platform)
83
-
79
+ <Callout type="important">
80
+ 注意,当**部署架构与镜像的不一致时**,需要对 **Sharp** 进行交叉编译,详见 [Sharp
81
+ 交叉编译](https://sharp.pixelplumbing.com/install#cross-platform)
84
82
  </Callout>
85
83
 
86
- #### 使用代理地址
84
+ #### 使用代理地址
85
+
86
+ 如果你需要通过代理使用 OpenAI 服务,你可以使用 `OPENAI_PROXY_URL` 环境变量来配置代理地址:
87
87
 
88
- 如果你需要通过代理使用 OpenAI 服务,你可以使用 `OPENAI_PROXY_URL` 环境变量来配置代理地址:
88
+ ```fish
89
+ $ docker run -d -p 3210:3210 \
90
+ -e OPENAI_API_KEY=sk-xxxx \
91
+ -e OPENAI_PROXY_URL=https://api-proxy.com/v1 \
92
+ -e ACCESS_CODE=lobe66 \
93
+ --name lobe-chat \
94
+ lobehub/lobe-chat
95
+ ```
89
96
 
90
- ```fish
91
- $ docker run -d -p 3210:3210 \
92
- -e OPENAI_API_KEY=sk-xxxx \
93
- -e OPENAI_PROXY_URL=https://api-proxy.com/v1 \
94
- -e ACCESS_CODE=lobe66 \
95
- --name lobe-chat \
96
- lobehub/lobe-chat
97
- ```
97
+ ### Crontab 自动更新脚本(可选)
98
98
 
99
- ### Crontab 自动更新脚本(可选)
99
+ 如果你想自动获得最新的镜像,你可以如下操作。
100
100
 
101
- 如果你想自动获得最新的镜像,你可以如下操作。
101
+ 首先,新建一个 `lobe.env` 配置文件,内容为各种环境变量,例如:
102
102
 
103
- 首先,新建一个 `lobe.env` 配置文件,内容为各种环境变量,例如:
103
+ ```env
104
+ OPENAI_API_KEY=sk-xxxx
105
+ OPENAI_PROXY_URL=https://api-proxy.com/v1
106
+ ACCESS_CODE=arthals2333
107
+ CUSTOM_MODELS=-gpt-4,-gpt-4-32k,-gpt-3.5-turbo-16k,gpt-3.5-turbo-1106=gpt-3.5-turbo-16k,gpt-4-0125-preview=gpt-4-turbo,gpt-4-vision-preview=gpt-4-vision
108
+ ```
104
109
 
105
- ```env
106
- OPENAI_API_KEY=sk-xxxx
107
- OPENAI_PROXY_URL=https://api-proxy.com/v1
108
- ACCESS_CODE=arthals2333
109
- CUSTOM_MODELS=-gpt-4,-gpt-4-32k,-gpt-3.5-turbo-16k,gpt-3.5-turbo-1106=gpt-3.5-turbo-16k,gpt-4-0125-preview=gpt-4-turbo,gpt-4-vision-preview=gpt-4-vision
110
- ```
110
+ 然后,你可以使用以下脚本来自动更新:
111
111
 
112
- 然后,你可以使用以下脚本来自动更新:
112
+ ```bash
113
+ #!/bin/bash
114
+ # auto-update-lobe-chat.sh
113
115
 
114
- ```bash
115
- #!/bin/bash
116
- # auto-update-lobe-chat.sh
116
+ # 设置代理(可选)
117
+ export https_proxy=http://127.0.0.1:7890 http_proxy=http://127.0.0.1:7890 all_proxy=socks5://127.0.0.1:7890
117
118
 
118
- # 设置代理(可选)
119
- export https_proxy=http://127.0.0.1:7890 http_proxy=http://127.0.0.1:7890 all_proxy=socks5://127.0.0.1:7890
119
+ # 拉取最新的镜像并将输出存储在变量中
120
+ output=$(docker pull lobehub/lobe-chat:latest 2>&1)
120
121
 
121
- # 拉取最新的镜像并将输出存储在变量中
122
- output=$(docker pull lobehub/lobe-chat:latest 2>&1)
122
+ # 检查拉取命令是否成功执行
123
+ if [ $? -ne 0 ]; then
124
+ exit 1
125
+ fi
123
126
 
124
- # 检查拉取命令是否成功执行
125
- if [ $? -ne 0 ]; then
126
- exit 1
127
- fi
127
+ # 检查输出中是否包含特定的字符串
128
+ echo "$output" | grep -q "Image is up to date for lobehub/lobe-chat:latest"
128
129
 
129
- # 检查输出中是否包含特定的字符串
130
- echo "$output" | grep -q "Image is up to date for lobehub/lobe-chat:latest"
130
+ # 如果镜像已经是最新的,则不执行任何操作
131
+ if [ $? -eq 0 ]; then
132
+ exit 0
133
+ fi
131
134
 
132
- # 如果镜像已经是最新的,则不执行任何操作
133
- if [ $? -eq 0 ]; then
134
- exit 0
135
- fi
135
+ echo "Detected Lobe-Chat update"
136
136
 
137
- echo "Detected Lobe-Chat update"
137
+ # 删除旧的容器
138
+ echo "Removed: $(docker rm -f Lobe-Chat)"
138
139
 
139
- # 删除旧的容器
140
- echo "Removed: $(docker rm -f Lobe-Chat)"
140
+ # 运行新的容器
141
+ echo "Started: $(docker run -d --network=host --env-file /path/to/lobe.env --name=Lobe-Chat --restart=always lobehub/lobe-chat)"
141
142
 
142
- # 运行新的容器
143
- echo "Started: $(docker run -d --network=host --env-file /path/to/lobe.env --name=Lobe-Chat --restart=always lobehub/lobe-chat)"
143
+ # 打印更新的时间和版本
144
+ echo "Update time: $(date)"
145
+ echo "Version: $(docker inspect lobehub/lobe-chat:latest | grep 'org.opencontainers.image.version' | awk -F'"' '{print $4}')"
144
146
 
145
- # 打印更新的时间和版本
146
- echo "Update time: $(date)"
147
- echo "Version: $(docker inspect lobehub/lobe-chat:latest | grep 'org.opencontainers.image.version' | awk -F'"' '{print $4}')"
147
+ # 清理不再使用的镜像
148
+ docker images | grep 'lobehub/lobe-chat' | grep -v 'latest' | awk '{print $3}' | xargs -r docker rmi > /dev/null 2>&1
149
+ echo "Removed old images."
150
+ ```
148
151
 
149
- # 清理不再使用的镜像
150
- docker images | grep 'lobehub/lobe-chat' | grep -v 'latest' | awk '{print $3}' | xargs -r docker rmi > /dev/null 2>&1
151
- echo "Removed old images."
152
- ```
152
+ 此脚本可以在 Crontab 中使用,但请确认你的 Crontab 可以找到正确的 Docker 命令。建议使用绝对路径。
153
153
 
154
- 此脚本可以在 Crontab 中使用,但请确认你的 Crontab 可以找到正确的 Docker 命令。建议使用绝对路径。
154
+ 配置 Crontab,每 5 分钟执行一次脚本:
155
155
 
156
- 配置 Crontab,每 5 分钟执行一次脚本:
156
+ ```bash
157
+ */5 * * * * /path/to/auto-update-lobe-chat.sh >> /path/to/auto-update-lobe-chat.log 2>&1
158
+ ```
157
159
 
158
- ```bash
159
- */5 * * * * /path/to/auto-update-lobe-chat.sh >> /path/to/auto-update-lobe-chat.log 2>&1
160
- ```
161
160
  </Steps>
162
161
 
163
162
  [docker-pulls-link]: https://hub.docker.com/r/lobehub/lobe-chat
@@ -12,6 +12,7 @@ tags:
12
12
  - Environment Variables
13
13
  - Custom Domain Setup
14
14
  ---
15
+
15
16
  # Deploy LobeChat with Netlify
16
17
 
17
18
  If you want to deploy LobeChat on Netlify, you can follow these steps:
@@ -21,81 +22,129 @@ If you want to deploy LobeChat on Netlify, you can follow these steps:
21
22
  <Steps>
22
23
  ### Fork the LobeChat Repository
23
24
 
24
- Click the Fork button to fork the LobeChat repository to your GitHub account.
25
+ Click the Fork button to fork the LobeChat repository to your GitHub account.
25
26
 
26
- ### Prepare your OpenAI API Key
27
+ ### Prepare your OpenAI API Key
27
28
 
28
- Go to [OpenAI API Key](https://platform.openai.com/account/api-keys) to obtain your OpenAI API Key.
29
+ Go to [OpenAI API Key](https://platform.openai.com/account/api-keys) to obtain your OpenAI API Key.
29
30
 
30
- ### Import to Netlify Workspace
31
+ ### Import to Netlify Workspace
31
32
 
32
- <Callout>
33
- After testing, it is currently not supported to have a one-click deployment button similar to
34
- Vercel/Zeabur. The reason is unknown. Therefore, manual import is required.
35
-
33
+ <Callout>
34
+ After testing, it is currently not supported to have a one-click deployment button similar to
35
+ Vercel/Zeabur. The reason is unknown. Therefore, manual import is required.
36
36
  </Callout>
37
37
 
38
- Click "Import from git"
38
+ Click "Import from git"
39
39
 
40
- <Image alt={'Click "Import from git" in the Netlify workspace'} height={362} inStep src={'https://github.com/lobehub/lobe-chat/assets/28616219/31b999e5-2a74-45fc-935b-f036e72a684d'} />
40
+ <Image
41
+ alt={'Click "Import from git" in the Netlify workspace'}
42
+ height={362}
43
+ inStep
44
+ src={'https://github.com/lobehub/lobe-chat/assets/28616219/31b999e5-2a74-45fc-935b-f036e72a684d'}
45
+ />
41
46
 
42
- Then click "Deploy with Github" and authorize Netlify to access your GitHub account.
47
+ Then click "Deploy with Github" and authorize Netlify to access your GitHub account.
43
48
 
44
- <Image alt={'Authorize Netlify to access your GitHub account'} height={273} inStep src={'https://github.com/lobehub/lobe-chat/assets/28616219/c9c58141-5ec6-43f1-8d97-0a84a04dcdba'} />
49
+ <Image
50
+ alt={'Authorize Netlify to access your GitHub account'}
51
+ height={273}
52
+ inStep
53
+ src={'https://github.com/lobehub/lobe-chat/assets/28616219/c9c58141-5ec6-43f1-8d97-0a84a04dcdba'}
54
+ />
45
55
 
46
- Next, select the LobeChat project:
56
+ Next, select the LobeChat project:
47
57
 
48
- <Image alt={'Select the LobeChat github project'} height={228} inStep src={'https://github.com/lobehub/lobe-chat/assets/28616219/6c3968a8-fbbb-4268-a587-edaced2d96af'} />
58
+ <Image
59
+ alt={'Select the LobeChat github project'}
60
+ height={228}
61
+ inStep
62
+ src={'https://github.com/lobehub/lobe-chat/assets/28616219/6c3968a8-fbbb-4268-a587-edaced2d96af'}
63
+ />
49
64
 
50
- ### Configure Site Name and Environment Variables
65
+ ### Configure Site Name and Environment Variables
51
66
 
52
- In this step, you need to configure your site, including the site name, build command, and publish directory. Fill in your site name in the "Site Name" field. If there are no special requirements, you do not need to modify the remaining configurations as we have already set the default configurations.
67
+ In this step, you need to configure your site, including the site name, build command, and publish directory. Fill in your site name in the "Site Name" field. If there are no special requirements, you do not need to modify the remaining configurations as we have already set the default configurations.
53
68
 
54
- <Image alt={'Configure LobeChat site name'} height={712} inStep src={'https://github.com/lobehub/lobe-chat/assets/28616219/f3885537-6d43-422f-b1b8-e70732401025'} />
69
+ <Image
70
+ alt={'Configure LobeChat site name'}
71
+ height={712}
72
+ inStep
73
+ src={'https://github.com/lobehub/lobe-chat/assets/28616219/f3885537-6d43-422f-b1b8-e70732401025'}
74
+ />
55
75
 
56
- Click the "Add environment variables" button to add site environment variables:
76
+ Click the "Add environment variables" button to add site environment variables:
57
77
 
58
- <Image alt={'Add LobeChat site environment variables'} height={537} inStep src={'https://github.com/lobehub/lobe-chat/assets/28616219/3b607482-4d99-455a-bc10-3090dd4fe3c5'} />
78
+ <Image
79
+ alt={'Add LobeChat site environment variables'}
80
+ height={537}
81
+ inStep
82
+ src={'https://github.com/lobehub/lobe-chat/assets/28616219/3b607482-4d99-455a-bc10-3090dd4fe3c5'}
83
+ />
59
84
 
60
- Taking OpenAI as an example, the environment variables you need to add are as follows:
85
+ Taking OpenAI as an example, the environment variables you need to add are as follows:
61
86
 
62
- | Environment Variable | Type | Description | Example |
63
- | -------------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------- |
64
- | `OPENAI_API_KEY` | Required | This is the API key you applied for on the OpenAI account page | `sk-xxxxxx...xxxxxx` |
65
- | `ACCESS_CODE` | Required | Add a password to access this service. You can set a long password to prevent brute force attacks. When this value is separated by commas, it becomes an array of passwords | `awCT74` or `e3@09!` or `code1,code2,code3` |
66
- | `OPENAI_PROXY_URL` | Optional | If you manually configure the OpenAI interface proxy, you can use this configuration to override the default OpenAI API request base URL | `https://aihubmix.com/v1`, default value: `https://api.openai.com/v1` |
87
+ | Environment Variable | Type | Description | Example |
88
+ | --- | --- | --- | --- |
89
+ | `OPENAI_API_KEY` | Required | This is the API key you applied for on the OpenAI account page | `sk-xxxxxx...xxxxxx` |
90
+ | `ACCESS_CODE` | Required | Add a password to access this service. You can set a long password to prevent brute force attacks. When this value is separated by commas, it becomes an array of passwords | `awCT74` or `e3@09!` or `code1,code2,code3` |
91
+ | `OPENAI_PROXY_URL` | Optional | If you manually configure the OpenAI interface proxy, you can use this configuration to override the default OpenAI API request base URL | `https://aihubmix.com/v1`, default value: `https://api.openai.com/v1` |
67
92
 
68
- <Callout type={'tip'}>
69
- For a complete list of environment variables supported by LobeChat, please refer to the [📘
70
- Environment Variables](/en/self-hosting/environment-variables)
71
-
93
+ <Callout type={'tip'}>
94
+ For a complete list of environment variables supported by LobeChat, please refer to the [📘
95
+ Environment Variables](/en/self-hosting/environment-variables)
72
96
  </Callout>
73
97
 
74
- Afteradding the variables, finally click "Deploy lobe-chat" to enter the deployment phase
98
+ Afteradding the variables, finally click "Deploy lobe-chat" to enter the deployment phase
75
99
 
76
- <Image alt={'Environment variables added'} height={600} inStep src={'https://github.com/lobehub/lobe-chat/assets/28616219/c9f74ec4-ce63-4ce9-b9e2-34bda6fda10b'} />
100
+ <Image
101
+ alt={'Environment variables added'}
102
+ height={600}
103
+ inStep
104
+ src={'https://github.com/lobehub/lobe-chat/assets/28616219/c9f74ec4-ce63-4ce9-b9e2-34bda6fda10b'}
105
+ />
77
106
 
78
- ### Wait for Deployment to Complete
107
+ ### Wait for Deployment to Complete
79
108
 
80
- After clicking deploy, you will enter the site details page, where you can click the "Deploying your site" in blue or the "Building" in yellow to view the deployment progress.
109
+ After clicking deploy, you will enter the site details page, where you can click the "Deploying your site" in blue or the "Building" in yellow to view the deployment progress.
81
110
 
82
- <Image alt={'Netlify site details page'} height={396} inStep src={'https://github.com/lobehub/lobe-chat/assets/28616219/a7fd85d5-fd32-4756-814e-ff7ab7567fe1'} />
111
+ <Image
112
+ alt={'Netlify site details page'}
113
+ height={396}
114
+ inStep
115
+ src={'https://github.com/lobehub/lobe-chat/assets/28616219/a7fd85d5-fd32-4756-814e-ff7ab7567fe1'}
116
+ />
83
117
 
84
- Upon entering the deployment details, you will see the following interface, indicating that your LobeChat is currently being deployed. Simply wait for the deployment to complete.
118
+ Upon entering the deployment details, you will see the following interface, indicating that your LobeChat is currently being deployed. Simply wait for the deployment to complete.
85
119
 
86
- <Image alt={'LobeChat deployment in progress'} height={325} inStep src={'https://github.com/lobehub/lobe-chat/assets/28616219/1ed8b13d-046e-47c8-bd61-116ffdf5d01b'} />
120
+ <Image
121
+ alt={'LobeChat deployment in progress'}
122
+ height={325}
123
+ inStep
124
+ src={'https://github.com/lobehub/lobe-chat/assets/28616219/1ed8b13d-046e-47c8-bd61-116ffdf5d01b'}
125
+ />
87
126
 
88
- During the deployment and build process:
127
+ During the deployment and build process:
89
128
 
90
- <Image alt={'Deployment in progress'} height={558} inStep src={'https://github.com/lobehub/lobe-chat/assets/28616219/1c82d707-cb6f-4924-b246-a5235a919864'} />
129
+ <Image
130
+ alt={'Deployment in progress'}
131
+ height={558}
132
+ inStep
133
+ src={'https://github.com/lobehub/lobe-chat/assets/28616219/1c82d707-cb6f-4924-b246-a5235a919864'}
134
+ />
91
135
 
92
- ### Deployment Successful, Start Using
136
+ ### Deployment Successful, Start Using
93
137
 
94
- If your Deploy Log in the interface looks like the following, it means your LobeChat has been successfully deployed.
138
+ If your Deploy Log in the interface looks like the following, it means your LobeChat has been successfully deployed.
95
139
 
96
- <Image alt={'Deployment Successful'} height={558} inStep src={'https://github.com/lobehub/lobe-chat/assets/28616219/c1f945d1-f3e2-4100-b6bb-24d4cb13c438'} />
140
+ <Image
141
+ alt={'Deployment Successful'}
142
+ height={558}
143
+ inStep
144
+ src={'https://github.com/lobehub/lobe-chat/assets/28616219/c1f945d1-f3e2-4100-b6bb-24d4cb13c438'}
145
+ />
97
146
 
98
- At this point, you can click on "Open production deploy" to access your LobeChat site.
147
+ At this point, you can click on "Open production deploy" to access your LobeChat site.
99
148
 
100
149
  <Image alt={'Access Your LobeChat Site'} height={527} inStep src={'https://github.com/lobehub/lobe-chat/assets/28616219/b04723eb-64ad-4028-a901-dc4e4ee2d0c1'} />
101
150
  </Steps>
@@ -10,6 +10,7 @@ tags:
10
10
  - OpenAI API Key
11
11
  - 环境配置
12
12
  ---
13
+
13
14
  # 使用 Netlify 部署
14
15
 
15
16
  如果想在 Netlify 上部署 LobeChat,可以按照以下步骤进行操作:
@@ -19,76 +20,125 @@ tags:
19
20
  <Steps>
20
21
  ### Fork LobeChat 仓库
21
22
 
22
- 点击 Fork 按钮,将 LobeChat 仓库 Fork 到你的 GitHub 账号下。
23
+ 点击 Fork 按钮,将 LobeChat 仓库 Fork 到你的 GitHub 账号下。
23
24
 
24
- ### 准备好你的 OpenAI API Key
25
+ ### 准备好你的 OpenAI API Key
25
26
 
26
- 前往 [OpenAI API Key](https://platform.openai.com/account/api-keys) 获取你的 OpenAI API Key
27
+ 前往 [OpenAI API Key](https://platform.openai.com/account/api-keys) 获取你的 OpenAI API Key
27
28
 
28
- ### 在 Netlify 工作台导入
29
+ ### 在 Netlify 工作台导入
29
30
 
30
- <Callout>经过测试,暂不支持类似 Vercel/Zeabur 的一键部署按钮,原因未知。因此需要手动导入</Callout>
31
+ <Callout>经过测试,暂不支持类似 Vercel/Zeabur 的一键部署按钮,原因未知。因此需要手动导入</Callout>
31
32
 
32
- 点击 「Import from git」
33
+ 点击 「Import from git」
33
34
 
34
- <Image alt={'在 Netflix 工作台点击 「Import from git」'} height={362} inStep src={'https://github.com/lobehub/lobe-chat/assets/28616219/31b999e5-2a74-45fc-935b-f036e72a684d'} />
35
+ <Image
36
+ alt={'在 Netflix 工作台点击 「Import from git」'}
37
+ height={362}
38
+ inStep
39
+ src={'https://github.com/lobehub/lobe-chat/assets/28616219/31b999e5-2a74-45fc-935b-f036e72a684d'}
40
+ />
35
41
 
36
- 然后点击 「Deploy with Github」,并授权 Netlify 访问你的 GitHub 账号
42
+ 然后点击 「Deploy with Github」,并授权 Netlify 访问你的 GitHub 账号
37
43
 
38
- <Image alt={'授权 Netlify 访问你的 GitHub 账号'} height={273} inStep src={'https://github.com/lobehub/lobe-chat/assets/28616219/c9c58141-5ec6-43f1-8d97-0a84a04dcdba'} />
44
+ <Image
45
+ alt={'授权 Netlify 访问你的 GitHub 账号'}
46
+ height={273}
47
+ inStep
48
+ src={'https://github.com/lobehub/lobe-chat/assets/28616219/c9c58141-5ec6-43f1-8d97-0a84a04dcdba'}
49
+ />
39
50
 
40
- 然后选择 LobeChat 项目:
51
+ 然后选择 LobeChat 项目:
41
52
 
42
- <Image alt={'选择 LobeChat github 项目'} height={228} inStep src={'https://github.com/lobehub/lobe-chat/assets/28616219/6c3968a8-fbbb-4268-a587-edaced2d96af'} />
53
+ <Image
54
+ alt={'选择 LobeChat github 项目'}
55
+ height={228}
56
+ inStep
57
+ src={'https://github.com/lobehub/lobe-chat/assets/28616219/6c3968a8-fbbb-4268-a587-edaced2d96af'}
58
+ />
43
59
 
44
- ### 配置站点名称与环境变量
60
+ ### 配置站点名称与环境变量
45
61
 
46
- 在这一步,你需要配置你的站点,包括站点名称、构建命令、发布目录等。在「Site Name」字段填写上你的站点名称。其余配置如果没有特殊要求,无需修改,我们已经设定好了默认配置。
62
+ 在这一步,你需要配置你的站点,包括站点名称、构建命令、发布目录等。在「Site Name」字段填写上你的站点名称。其余配置如果没有特殊要求,无需修改,我们已经设定好了默认配置。
47
63
 
48
- <Image alt={'配置 LobeChat 站点名称'} height={712} inStep src={'https://github.com/lobehub/lobe-chat/assets/28616219/f3885537-6d43-422f-b1b8-e70732401025'} />
64
+ <Image
65
+ alt={'配置 LobeChat 站点名称'}
66
+ height={712}
67
+ inStep
68
+ src={'https://github.com/lobehub/lobe-chat/assets/28616219/f3885537-6d43-422f-b1b8-e70732401025'}
69
+ />
49
70
 
50
- 点击 「Add environment variables」按钮,添加站点环境变量:
71
+ 点击 「Add environment variables」按钮,添加站点环境变量:
51
72
 
52
- <Image alt={'添加 LobeChat 站点环境变量'} height={537} inStep src={'https://github.com/lobehub/lobe-chat/assets/28616219/3b607482-4d99-455a-bc10-3090dd4fe3c5'} />
73
+ <Image
74
+ alt={'添加 LobeChat 站点环境变量'}
75
+ height={537}
76
+ inStep
77
+ src={'https://github.com/lobehub/lobe-chat/assets/28616219/3b607482-4d99-455a-bc10-3090dd4fe3c5'}
78
+ />
53
79
 
54
- 以配置 OpenAI 为例,你需要添加的环境变量如下:
80
+ 以配置 OpenAI 为例,你需要添加的环境变量如下:
55
81
 
56
- | 环境变量 | 类型 | 描述 | 示例 |
57
- | ------------------ | -- | ------------------------------------------------------- | ---------------------------------------------------------- |
58
- | `OPENAI_API_KEY` | 必选 | 这是你在 OpenAI 账户页面申请的 API 密钥 | `sk-xxxxxx...xxxxxx` |
59
- | `ACCESS_CODE` | 必选 | 添加访问此服务的密码,你可以设置一个长密码以防被爆破,该值用逗号分隔时为密码数组 | `awCT74` 或 `e3@09!` or `code1,code2,code3` |
60
- | `OPENAI_PROXY_URL` | 可选 | 如果你手动配置了 OpenAI 接口代理,可以使用此配置项来覆盖默认的 OpenAI API 请求基础 URL | `https://aihubmix.com/v1` ,默认值:`https://api.openai.com/v1` |
82
+ | 环境变量 | 类型 | 描述 | 示例 |
83
+ | --- | --- | --- | --- |
84
+ | `OPENAI_API_KEY` | 必选 | 这是你在 OpenAI 账户页面申请的 API 密钥 | `sk-xxxxxx...xxxxxx` |
85
+ | `ACCESS_CODE` | 必选 | 添加访问此服务的密码,你可以设置一个长密码以防被爆破,该值用逗号分隔时为密码数组 | `awCT74` 或 `e3@09!` or `code1,code2,code3` |
86
+ | `OPENAI_PROXY_URL` | 可选 | 如果你手动配置了 OpenAI 接口代理,可以使用此配置项来覆盖默认的 OpenAI API 请求基础 URL | `https://aihubmix.com/v1` ,默认值:`https://api.openai.com/v1` |
61
87
 
62
- <Callout type={'tip'}>
63
- LobeChat 支持的完整环境变量列表请参考 [📘 环境变量](/zh/self-hosting/environment-variables) 部分
64
-
88
+ <Callout type={'tip'}>
89
+ LobeChat 支持的完整环境变量列表请参考 [📘 环境变量](/zh/self-hosting/environment-variables) 部分
65
90
  </Callout>
66
91
 
67
- 添加完成后,最后点击「Deploy lobe-chat」 进入部署阶段。
92
+ 添加完成后,最后点击「Deploy lobe-chat」 进入部署阶段。
68
93
 
69
- <Image alt={'环境变量添加完成'} height={600} inStep src={'https://github.com/lobehub/lobe-chat/assets/28616219/c9f74ec4-ce63-4ce9-b9e2-34bda6fda10b'} />
94
+ <Image
95
+ alt={'环境变量添加完成'}
96
+ height={600}
97
+ inStep
98
+ src={'https://github.com/lobehub/lobe-chat/assets/28616219/c9f74ec4-ce63-4ce9-b9e2-34bda6fda10b'}
99
+ />
70
100
 
71
- ### 等待部署完成
101
+ ### 等待部署完成
72
102
 
73
- 点击部署后,会进入站点详情页面,你可以点击青色字样的「Deploying your site」或者 「Building」 黄色标签查看部署进度。
103
+ 点击部署后,会进入站点详情页面,你可以点击青色字样的「Deploying your site」或者 「Building」 黄色标签查看部署进度。
74
104
 
75
- <Image alt={'Netlify 站点详情页'} height={396} inStep src={'https://github.com/lobehub/lobe-chat/assets/28616219/a7fd85d5-fd32-4756-814e-ff7ab7567fe1'} />
105
+ <Image
106
+ alt={'Netlify 站点详情页'}
107
+ height={396}
108
+ inStep
109
+ src={'https://github.com/lobehub/lobe-chat/assets/28616219/a7fd85d5-fd32-4756-814e-ff7ab7567fe1'}
110
+ />
76
111
 
77
- 进入部署详情,你会看到下述界面,这意味着你的 LobeChat 正在部署中,只需等待部署完成即可。
112
+ 进入部署详情,你会看到下述界面,这意味着你的 LobeChat 正在部署中,只需等待部署完成即可。
78
113
 
79
- <Image alt={'LobeChat 部署构建中'} height={325} inStep src={'https://github.com/lobehub/lobe-chat/assets/28616219/1ed8b13d-046e-47c8-bd61-116ffdf5d01b'} />
114
+ <Image
115
+ alt={'LobeChat 部署构建中'}
116
+ height={325}
117
+ inStep
118
+ src={'https://github.com/lobehub/lobe-chat/assets/28616219/1ed8b13d-046e-47c8-bd61-116ffdf5d01b'}
119
+ />
80
120
 
81
- 部署构建过程中:
121
+ 部署构建过程中:
82
122
 
83
- <Image alt={'部署构建中'} height={558} inStep src={'https://github.com/lobehub/lobe-chat/assets/28616219/1c82d707-cb6f-4924-b246-a5235a919864'} />
123
+ <Image
124
+ alt={'部署构建中'}
125
+ height={558}
126
+ inStep
127
+ src={'https://github.com/lobehub/lobe-chat/assets/28616219/1c82d707-cb6f-4924-b246-a5235a919864'}
128
+ />
84
129
 
85
- ### 部署成功,开始使用
130
+ ### 部署成功,开始使用
86
131
 
87
- 如果你的界面中的 Deploy Log 如下所示,意味着你的 LobeChat 部署成功了。
132
+ 如果你的界面中的 Deploy Log 如下所示,意味着你的 LobeChat 部署成功了。
88
133
 
89
- <Image alt={'部署成功'} height={558} inStep src={'https://github.com/lobehub/lobe-chat/assets/28616219/c1f945d1-f3e2-4100-b6bb-24d4cb13c438'} />
134
+ <Image
135
+ alt={'部署成功'}
136
+ height={558}
137
+ inStep
138
+ src={'https://github.com/lobehub/lobe-chat/assets/28616219/c1f945d1-f3e2-4100-b6bb-24d4cb13c438'}
139
+ />
90
140
 
91
- 此时,你可以点击「Open production deploy」,即可访问你的 LobeChat 站点
141
+ 此时,你可以点击「Open production deploy」,即可访问你的 LobeChat 站点
92
142
 
93
143
  <Image alt={'访问你的 LobeChat 站点'} height={527} inStep src={'https://github.com/lobehub/lobe-chat/assets/28616219/b04723eb-64ad-4028-a901-dc4e4ee2d0c1'} />
94
144
  </Steps>
@@ -10,6 +10,7 @@ tags:
10
10
  - OpenAI API Key
11
11
  - Custom Domain Binding
12
12
  ---
13
+
13
14
  # Deploy LobeChat with Railway
14
15
 
15
16
  If you want to deploy LobeChat on Railway, you can follow the steps below:
@@ -19,15 +20,16 @@ If you want to deploy LobeChat on Railway, you can follow the steps below:
19
20
  <Steps>
20
21
  ### Prepare your OpenAI API Key
21
22
 
22
- Go to [OpenAI API Key](https://platform.openai.com/account/api-keys) to get your OpenAI API Key.
23
+ Go to [OpenAI API Key](https://platform.openai.com/account/api-keys) to get your OpenAI API Key.
24
+
25
+ ### Click the button below to deploy
23
26
 
24
- ### Click the button below to deploy
27
+ [![Deploy on Railway](https://railway.app/button.svg)](https://railway.app/template/FB6HrV?referralCode=9bD9mT)
25
28
 
26
- [![Deploy on Railway](https://railway.app/button.svg)](https://railway.app/template/FB6HrV?referralCode=9bD9mT)
29
+ ### Once deployed, you can start using it
27
30
 
28
- ### Once deployed, you can start using it
31
+ ### Bind a custom domain (optional)
29
32
 
30
- ### Bind a custom domain (optional)
33
+ You can use the subdomain provided by Railway, or choose to bind a custom domain. Currently, the domains provided by Railway have not been contaminated, and most regions can connect directly.
31
34
 
32
- You can use the subdomain provided by Railway, or choose to bind a custom domain. Currently, the domains provided by Railway have not been contaminated, and most regions can connect directly.
33
35
  </Steps>
@@ -9,6 +9,7 @@ tags:
9
9
  - API Key
10
10
  - 自定义域名
11
11
  ---
12
+
12
13
  # 使用 Railway 部署
13
14
 
14
15
  如果想在 Railway 上部署 LobeChat,可以按照以下步骤进行操作:
@@ -18,15 +19,16 @@ tags:
18
19
  <Steps>
19
20
  ### 准备好你的 OpenAI API Key
20
21
 
21
- 前往 [OpenAI API Key](https://platform.openai.com/account/api-keys) 获取你的 OpenAI API Key
22
+ 前往 [OpenAI API Key](https://platform.openai.com/account/api-keys) 获取你的 OpenAI API Key
23
+
24
+ ### 点击下方按钮进行部署
22
25
 
23
- ### 点击下方按钮进行部署
26
+ [![Deploy on Railway](https://railway.app/button.svg)](https://railway.app/template/FB6HrV?referralCode=9bD9mT)
24
27
 
25
- [![Deploy on Railway](https://railway.app/button.svg)](https://railway.app/template/FB6HrV?referralCode=9bD9mT)
28
+ ### 部署完毕后,即可开始使用
26
29
 
27
- ### 部署完毕后,即可开始使用
30
+ ### 绑定自定义域名(可选)
28
31
 
29
- ### 绑定自定义域名(可选)
32
+ 你可以使用 Railway 提供的子域名,也可以选择绑定自定义域名。目前 Railway 提供的域名还未被污染,大多数地区都可以直连。
30
33
 
31
- 你可以使用 Railway 提供的子域名,也可以选择绑定自定义域名。目前 Railway 提供的域名还未被污染,大多数地区都可以直连。
32
34
  </Steps>