@lobehub/chat 1.15.16 → 1.15.17
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 +4 -4
- package/docker-compose/local/.env.example +1 -1
- package/docker-compose/local/.env.zh-CN.example +1 -1
- package/docker-compose/production/.env.example +1 -1
- package/docker-compose/production/.env.zh-CN.example +1 -1
- package/docs/self-hosting/server-database/docker-compose.mdx +2 -2
- package/docs/self-hosting/server-database/docker-compose.zh-CN.mdx +2 -2
- package/docs/self-hosting/server-database/docker.mdx +1 -1
- package/docs/self-hosting/server-database/docker.zh-CN.mdx +1 -1
- package/package.json +1 -1
- package/src/libs/trpc/middleware/userAuth.ts +7 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,31 @@
|
|
|
2
2
|
|
|
3
3
|
# Changelog
|
|
4
4
|
|
|
5
|
+
### [Version 1.15.17](https://github.com/lobehub/lobe-chat/compare/v1.15.16...v1.15.17)
|
|
6
|
+
|
|
7
|
+
<sup>Released on **2024-09-06**</sup>
|
|
8
|
+
|
|
9
|
+
#### 🐛 Bug Fixes
|
|
10
|
+
|
|
11
|
+
- **misc**: Fix auth log.
|
|
12
|
+
|
|
13
|
+
<br/>
|
|
14
|
+
|
|
15
|
+
<details>
|
|
16
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
|
17
|
+
|
|
18
|
+
#### What's fixed
|
|
19
|
+
|
|
20
|
+
- **misc**: Fix auth log, closes [#3795](https://github.com/lobehub/lobe-chat/issues/3795) ([71aa405](https://github.com/lobehub/lobe-chat/commit/71aa405))
|
|
21
|
+
|
|
22
|
+
</details>
|
|
23
|
+
|
|
24
|
+
<div align="right">
|
|
25
|
+
|
|
26
|
+
[](#readme-top)
|
|
27
|
+
|
|
28
|
+
</div>
|
|
29
|
+
|
|
5
30
|
### [Version 1.15.16](https://github.com/lobehub/lobe-chat/compare/v1.15.15...v1.15.16)
|
|
6
31
|
|
|
7
32
|
<sup>Released on **2024-09-06**</sup>
|
package/README.md
CHANGED
|
@@ -462,8 +462,8 @@ If you want to deploy this service yourself on either Vercel or Zeabur, you can
|
|
|
462
462
|
|
|
463
463
|
<div align="center">
|
|
464
464
|
|
|
465
|
-
| Deploy with Vercel | Deploy with Zeabur | Deploy with Sealos |
|
|
466
|
-
| :-------------------------------------: | :---------------------------------------------------------: | :---------------------------------------------------------: |
|
|
465
|
+
| Deploy with Vercel | Deploy with Zeabur | Deploy with Sealos | Deploy with RepoCloud |
|
|
466
|
+
| :-------------------------------------: | :---------------------------------------------------------: | :---------------------------------------------------------: | :---------------------------------------------------------------: |
|
|
467
467
|
| [![][deploy-button-image]][deploy-link] | [![][deploy-on-zeabur-button-image]][deploy-on-zeabur-link] | [![][deploy-on-sealos-button-image]][deploy-on-sealos-link] | [![][deploy-on-repocloud-button-image]][deploy-on-repocloud-link] |
|
|
468
468
|
|
|
469
469
|
</div>
|
|
@@ -711,12 +711,12 @@ This project is [Apache 2.0](./LICENSE) licensed.
|
|
|
711
711
|
[codespaces-shield]: https://github.com/codespaces/badge.svg
|
|
712
712
|
[deploy-button-image]: https://vercel.com/button
|
|
713
713
|
[deploy-link]: https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Flobehub%2Flobe-chat&env=OPENAI_API_KEY,ACCESS_CODE&envDescription=Find%20your%20OpenAI%20API%20Key%20by%20click%20the%20right%20Learn%20More%20button.%20%7C%20Access%20Code%20can%20protect%20your%20website&envLink=https%3A%2F%2Fplatform.openai.com%2Faccount%2Fapi-keys&project-name=lobe-chat&repository-name=lobe-chat
|
|
714
|
+
[deploy-on-repocloud-button-image]: https://d16t0pc4846x52.cloudfront.net/deploylobe.svg
|
|
715
|
+
[deploy-on-repocloud-link]: https://repocloud.io/details/?app_id=248
|
|
714
716
|
[deploy-on-sealos-button-image]: https://raw.githubusercontent.com/labring-actions/templates/main/Deploy-on-Sealos.svg
|
|
715
717
|
[deploy-on-sealos-link]: https://cloud.sealos.io/?openapp=system-template%3FtemplateName%3Dlobe-chat
|
|
716
718
|
[deploy-on-zeabur-button-image]: https://zeabur.com/button.svg
|
|
717
719
|
[deploy-on-zeabur-link]: https://zeabur.com/templates/VZGGTI
|
|
718
|
-
[deploy-on-repocloud-button-image]: https://d16t0pc4846x52.cloudfront.net/deploylobe.svg
|
|
719
|
-
[deploy-on-repocloud-link]: https://repocloud.io/details/?app_id=248
|
|
720
720
|
[discord-link]: https://discord.gg/AYFPHvv2jT
|
|
721
721
|
[discord-shield]: https://img.shields.io/discord/1127171173982154893?color=5865F2&label=discord&labelColor=black&logo=discord&logoColor=white&style=flat-square
|
|
722
722
|
[discord-shield-badge]: https://img.shields.io/discord/1127171173982154893?color=5865F2&label=discord&labelColor=black&logo=discord&logoColor=white&style=for-the-badge
|
|
@@ -17,7 +17,7 @@ S3_SECRET_ACCESS_KEY=
|
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
# Other environment variables, as needed. You can refer to the environment variables configuration for the client version, making sure not to have ACCESS_CODE.
|
|
20
|
-
#
|
|
20
|
+
# OPENAI_API_KEY=sk-xxxx
|
|
21
21
|
# OPENAI_PROXY_URL=https://api.openai.com/v1
|
|
22
22
|
# OPENAI_MODEL_LIST=...
|
|
23
23
|
|
|
@@ -51,6 +51,6 @@ S3_ENABLE_PATH_STYLE=1
|
|
|
51
51
|
# See: https://lobehub.com/docs/self-hosting/environment-variables/basic
|
|
52
52
|
# Note: For server versions, the API must support embedding models (OpenAI text-embedding-3-small) for file processing
|
|
53
53
|
# You don't need to specify this model in OPENAI_MODEL_LIST
|
|
54
|
-
#
|
|
54
|
+
# OPENAI_API_KEY=sk-xxxx
|
|
55
55
|
# OPENAI_PROXY_URL=https://api.openai.com/v1
|
|
56
56
|
# OPENAI_MODEL_LIST=...
|
|
@@ -50,6 +50,6 @@ S3_ENABLE_PATH_STYLE=1
|
|
|
50
50
|
# 其他基础环境变量,视需求而定。注意不要有 ACCESS_CODE
|
|
51
51
|
# 请参考:https://lobehub.com/zh/docs/self-hosting/environment-variables/basic
|
|
52
52
|
# 请注意,对于服务端版本,其 API 必须支持嵌入(即 OpenAI text-embedding-3-small)模型,否则无法对上传文件进行处理,但你无需在 OPENAI_MODEL_LIST 中指定此模型
|
|
53
|
-
#
|
|
53
|
+
# OPENAI_API_KEY=sk-xxxx
|
|
54
54
|
# OPENAI_PROXY_URL=https://api.openai.com/v1
|
|
55
55
|
# OPENAI_MODEL_LIST=...
|
|
@@ -365,7 +365,7 @@ S3_SECRET_ACCESS_KEY=
|
|
|
365
365
|
# HTTPS_PROXY=http://localhost:7890
|
|
366
366
|
|
|
367
367
|
# Other environment variables, as needed. You can refer to the environment variables configuration for the client version, making sure not to have ACCESS_CODE.
|
|
368
|
-
#
|
|
368
|
+
# OPENAI_API_KEY=sk-xxxx
|
|
369
369
|
# OPENAI_PROXY_URL=https://api.openai.com/v1
|
|
370
370
|
# OPENAI_MODEL_LIST=...
|
|
371
371
|
|
|
@@ -546,7 +546,7 @@ S3_ENABLE_PATH_STYLE=1
|
|
|
546
546
|
# See: https://lobehub.com/docs/self-hosting/environment-variables/basic
|
|
547
547
|
# Note: For server versions, the API must support embedding models (OpenAI text-embedding-3-small) for file processing
|
|
548
548
|
# You don't need to specify this model in OPENAI_MODEL_LIST
|
|
549
|
-
#
|
|
549
|
+
# OPENAI_API_KEY=sk-xxxx
|
|
550
550
|
# OPENAI_PROXY_URL=https://api.openai.com/v1
|
|
551
551
|
# OPENAI_MODEL_LIST=...
|
|
552
552
|
|
|
@@ -362,7 +362,7 @@ S3_SECRET_ACCESS_KEY=
|
|
|
362
362
|
# HTTPS_PROXY=http://localhost:7890
|
|
363
363
|
|
|
364
364
|
# 其他环境变量,视需求而定,可以参照客户端版本的环境变量配置,注意不要有 ACCESS_CODE
|
|
365
|
-
#
|
|
365
|
+
# OPENAI_API_KEY=sk-xxxx
|
|
366
366
|
# OPENAI_PROXY_URL=https://api.openai.com/v1
|
|
367
367
|
# OPENAI_MODEL_LIST=...
|
|
368
368
|
|
|
@@ -542,7 +542,7 @@ S3_ENABLE_PATH_STYLE=1
|
|
|
542
542
|
# 其他基础环境变量,视需求而定。注意不要有 ACCESS_CODE
|
|
543
543
|
# 请参考:https://lobehub.com/zh/docs/self-hosting/environment-variables/basic
|
|
544
544
|
# 请注意,对于服务端版本,其 API 必须支持嵌入(OpenAI text-embedding-3-small)模型,否则无法对上传文件进行处理,但你无需在 OPENAI_MODEL_LIST 中指定此模型
|
|
545
|
-
#
|
|
545
|
+
# OPENAI_API_KEY=sk-xxxx
|
|
546
546
|
# OPENAI_PROXY_URL=https://api.openai.com/v1
|
|
547
547
|
# OPENAI_MODEL_LIST=...
|
|
548
548
|
|
|
@@ -85,7 +85,7 @@ S3_BUCKET=lobechat
|
|
|
85
85
|
S3_PUBLIC_DOMAIN=https://s3-for-lobechat.your-domain.com
|
|
86
86
|
|
|
87
87
|
# Other environment variables, as needed. You can refer to the environment variables configuration for the client version, making sure not to have ACCESS_CODE.
|
|
88
|
-
#
|
|
88
|
+
# OPENAI_API_KEY=sk-xxxx
|
|
89
89
|
# OPENAI_PROXY_URL=https://api.openai.com/v1
|
|
90
90
|
# OPENAI_MODEL_LIST=...
|
|
91
91
|
```
|
|
@@ -89,7 +89,7 @@ S3_PUBLIC_DOMAIN=https://s3-for-lobechat.your-domain.com # 用于外网访问 S3
|
|
|
89
89
|
# S3_REGION=ap-chengdu # 如果需要指定地域
|
|
90
90
|
|
|
91
91
|
# 其他环境变量,视需求而定
|
|
92
|
-
#
|
|
92
|
+
# OPENAI_API_KEY=sk-xxxx
|
|
93
93
|
# OPENAI_PROXY_URL=https://api.openai.com/v1
|
|
94
94
|
# OPENAI_MODEL_LIST=...
|
|
95
95
|
# ...
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lobehub/chat",
|
|
3
|
-
"version": "1.15.
|
|
3
|
+
"version": "1.15.17",
|
|
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",
|
|
@@ -1,12 +1,18 @@
|
|
|
1
1
|
import { TRPCError } from '@trpc/server';
|
|
2
2
|
|
|
3
|
+
import { enableClerk } from '@/const/auth';
|
|
4
|
+
|
|
3
5
|
import { trpc } from '../init';
|
|
4
6
|
|
|
5
7
|
export const userAuth = trpc.middleware(async (opts) => {
|
|
6
8
|
const { ctx } = opts;
|
|
7
9
|
// `ctx.user` is nullable
|
|
8
10
|
if (!ctx.userId) {
|
|
9
|
-
|
|
11
|
+
if (enableClerk) {
|
|
12
|
+
console.log('clerk auth:', ctx.clerkAuth);
|
|
13
|
+
} else {
|
|
14
|
+
console.log('next auth:', ctx.nextAuth);
|
|
15
|
+
}
|
|
10
16
|
throw new TRPCError({ code: 'UNAUTHORIZED' });
|
|
11
17
|
}
|
|
12
18
|
|