@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.
- package/CHANGELOG.md +25 -0
- package/README.md +8 -8
- package/README.zh-CN.md +8 -8
- package/docs/self-hosting/advanced/analytics.mdx +1 -0
- package/docs/self-hosting/advanced/analytics.zh-CN.mdx +1 -0
- package/docs/self-hosting/advanced/authentication.mdx +7 -6
- package/docs/self-hosting/advanced/authentication.zh-CN.mdx +7 -6
- package/docs/self-hosting/advanced/sso-providers/auth0.mdx +58 -32
- package/docs/self-hosting/advanced/sso-providers/auth0.zh-CN.mdx +60 -32
- package/docs/self-hosting/advanced/sso-providers/authentik.mdx +33 -29
- package/docs/self-hosting/advanced/sso-providers/authentik.zh-CN.mdx +30 -27
- package/docs/self-hosting/advanced/sso-providers/github.mdx +49 -20
- package/docs/self-hosting/advanced/sso-providers/github.zh-CN.mdx +57 -31
- package/docs/self-hosting/advanced/sso-providers/microsoft-entra-id.mdx +53 -35
- package/docs/self-hosting/advanced/sso-providers/microsoft-entra-id.zh-CN.mdx +43 -31
- package/docs/self-hosting/advanced/sso-providers/zitadel.mdx +64 -34
- package/docs/self-hosting/advanced/sso-providers/zitadel.zh-CN.mdx +62 -36
- package/docs/self-hosting/advanced/upstream-sync.mdx +32 -23
- package/docs/self-hosting/advanced/upstream-sync.zh-CN.mdx +32 -23
- package/docs/self-hosting/environment-variables/analytics.mdx +1 -0
- package/docs/self-hosting/environment-variables/analytics.zh-CN.mdx +1 -0
- package/docs/self-hosting/environment-variables/auth.mdx +1 -0
- package/docs/self-hosting/environment-variables/auth.zh-CN.mdx +1 -0
- package/docs/self-hosting/environment-variables/basic.mdx +1 -0
- package/docs/self-hosting/environment-variables/basic.zh-CN.mdx +1 -0
- package/docs/self-hosting/environment-variables/model-provider.mdx +1 -0
- package/docs/self-hosting/environment-variables/model-provider.zh-CN.mdx +1 -0
- package/docs/self-hosting/environment-variables.mdx +1 -0
- package/docs/self-hosting/environment-variables.zh-CN.mdx +1 -0
- package/docs/self-hosting/examples/azure-openai.mdx +12 -8
- package/docs/self-hosting/examples/azure-openai.zh-CN.mdx +12 -8
- package/docs/self-hosting/examples/ollama.mdx +1 -0
- package/docs/self-hosting/examples/ollama.zh-CN.mdx +1 -0
- package/docs/self-hosting/faq/no-v1-suffix.mdx +1 -0
- package/docs/self-hosting/faq/no-v1-suffix.zh-CN.mdx +1 -0
- package/docs/self-hosting/faq/proxy-with-unable-to-verify-leaf-signature.mdx +1 -0
- package/docs/self-hosting/faq/proxy-with-unable-to-verify-leaf-signature.zh-CN.mdx +1 -0
- package/docs/self-hosting/platform/docker-compose.mdx +80 -73
- package/docs/self-hosting/platform/docker-compose.zh-CN.mdx +79 -73
- package/docs/self-hosting/platform/docker.mdx +85 -85
- package/docs/self-hosting/platform/docker.zh-CN.mdx +84 -85
- package/docs/self-hosting/platform/netlify.mdx +91 -42
- package/docs/self-hosting/platform/netlify.zh-CN.mdx +88 -38
- package/docs/self-hosting/platform/railway.mdx +8 -6
- package/docs/self-hosting/platform/railway.zh-CN.mdx +8 -6
- package/docs/self-hosting/platform/repocloud.mdx +8 -6
- package/docs/self-hosting/platform/repocloud.zh-CN.mdx +8 -6
- package/docs/self-hosting/platform/sealos.mdx +8 -6
- package/docs/self-hosting/platform/sealos.zh-CN.mdx +8 -6
- package/docs/self-hosting/platform/vercel.mdx +9 -7
- package/docs/self-hosting/platform/vercel.zh-CN.mdx +9 -7
- package/docs/self-hosting/platform/zeabur.mdx +8 -6
- package/docs/self-hosting/platform/zeabur.zh-CN.mdx +8 -6
- package/docs/self-hosting/start.mdx +11 -1
- package/docs/self-hosting/start.zh-CN.mdx +2 -1
- package/docs/usage/agents/concepts.mdx +13 -2
- package/docs/usage/agents/concepts.zh-CN.mdx +13 -2
- package/docs/usage/agents/custom-agent.mdx +9 -2
- package/docs/usage/agents/custom-agent.zh-CN.mdx +8 -4
- package/docs/usage/agents/model.mdx +3 -3
- package/docs/usage/agents/model.zh-CN.mdx +6 -5
- package/docs/usage/agents/prompt.mdx +7 -5
- package/docs/usage/agents/prompt.zh-CN.mdx +7 -5
- package/docs/usage/agents/topics.mdx +9 -1
- package/docs/usage/agents/topics.zh-CN.mdx +9 -1
- package/docs/usage/features/agent-market.mdx +5 -5
- package/docs/usage/features/agent-market.zh-CN.mdx +1 -0
- package/docs/usage/features/local-llm.mdx +6 -1
- package/docs/usage/features/local-llm.zh-CN.mdx +6 -1
- package/docs/usage/features/mobile.mdx +5 -1
- package/docs/usage/features/mobile.zh-CN.mdx +6 -1
- package/docs/usage/features/more.mdx +1 -0
- package/docs/usage/features/more.zh-CN.mdx +1 -0
- package/docs/usage/features/multi-ai-providers.mdx +11 -2
- package/docs/usage/features/multi-ai-providers.zh-CN.mdx +12 -2
- package/docs/usage/features/plugin-system.mdx +8 -7
- package/docs/usage/features/plugin-system.zh-CN.mdx +9 -7
- package/docs/usage/features/pwa.mdx +10 -4
- package/docs/usage/features/pwa.zh-CN.mdx +11 -4
- package/docs/usage/features/text-to-image.zh-CN.mdx +1 -0
- package/docs/usage/features/theme.mdx +6 -1
- package/docs/usage/features/theme.zh-CN.mdx +7 -1
- package/docs/usage/features/tts.zh-CN.mdx +1 -0
- package/docs/usage/features/vision.zh-CN.mdx +1 -0
- package/docs/usage/plugins/basic-usage.mdx +31 -7
- package/docs/usage/plugins/basic-usage.zh-CN.mdx +31 -7
- package/docs/usage/plugins/custom-plugin.mdx +1 -0
- package/docs/usage/plugins/custom-plugin.zh-CN.mdx +1 -0
- package/docs/usage/plugins/development.mdx +79 -30
- package/docs/usage/plugins/development.zh-CN.mdx +80 -31
- package/docs/usage/plugins/store.mdx +11 -2
- package/docs/usage/plugins/store.zh-CN.mdx +11 -2
- package/docs/usage/providers/groq.mdx +32 -12
- package/docs/usage/providers/groq.zh-CN.mdx +30 -12
- package/docs/usage/providers/ollama/gemma.mdx +27 -11
- package/docs/usage/providers/ollama/gemma.zh-CN.mdx +28 -11
- package/docs/usage/providers/ollama/qwen.mdx +30 -16
- package/docs/usage/providers/ollama/qwen.zh-CN.mdx +25 -11
- package/docs/usage/providers/ollama.mdx +27 -14
- package/docs/usage/providers/ollama.zh-CN.mdx +27 -14
- package/package.json +1 -1
- package/src/locales/resources.test.ts +49 -0
- 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
|
-
|
|
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
|
-
|
|
48
|
+
### Docker 指令部署
|
|
47
49
|
|
|
48
|
-
|
|
50
|
+
使用以下命令即可使用一键启动 LobeChat 服务:
|
|
49
51
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
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
|
-
|
|
61
|
-
|
|
62
|
+
- 默认映射端口为 `3210`, 请确保未被占用或手动更改端口映射
|
|
63
|
+
- 使用你的 OpenAI API Key 替换上述命令中的 `sk-xxxx`
|
|
62
64
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
65
|
+
<Callout type={'tip'}>
|
|
66
|
+
LobeChat 支持的完整环境变量列表请参考 [📘 环境变量](/zh/self-hosting/environment-variables) 部分
|
|
66
67
|
</Callout>
|
|
67
68
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
69
|
+
<Callout>
|
|
70
|
+
由于官方的 Docker
|
|
71
|
+
镜像构建大约需要半小时左右,如果在更新部署后会出现「存在更新」的提示,可以等待镜像构建完成后再次部署。
|
|
72
72
|
</Callout>
|
|
73
73
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
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
|
-
|
|
81
|
-
|
|
82
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
99
|
+
如果你想自动获得最新的镜像,你可以如下操作。
|
|
100
100
|
|
|
101
|
-
|
|
101
|
+
首先,新建一个 `lobe.env` 配置文件,内容为各种环境变量,例如:
|
|
102
102
|
|
|
103
|
-
|
|
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
|
-
|
|
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
|
-
|
|
115
|
-
|
|
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
|
-
|
|
119
|
+
# 拉取最新的镜像并将输出存储在变量中
|
|
120
|
+
output=$(docker pull lobehub/lobe-chat:latest 2>&1)
|
|
120
121
|
|
|
121
|
-
|
|
122
|
-
|
|
122
|
+
# 检查拉取命令是否成功执行
|
|
123
|
+
if [ $? -ne 0 ]; then
|
|
124
|
+
exit 1
|
|
125
|
+
fi
|
|
123
126
|
|
|
124
|
-
|
|
125
|
-
|
|
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
|
-
|
|
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
|
-
|
|
137
|
+
# 删除旧的容器
|
|
138
|
+
echo "Removed: $(docker rm -f Lobe-Chat)"
|
|
138
139
|
|
|
139
|
-
|
|
140
|
-
|
|
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
|
-
|
|
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
|
-
|
|
147
|
-
|
|
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
|
-
|
|
154
|
+
配置 Crontab,每 5 分钟执行一次脚本:
|
|
155
155
|
|
|
156
|
-
|
|
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
|
-
|
|
25
|
+
Click the Fork button to fork the LobeChat repository to your GitHub account.
|
|
25
26
|
|
|
26
|
-
|
|
27
|
+
### Prepare your OpenAI API Key
|
|
27
28
|
|
|
28
|
-
|
|
29
|
+
Go to [OpenAI API Key](https://platform.openai.com/account/api-keys) to obtain your OpenAI API Key.
|
|
29
30
|
|
|
30
|
-
|
|
31
|
+
### Import to Netlify Workspace
|
|
31
32
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
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
|
-
|
|
38
|
+
Click "Import from git"
|
|
39
39
|
|
|
40
|
-
|
|
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
|
-
|
|
47
|
+
Then click "Deploy with Github" and authorize Netlify to access your GitHub account.
|
|
43
48
|
|
|
44
|
-
|
|
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
|
-
|
|
56
|
+
Next, select the LobeChat project:
|
|
47
57
|
|
|
48
|
-
|
|
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
|
-
|
|
65
|
+
### Configure Site Name and Environment Variables
|
|
51
66
|
|
|
52
|
-
|
|
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
|
-
|
|
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
|
-
|
|
76
|
+
Click the "Add environment variables" button to add site environment variables:
|
|
57
77
|
|
|
58
|
-
|
|
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
|
-
|
|
85
|
+
Taking OpenAI as an example, the environment variables you need to add are as follows:
|
|
61
86
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
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
|
-
|
|
69
|
-
|
|
70
|
-
|
|
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
|
-
|
|
98
|
+
Afteradding the variables, finally click "Deploy lobe-chat" to enter the deployment phase
|
|
75
99
|
|
|
76
|
-
|
|
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
|
-
|
|
107
|
+
### Wait for Deployment to Complete
|
|
79
108
|
|
|
80
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
127
|
+
During the deployment and build process:
|
|
89
128
|
|
|
90
|
-
|
|
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
|
-
|
|
136
|
+
### Deployment Successful, Start Using
|
|
93
137
|
|
|
94
|
-
|
|
138
|
+
If your Deploy Log in the interface looks like the following, it means your LobeChat has been successfully deployed.
|
|
95
139
|
|
|
96
|
-
|
|
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
|
-
|
|
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
|
-
|
|
23
|
+
点击 Fork 按钮,将 LobeChat 仓库 Fork 到你的 GitHub 账号下。
|
|
23
24
|
|
|
24
|
-
|
|
25
|
+
### 准备好你的 OpenAI API Key
|
|
25
26
|
|
|
26
|
-
|
|
27
|
+
前往 [OpenAI API Key](https://platform.openai.com/account/api-keys) 获取你的 OpenAI API Key
|
|
27
28
|
|
|
28
|
-
|
|
29
|
+
### 在 Netlify 工作台导入
|
|
29
30
|
|
|
30
|
-
|
|
31
|
+
<Callout>经过测试,暂不支持类似 Vercel/Zeabur 的一键部署按钮,原因未知。因此需要手动导入</Callout>
|
|
31
32
|
|
|
32
|
-
|
|
33
|
+
点击 「Import from git」
|
|
33
34
|
|
|
34
|
-
|
|
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
|
-
|
|
42
|
+
然后点击 「Deploy with Github」,并授权 Netlify 访问你的 GitHub 账号
|
|
37
43
|
|
|
38
|
-
|
|
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
|
-
|
|
51
|
+
然后选择 LobeChat 项目:
|
|
41
52
|
|
|
42
|
-
|
|
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
|
-
|
|
62
|
+
在这一步,你需要配置你的站点,包括站点名称、构建命令、发布目录等。在「Site Name」字段填写上你的站点名称。其余配置如果没有特殊要求,无需修改,我们已经设定好了默认配置。
|
|
47
63
|
|
|
48
|
-
|
|
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
|
-
|
|
71
|
+
点击 「Add environment variables」按钮,添加站点环境变量:
|
|
51
72
|
|
|
52
|
-
|
|
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
|
-
|
|
80
|
+
以配置 OpenAI 为例,你需要添加的环境变量如下:
|
|
55
81
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
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
|
-
|
|
63
|
-
|
|
64
|
-
|
|
88
|
+
<Callout type={'tip'}>
|
|
89
|
+
LobeChat 支持的完整环境变量列表请参考 [📘 环境变量](/zh/self-hosting/environment-variables) 部分
|
|
65
90
|
</Callout>
|
|
66
91
|
|
|
67
|
-
|
|
92
|
+
添加完成后,最后点击「Deploy lobe-chat」 进入部署阶段。
|
|
68
93
|
|
|
69
|
-
|
|
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
|
-
|
|
103
|
+
点击部署后,会进入站点详情页面,你可以点击青色字样的「Deploying your site」或者 「Building」 黄色标签查看部署进度。
|
|
74
104
|
|
|
75
|
-
|
|
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
|
-
|
|
112
|
+
进入部署详情,你会看到下述界面,这意味着你的 LobeChat 正在部署中,只需等待部署完成即可。
|
|
78
113
|
|
|
79
|
-
|
|
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
|
-
|
|
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
|
-
|
|
132
|
+
如果你的界面中的 Deploy Log 如下所示,意味着你的 LobeChat 部署成功了。
|
|
88
133
|
|
|
89
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
27
|
+
[](https://railway.app/template/FB6HrV?referralCode=9bD9mT)
|
|
25
28
|
|
|
26
|
-
|
|
29
|
+
### Once deployed, you can start using it
|
|
27
30
|
|
|
28
|
-
|
|
31
|
+
### Bind a custom domain (optional)
|
|
29
32
|
|
|
30
|
-
|
|
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
|
-
|
|
22
|
+
前往 [OpenAI API Key](https://platform.openai.com/account/api-keys) 获取你的 OpenAI API Key
|
|
23
|
+
|
|
24
|
+
### 点击下方按钮进行部署
|
|
22
25
|
|
|
23
|
-
|
|
26
|
+
[](https://railway.app/template/FB6HrV?referralCode=9bD9mT)
|
|
24
27
|
|
|
25
|
-
|
|
28
|
+
### 部署完毕后,即可开始使用
|
|
26
29
|
|
|
27
|
-
|
|
30
|
+
### 绑定自定义域名(可选)
|
|
28
31
|
|
|
29
|
-
|
|
32
|
+
你可以使用 Railway 提供的子域名,也可以选择绑定自定义域名。目前 Railway 提供的域名还未被污染,大多数地区都可以直连。
|
|
30
33
|
|
|
31
|
-
你可以使用 Railway 提供的子域名,也可以选择绑定自定义域名。目前 Railway 提供的域名还未被污染,大多数地区都可以直连。
|
|
32
34
|
</Steps>
|