@lobehub/chat 1.22.1 → 1.22.3
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 +50 -0
- package/docker-compose/local/docker-compose.yml +11 -9
- package/docker-compose/{local-logto → local/logto}/.env.example +2 -2
- package/docker-compose/{local-logto → local/logto}/.env.zh-CN.example +3 -3
- package/docker-compose/{local-logto → local/logto}/docker-compose.yml +8 -7
- package/docker-compose/local/setup.sh +31 -29
- package/docker-compose/local/zitadel/docker-compose.yml +8 -8
- package/docker-compose/production/{.env.example → logto/.env.example} +3 -3
- package/docker-compose/production/{.env.zh-CN.example → logto/.env.zh-CN.example} +3 -3
- package/docker-compose/production/{docker-compose.yml → logto/docker-compose.yml} +2 -1
- package/docker-compose/production/zitadel/docker-compose.yml +5 -5
- package/docs/self-hosting/advanced/auth/next-auth/authentik.zh-CN.mdx +2 -2
- package/docs/self-hosting/advanced/auth/next-auth/casdoor.mdx +120 -0
- package/docs/self-hosting/advanced/auth/next-auth/casdoor.zh-CN.mdx +121 -0
- package/docs/self-hosting/advanced/auth/next-auth/cloudflare-zero-trust.zh-CN.mdx +3 -3
- package/docs/self-hosting/advanced/auth/next-auth/logto.mdx +10 -8
- package/docs/self-hosting/advanced/auth/next-auth/logto.zh-CN.mdx +1 -1
- package/docs/self-hosting/advanced/auth.mdx +5 -1
- package/docs/self-hosting/advanced/auth.zh-CN.mdx +5 -1
- package/docs/self-hosting/environment-variables/auth.mdx +88 -63
- package/docs/self-hosting/environment-variables/auth.zh-CN.mdx +91 -68
- package/docs/self-hosting/server-database/docker-compose.mdx +163 -280
- package/docs/self-hosting/server-database/docker-compose.zh-CN.mdx +92 -210
- package/docs/usage/providers/ai21.mdx +3 -1
- package/docs/usage/providers/ai360.mdx +1 -1
- package/docs/usage/providers/fireworksai.mdx +3 -1
- package/docs/usage/providers/github.mdx +1 -1
- package/docs/usage/providers/hunyuan.mdx +3 -1
- package/docs/usage/providers/siliconcloud.mdx +3 -1
- package/docs/usage/providers/spark.mdx +1 -1
- package/docs/usage/providers/upstage.mdx +1 -1
- package/docs/usage/providers/wenxin.mdx +3 -1
- package/docs/usage/providers/zeroone.mdx +2 -2
- package/package.json +5 -5
- package/src/libs/next-auth/sso-providers/logto.ts +1 -1
- package/src/server/manifest.ts +0 -3
@@ -44,57 +44,102 @@ tags:
|
|
44
44
|
|
45
45
|
本文中,我们提供了完全基于开源自建服务的 Docker Compose 配置,你可以直接使用这份配置文件来启动 LobeChat 数据库版本,也可以对之进行修改以适应你的需求。
|
46
46
|
|
47
|
-
我们默认使用 [MinIO](https://github.com/minio/minio) 作为本地 S3 对象存储服务,使用 [
|
47
|
+
我们默认使用 [MinIO](https://github.com/minio/minio) 作为本地 S3 对象存储服务,使用 [Casdoor](https://github.com/casdoor/casdoor) 作为本地鉴权服务。
|
48
48
|
|
49
49
|
## 快速启动
|
50
50
|
|
51
|
-
为方便快速上手,这一章使用 `docker-compose/local` 目录中的 docker-compose 配置文件,启动后的 LobeChat 应用运行在 `http://localhost:3210`,可在本地运行。
|
51
|
+
为方便快速上手,这一章使用 `docker-compose/local` 目录中的 `docker-compose.yml` 配置文件,启动后的 LobeChat 应用运行在 `http://localhost:3210`,可在本地运行。
|
52
52
|
|
53
53
|
<Callout type="warning">
|
54
|
-
为了快速上手,此 docker-compose.yml
|
55
|
-
|
54
|
+
为了快速上手,此 `docker-compose.yml` 内置了大量的 Secret/Password
|
55
|
+
的敏感字段配置,仅适用于快速演示或个人本地使用。请勿直接用于线上生产环境!否则遇到安全问题请自行负责!
|
56
56
|
</Callout>
|
57
57
|
|
58
58
|
<Steps>
|
59
|
-
###
|
59
|
+
### 一键启动脚本
|
60
60
|
|
61
61
|
新建一个 `lobe-chat-db` 目录,用于存放你的配置文件和后续的数据库文件。
|
62
62
|
|
63
63
|
```sh
|
64
64
|
mkdir lobe-chat-db
|
65
|
+
cd lobe-chat-db
|
65
66
|
```
|
66
67
|
|
67
|
-
|
68
|
+
我们提供了一个一键启动脚本 `setup.sh`,可以自动使用默认配置并启动服务:
|
68
69
|
|
69
70
|
```sh
|
70
|
-
curl -fsSL https://raw.githubusercontent.com/lobehub/lobe-chat/HEAD/docker-compose/local
|
71
|
-
curl -fsSL https://raw.githubusercontent.com/lobehub/lobe-chat/HEAD/docker-compose/local-logto/.env.zh-CN.example > .env
|
71
|
+
bash <(curl -fsSL https://raw.githubusercontent.com/lobehub/lobe-chat/HEAD/docker-compose/local/setup.sh) -f -l zh_CN
|
72
72
|
```
|
73
73
|
|
74
|
-
###
|
74
|
+
### 启动 Docker
|
75
75
|
|
76
76
|
```sh
|
77
77
|
docker compose up -d
|
78
78
|
```
|
79
79
|
|
80
|
-
|
80
|
+
默认登录账号即 Casdoor 的默认账号,账号名 `admin`,密码 `123`
|
81
81
|
|
82
|
-
|
82
|
+
### 检查日志
|
83
83
|
|
84
|
-
|
84
|
+
```sh
|
85
|
+
docker logs -f lobe-chat
|
86
|
+
```
|
87
|
+
|
88
|
+
如果你在容器中看到了以下日志,则说明已经启动成功:
|
89
|
+
|
90
|
+
```log
|
91
|
+
[Database] Start to migration...
|
92
|
+
✅ database migration pass.
|
93
|
+
-------------------------------------
|
94
|
+
▲ Next.js 14.x.x
|
95
|
+
- Local: http://localhost:3210
|
96
|
+
- Network: http://0.0.0.0:3210
|
85
97
|
|
86
|
-
|
87
|
-
|
98
|
+
✓ Starting...
|
99
|
+
✓ Ready in 95ms
|
100
|
+
```
|
88
101
|
|
89
|
-
|
102
|
+
</Steps>
|
90
103
|
|
91
|
-
|
104
|
+
至此,你已经成功部署了 LobeChat 数据库版本,你可以通过 `http://localhost:3210` 访问你的 LobeChat 服务。
|
92
105
|
|
93
|
-
|
106
|
+
如果你遇到问题,请尝试查看 Docker 日志和控制台日志进行排查。
|
94
107
|
|
95
|
-
|
108
|
+
## 发布到生产(IP 模式)
|
96
109
|
|
97
|
-
|
110
|
+
下文假设局域网 / 公网需要运行 LobeChat 服务的机器 IP 为 `your_server_ip`。
|
111
|
+
|
112
|
+
想要通过局域网 IP 访问,你需要首先按照本地启动运行:
|
113
|
+
|
114
|
+
```sh
|
115
|
+
bash <(curl -fsSL https://raw.githubusercontent.com/lobehub/lobe-chat/HEAD/docker-compose/local/setup.sh) -f -l zh_CN
|
116
|
+
docker compose up -d
|
117
|
+
```
|
118
|
+
|
119
|
+
接着,你需要修改下载下来的 `docker-compose.yml` 文件,执行一次全文替换,将 `localhost` 替换为 `your_server_ip`,随后重新启动:
|
120
|
+
|
121
|
+
```sh
|
122
|
+
sed -i 's/localhost/your_server_ip/g' docker-compose.yml
|
123
|
+
docker compose up -d
|
124
|
+
```
|
125
|
+
|
126
|
+
### 配置 Casdoor
|
127
|
+
|
128
|
+
1. 使用 `setup.sh` 脚本启动后,Casdoor WebUI 默认端口为 `8000`,你可以通过 `http://your_server_ip:8000` 访问,默认用户名 `admin`,密码 `123`
|
129
|
+
|
130
|
+
2. 在 `身份认证 -> 应用` 中添加一行
|
131
|
+
|
132
|
+
```
|
133
|
+
http://your_server_ip:3210/api/auth/callback/casdoor
|
134
|
+
```
|
135
|
+
|
136
|
+
3. 其他配置大多保持默认即可,你也可以在 `身份认证 -> 应用` 中修改默认配置
|
137
|
+
|
138
|
+
### 配置 MinIO S3
|
139
|
+
|
140
|
+
1. 使用 `setup.sh` 脚本启动后,MinIO WebUI 默认端口为 `9001`,你可以通过 `http://your_server_ip:9001` 访问,默认用户名 `YOUR_MINIO_USER`,密码 `YOUR_MINIO_PASSWORD`
|
141
|
+
|
142
|
+
2. 大多数配置保持默认即可,如果你希望能允许用户更换头像功能,你需要首先在 `buckets` 中创建一个名为 `casdoor` 的桶,选择自定义策略,复制并粘贴如下内容(如果你修改了桶名,请自行查找替换)
|
98
143
|
|
99
144
|
```json
|
100
145
|
{
|
@@ -105,7 +150,7 @@ docker compose up -d
|
|
105
150
|
"AWS": ["*"]
|
106
151
|
},
|
107
152
|
"Action": ["s3:GetBucketLocation"],
|
108
|
-
"Resource": ["arn:aws:s3:::
|
153
|
+
"Resource": ["arn:aws:s3:::casdoor"]
|
109
154
|
},
|
110
155
|
{
|
111
156
|
"Effect": "Allow",
|
@@ -113,7 +158,7 @@ docker compose up -d
|
|
113
158
|
"AWS": ["*"]
|
114
159
|
},
|
115
160
|
"Action": ["s3:ListBucket"],
|
116
|
-
"Resource": ["arn:aws:s3:::
|
161
|
+
"Resource": ["arn:aws:s3:::casdoor"],
|
117
162
|
"Condition": {
|
118
163
|
"StringEquals": {
|
119
164
|
"s3:prefix": ["files/*"]
|
@@ -126,50 +171,34 @@ docker compose up -d
|
|
126
171
|
"AWS": ["*"]
|
127
172
|
},
|
128
173
|
"Action": ["s3:PutObject", "s3:DeleteObject", "s3:GetObject"],
|
129
|
-
"Resource": ["arn:aws:s3:::
|
174
|
+
"Resource": ["arn:aws:s3:::casdoor/**"]
|
130
175
|
}
|
131
176
|
],
|
132
177
|
"Version": "2012-10-17"
|
133
178
|
}
|
134
179
|
```
|
135
180
|
|
136
|
-
|
181
|
+
3. 创建一个新的访问密钥,将生成的 `Access Key` 和 `Secret Key` 存储之
|
137
182
|
|
138
|
-
|
183
|
+
4. 在 Casdoor 的 `身份认证 -> 提供商` 中关联 MinIO S3 服务,以下是一个示例配置:
|
139
184
|
|
140
|
-
|
141
|
-
docker compose up -d
|
142
|
-
```
|
185
|
+

|
143
186
|
|
144
|
-
|
145
|
-
此时,请勿使用 `docker compose restart lobe` 来重启,因为这种重启方式不会重新加载环境变量,你的
|
146
|
-
S3 配置将不会生效。
|
187
|
+
其中,客户端 ID、客户端密钥为上一步创建的访问密钥中的 `Access Key` 和 `Secret Key`,`192.168.31.251` 应当被替换为 `your_server_ip`。
|
147
188
|
|
148
|
-
|
189
|
+
5. 在 Casdoor 的 `身份认证 -> 应用` 中,对 `app-built-in` 应用添加提供商,选择 `minio`,保存并退出
|
149
190
|
|
150
|
-
|
191
|
+
6. 你可以在 Casdoor 的 `身份认证 -> 资源` 中,尝试上传文件以测试配置是否正确
|
151
192
|
|
152
|
-
|
153
|
-
[Database] Start to migration...
|
154
|
-
✅ database migration pass.
|
155
|
-
-------------------------------------
|
156
|
-
▲ Next.js 14.x.x
|
157
|
-
- Local: http://localhost:3210
|
158
|
-
- Network: http://0.0.0.0:3210
|
193
|
+
## 发布到生产(域名模式)
|
159
194
|
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
</
|
165
|
-
|
166
|
-
至此,你已经成功部署了 LobeChat 数据库版本,你可以通过 `http://localhost:3210` 访问你的 LobeChat 服务。
|
167
|
-
|
168
|
-
如果你遇到问题,请尝试查看 Docker 日志和控制台日志,并根据后文的详细指引进行排查。
|
169
|
-
|
170
|
-
## 发布到生产
|
195
|
+
<Callout type="info">
|
196
|
+
对于拥有域名的部署,我们推荐使用 [Logto](https://logto.io/)
|
197
|
+
作为登录鉴权服务。本文剩余部分也将以其为例进行说明。如果你使用其他诸如 Casdoor
|
198
|
+
等其他登录鉴权服务,流程应当相近,但请注意不同的登录鉴权服务的端口配置可能有所差异。
|
199
|
+
</Callout>
|
171
200
|
|
172
|
-
|
201
|
+
在下文中,我们假设在上述服务之外,你还运行了一层 Nginx 来进行反向代理、配置 SSL。
|
173
202
|
|
174
203
|
域名和配套服务端口说明如下:
|
175
204
|
|
@@ -185,7 +214,8 @@ docker compose up -d
|
|
185
214
|
|
186
215
|
<Callout type="warning">
|
187
216
|
请务必注意,CORS 跨域是在 MinIO / Logto 服务端内部配置的,请勿在你的反向代理中额外配置 CORS,这会导致错误。
|
188
|
-
|
217
|
+
|
218
|
+
对于 minio 非 443 端口时,Host 必须是 `$http_host`(带端口号),否则会 403 错误:`proxy_set_header Host $http_host`。
|
189
219
|
|
190
220
|
如果你需要配置 SSL 证书,请统一在外层的 Nginx 反向代理中配置,而不是在 MinIO 中配置。
|
191
221
|
|
@@ -194,8 +224,8 @@ docker compose up -d
|
|
194
224
|
### 配置文件
|
195
225
|
|
196
226
|
```sh
|
197
|
-
curl -fsSL https://raw.githubusercontent.com/lobehub/lobe-chat/HEAD/docker-compose/production/docker-compose.yml > docker-compose.yml
|
198
|
-
curl -fsSL https://raw.githubusercontent.com/lobehub/lobe-chat/HEAD/docker-compose/production/.env.zh-CN.example > .env
|
227
|
+
curl -fsSL https://raw.githubusercontent.com/lobehub/lobe-chat/HEAD/docker-compose/production/logto/docker-compose.yml > docker-compose.yml
|
228
|
+
curl -fsSL https://raw.githubusercontent.com/lobehub/lobe-chat/HEAD/docker-compose/production/logto/.env.zh-CN.example > .env
|
199
229
|
```
|
200
230
|
|
201
231
|
配置文件包括 `.env` 和 `docker-compose.yml` 两个文件,其中 `.env` 文件用于配置 LobeChat 的环境变量,`docker-compose.yml` 文件用于配置 Postgres、MinIO 和 Logto 服务。
|
@@ -209,7 +239,7 @@ curl -fsSL https://raw.githubusercontent.com/lobehub/lobe-chat/HEAD/docker-compo
|
|
209
239
|
你可以使用下述指令检查日志:
|
210
240
|
|
211
241
|
```sh
|
212
|
-
docker logs -f lobe-
|
242
|
+
docker logs -f lobe-chat
|
213
243
|
```
|
214
244
|
|
215
245
|
<Callout type="tip">
|
@@ -338,157 +368,9 @@ docker compose up -d # 重新启动
|
|
338
368
|
|
339
369
|
## 附录
|
340
370
|
|
341
|
-
|
342
|
-
|
343
|
-
### 本地部署
|
344
|
-
|
345
|
-
#### `.env`
|
346
|
-
|
347
|
-
```sh
|
348
|
-
# Logto secret
|
349
|
-
AUTH_LOGTO_ID=
|
350
|
-
AUTH_LOGTO_SECRET=
|
351
|
-
|
352
|
-
# MinIO S3 配置
|
353
|
-
MINIO_ROOT_USER=YOUR_MINIO_USER
|
354
|
-
MINIO_ROOT_PASSWORD=YOUR_MINIO_PASSWORD
|
355
|
-
|
356
|
-
# 在下方配置 minio 中添加的桶
|
357
|
-
MINIO_LOBE_BUCKET=lobe
|
358
|
-
S3_ACCESS_KEY_ID=
|
359
|
-
S3_SECRET_ACCESS_KEY=
|
360
|
-
|
361
|
-
# Proxy,如果你需要的话(比如你使用 GitHub 作为鉴权服务提供商)
|
362
|
-
# HTTP_PROXY=http://localhost:7890
|
363
|
-
# HTTPS_PROXY=http://localhost:7890
|
364
|
-
|
365
|
-
# 其他环境变量,视需求而定,可以参照客户端版本的环境变量配置,注意不要有 ACCESS_CODE
|
366
|
-
# OPENAI_API_KEY=sk-xxxx
|
367
|
-
# OPENAI_PROXY_URL=https://api.openai.com/v1
|
368
|
-
# OPENAI_MODEL_LIST=...
|
369
|
-
|
370
|
-
# ----- 相关配置 start -----
|
371
|
-
# 如没有特殊需要不用更改
|
372
|
-
LOBE_PORT=3210
|
373
|
-
LOGTO_PORT=3001
|
374
|
-
MINIO_PORT=9000
|
375
|
-
|
376
|
-
# Postgres 相关,也即 DB 必须的环境变量
|
377
|
-
LOBE_DB_NAME=lobechat
|
378
|
-
POSTGRES_PASSWORD=uWNZugjBqixf8dxC
|
379
|
-
|
380
|
-
```
|
381
|
-
|
382
|
-
#### `docker-compose.yml`
|
383
|
-
|
384
|
-
```yaml
|
385
|
-
services:
|
386
|
-
network-service:
|
387
|
-
image: alpine
|
388
|
-
container_name: lobe-network
|
389
|
-
ports:
|
390
|
-
- '${MINIO_PORT}:${MINIO_PORT}' # MinIO API
|
391
|
-
- '9001:9001' # MinIO Console
|
392
|
-
- '${LOGTO_PORT}:${LOGTO_PORT}' # Logto
|
393
|
-
- '3002:3002' # Logto Admin
|
394
|
-
- '${LOBE_PORT}:3210' # LobeChat
|
395
|
-
command: tail -f /dev/null
|
396
|
-
networks:
|
397
|
-
- lobe-network
|
398
|
-
|
399
|
-
postgresql:
|
400
|
-
image: pgvector/pgvector:pg16
|
401
|
-
container_name: lobe-postgres
|
402
|
-
ports:
|
403
|
-
- "5432:5432"
|
404
|
-
volumes:
|
405
|
-
- './data:/var/lib/postgresql/data'
|
406
|
-
environment:
|
407
|
-
- 'POSTGRES_DB=${LOBE_DB_NAME}'
|
408
|
-
- 'POSTGRES_PASSWORD=${POSTGRES_PASSWORD}'
|
409
|
-
healthcheck:
|
410
|
-
test: ['CMD-SHELL', 'pg_isready -U postgres']
|
411
|
-
interval: 5s
|
412
|
-
timeout: 5s
|
413
|
-
retries: 5
|
414
|
-
restart: always
|
415
|
-
networks:
|
416
|
-
- lobe-network
|
371
|
+
为方便一键复制,在此汇总域名方式下生产部署配置服务端数据库所需要的示例配置文件(对于本地快速启动、局域网 IP 访问等场景,请直接使用 `setup.sh` 脚本生成后自行修改):
|
417
372
|
|
418
|
-
|
419
|
-
image: minio/minio
|
420
|
-
container_name: lobe-minio
|
421
|
-
network_mode: 'service:network-service'
|
422
|
-
volumes:
|
423
|
-
- './s3_data:/etc/minio/data'
|
424
|
-
environment:
|
425
|
-
- 'MINIO_ROOT_USER=${MINIO_ROOT_USER}'
|
426
|
-
- 'MINIO_ROOT_PASSWORD=${MINIO_ROOT_PASSWORD}'
|
427
|
-
- 'MINIO_API_CORS_ALLOW_ORIGIN=http://localhost:${LOBE_PORT}'
|
428
|
-
restart: always
|
429
|
-
command: >
|
430
|
-
server /etc/minio/data --address ":${MINIO_PORT}" --console-address ":9001"
|
431
|
-
|
432
|
-
logto:
|
433
|
-
image: svhd/logto
|
434
|
-
container_name: lobe-logto
|
435
|
-
network_mode: 'service:network-service'
|
436
|
-
depends_on:
|
437
|
-
postgresql:
|
438
|
-
condition: service_healthy
|
439
|
-
environment:
|
440
|
-
- 'TRUST_PROXY_HEADER=1'
|
441
|
-
- 'PORT=${LOGTO_PORT}'
|
442
|
-
- 'DB_URL=postgresql://postgres:${POSTGRES_PASSWORD}@postgresql:5432/logto'
|
443
|
-
- 'ENDPOINT=http://localhost:${LOGTO_PORT}'
|
444
|
-
- 'ADMIN_ENDPOINT=http://localhost:3002'
|
445
|
-
entrypoint: ['sh', '-c', 'npm run cli db seed -- --swe && npm start']
|
446
|
-
|
447
|
-
lobe:
|
448
|
-
image: lobehub/lobe-chat-database
|
449
|
-
container_name: lobe-database
|
450
|
-
network_mode: 'service:network-service'
|
451
|
-
depends_on:
|
452
|
-
postgresql:
|
453
|
-
condition: service_healthy
|
454
|
-
network-service:
|
455
|
-
condition: service_started
|
456
|
-
minio:
|
457
|
-
condition: service_started
|
458
|
-
logto:
|
459
|
-
condition: service_started
|
460
|
-
|
461
|
-
environment:
|
462
|
-
- 'APP_URL=http://localhost:3210'
|
463
|
-
- 'NEXT_AUTH_SSO_PROVIDERS=logto'
|
464
|
-
- 'KEY_VAULTS_SECRET=Kix2wcUONd4CX51E/ZPAd36BqM4wzJgKjPtz2sGztqQ='
|
465
|
-
- 'NEXT_AUTH_SECRET=NX2kaPE923dt6BL2U8e9oSre5RfoT7hg'
|
466
|
-
- 'NEXTAUTH_URL=http://localhost:${LOBE_PORT}/api/auth'
|
467
|
-
- 'AUTH_LOGTO_ISSUER=http://localhost:${LOGTO_PORT}/oidc'
|
468
|
-
- 'DATABASE_URL=postgresql://postgres:${POSTGRES_PASSWORD}@postgresql:5432/${LOBE_DB_NAME}'
|
469
|
-
- 'S3_ENDPOINT=http://localhost:${MINIO_PORT}'
|
470
|
-
- 'S3_BUCKET=${MINIO_LOBE_BUCKET}'
|
471
|
-
- 'S3_PUBLIC_DOMAIN=http://localhost:${MINIO_PORT}'
|
472
|
-
- 'S3_ENABLE_PATH_STYLE=1'
|
473
|
-
env_file:
|
474
|
-
- .env
|
475
|
-
restart: always
|
476
|
-
|
477
|
-
volumes:
|
478
|
-
data:
|
479
|
-
driver: local
|
480
|
-
s3_data:
|
481
|
-
driver: local
|
482
|
-
|
483
|
-
networks:
|
484
|
-
lobe-network:
|
485
|
-
driver: bridge
|
486
|
-
|
487
|
-
```
|
488
|
-
|
489
|
-
### 发布到生产
|
490
|
-
|
491
|
-
#### `.env`
|
373
|
+
### `.env`
|
492
374
|
|
493
375
|
```sh
|
494
376
|
# 必填,LobeChat 域名,用于 tRPC 调用
|
@@ -546,12 +428,12 @@ S3_ENABLE_PATH_STYLE=1
|
|
546
428
|
# OPENAI_API_KEY=sk-xxxx
|
547
429
|
# OPENAI_PROXY_URL=https://api.openai.com/v1
|
548
430
|
# OPENAI_MODEL_LIST=...
|
549
|
-
|
550
431
|
```
|
551
432
|
|
552
|
-
|
433
|
+
### `docker-compose.yml`
|
553
434
|
|
554
435
|
```yaml
|
436
|
+
name: lobe-chat-database
|
555
437
|
services:
|
556
438
|
postgresql:
|
557
439
|
image: pgvector/pgvector:pg16
|
@@ -587,6 +469,7 @@ services:
|
|
587
469
|
command: >
|
588
470
|
server /etc/minio/data --address ":9000" --console-address ":9001"
|
589
471
|
|
472
|
+
|
590
473
|
logto:
|
591
474
|
image: svhd/logto
|
592
475
|
container_name: lobe-logto
|
@@ -605,7 +488,7 @@ services:
|
|
605
488
|
|
606
489
|
lobe:
|
607
490
|
image: lobehub/lobe-chat-database
|
608
|
-
container_name: lobe-
|
491
|
+
container_name: lobe-chat
|
609
492
|
ports:
|
610
493
|
- '3210:3210'
|
611
494
|
depends_on:
|
@@ -621,10 +504,9 @@ volumes:
|
|
621
504
|
driver: local
|
622
505
|
s3_data:
|
623
506
|
driver: local
|
624
|
-
|
625
507
|
```
|
626
508
|
|
627
|
-
|
509
|
+
### `minio-bucket-config.json`
|
628
510
|
|
629
511
|
```json
|
630
512
|
{
|
@@ -1,6 +1,8 @@
|
|
1
1
|
---
|
2
2
|
title: Using AI21 Labs in LobeChat
|
3
|
-
description:
|
3
|
+
description: >-
|
4
|
+
Learn how to integrate and utilize AI21 Labs's language model APIs in
|
5
|
+
LobeChat.
|
4
6
|
tags:
|
5
7
|
- LobeChat
|
6
8
|
- AI21 Labs
|
@@ -1,6 +1,8 @@
|
|
1
1
|
---
|
2
2
|
title: Using Fireworks AI in LobeChat
|
3
|
-
description:
|
3
|
+
description: >-
|
4
|
+
Learn how to integrate and utilize Fireworks AI's language model APIs in
|
5
|
+
LobeChat.
|
4
6
|
tags:
|
5
7
|
- LobeChat
|
6
8
|
- Fireworks AI
|
@@ -1,6 +1,8 @@
|
|
1
1
|
---
|
2
2
|
title: Using Tencent Hunyuan in LobeChat
|
3
|
-
description:
|
3
|
+
description: >-
|
4
|
+
Learn how to integrate and utilize Tencent Hunyuan's language model APIs in
|
5
|
+
LobeChat.
|
4
6
|
tags:
|
5
7
|
- LobeChat
|
6
8
|
- Tencent Hunyuan
|
@@ -1,6 +1,8 @@
|
|
1
1
|
---
|
2
2
|
title: Using SiliconCloud in LobeChat
|
3
|
-
description:
|
3
|
+
description: >-
|
4
|
+
Learn how to integrate and utilize SiliconCloud's language model APIs in
|
5
|
+
LobeChat.
|
4
6
|
tags:
|
5
7
|
- LobeChat
|
6
8
|
- SiliconCloud
|
@@ -1,6 +1,8 @@
|
|
1
1
|
---
|
2
2
|
title: Using Wenxin Qianfan in LobeChat
|
3
|
-
description:
|
3
|
+
description: >-
|
4
|
+
Learn how to integrate and utilize Wenxin Qianfan's language model APIs in
|
5
|
+
LobeChat.
|
4
6
|
tags:
|
5
7
|
- LobeChat
|
6
8
|
- 百度
|
@@ -2,8 +2,8 @@
|
|
2
2
|
title: Using 01 AI API Key in LobeChat
|
3
3
|
description: >-
|
4
4
|
Learn how to integrate and use 01 AI in LobeChat with step-by-step
|
5
|
-
instructions. Obtain an API key, configure 01 AI, and start
|
6
|
-
|
5
|
+
instructions. Obtain an API key, configure 01 AI, and start conversations with
|
6
|
+
AI models.
|
7
7
|
tags:
|
8
8
|
- 01.AI
|
9
9
|
- Web UI
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@lobehub/chat",
|
3
|
-
"version": "1.22.
|
3
|
+
"version": "1.22.3",
|
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",
|
@@ -125,7 +125,7 @@
|
|
125
125
|
"@lobehub/icons": "^1.35.3",
|
126
126
|
"@lobehub/tts": "^1.24.3",
|
127
127
|
"@lobehub/ui": "^1.150.3",
|
128
|
-
"@neondatabase/serverless": "^0.
|
128
|
+
"@neondatabase/serverless": "^0.10.0",
|
129
129
|
"@next/third-parties": "^14.2.6",
|
130
130
|
"@react-spring/web": "^9.7.3",
|
131
131
|
"@sentry/nextjs": "^7.119.0",
|
@@ -149,7 +149,7 @@
|
|
149
149
|
"debug": "^4.3.6",
|
150
150
|
"dexie": "^3.2.7",
|
151
151
|
"diff": "^5.2.0",
|
152
|
-
"drizzle-orm": "^0.
|
152
|
+
"drizzle-orm": "^0.34.0",
|
153
153
|
"drizzle-zod": "^0.5.1",
|
154
154
|
"fast-deep-equal": "^3.1.3",
|
155
155
|
"file-type": "^19.4.1",
|
@@ -270,7 +270,7 @@
|
|
270
270
|
"consola": "^3.2.3",
|
271
271
|
"dotenv": "^16.4.5",
|
272
272
|
"dpdm": "^3.14.0",
|
273
|
-
"drizzle-kit": "^0.
|
273
|
+
"drizzle-kit": "^0.25.0",
|
274
274
|
"eslint": "^8.57.0",
|
275
275
|
"eslint-plugin-mdx": "^2.3.4",
|
276
276
|
"eslint-plugin-unused-imports": "4.0.1",
|
@@ -302,7 +302,7 @@
|
|
302
302
|
"vitest": "~1.2.2",
|
303
303
|
"vitest-canvas-mock": "^0.3.3"
|
304
304
|
},
|
305
|
-
"packageManager": "pnpm@9.12.
|
305
|
+
"packageManager": "pnpm@9.12.1",
|
306
306
|
"publishConfig": {
|
307
307
|
"access": "public",
|
308
308
|
"registry": "https://registry.npmjs.org"
|
@@ -25,7 +25,7 @@ function LobeLogtoProvider(config: OIDCUserConfig<LogtoProfile>): OIDCConfig<Log
|
|
25
25
|
email: profile.email,
|
26
26
|
id: profile.sub,
|
27
27
|
image: profile.picture,
|
28
|
-
name: profile.name ?? profile.username,
|
28
|
+
name: profile.name ?? profile.username ?? profile.email,
|
29
29
|
providerAccountId: profile.sub,
|
30
30
|
};
|
31
31
|
},
|
package/src/server/manifest.ts
CHANGED