@lobehub/chat 1.33.3 → 1.33.5
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/.i18nrc.js +8 -2
- package/.releaserc.js +10 -1
- package/CHANGELOG.md +51 -16624
- package/changelog/CHANGELOG.v0.md +16621 -0
- package/changelog/v0.json +6064 -0
- package/changelog/v1.json +3347 -0
- package/docs/changelog/2024-11-25-november-providers.mdx +19 -0
- package/docs/changelog/2024-11-25-november-providers.zh-CN.mdx +17 -0
- package/docs/changelog/index.json +12 -0
- package/docs/changelog/schema.json +70 -0
- package/docs/self-hosting/advanced/auth/clerk.mdx +19 -23
- package/docs/self-hosting/advanced/auth/clerk.zh-CN.mdx +5 -4
- package/docs/self-hosting/advanced/auth/next-auth/authelia.mdx +2 -4
- package/docs/self-hosting/advanced/auth/next-auth/authelia.zh-CN.mdx +3 -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 +49 -44
- package/docs/self-hosting/advanced/auth/next-auth/casdoor.zh-CN.mdx +42 -41
- package/docs/self-hosting/advanced/auth/next-auth/logto.mdx +29 -21
- package/docs/self-hosting/advanced/auth/next-auth/logto.zh-CN.mdx +2 -1
- package/docs/self-hosting/advanced/auth.mdx +10 -10
- package/docs/self-hosting/advanced/auth.zh-CN.mdx +10 -10
- package/docs/self-hosting/advanced/feature-flags.zh-CN.mdx +1 -1
- package/docs/self-hosting/advanced/model-list.mdx +1 -1
- package/docs/self-hosting/advanced/s3/cloudflare-r2.mdx +17 -12
- package/docs/self-hosting/advanced/s3/tencent-cloud.mdx +33 -20
- package/docs/self-hosting/advanced/s3.mdx +31 -28
- package/docs/self-hosting/advanced/s3.zh-CN.mdx +1 -0
- package/docs/self-hosting/advanced/webrtc.mdx +1 -0
- package/docs/self-hosting/environment-variables/s3.mdx +4 -3
- package/docs/self-hosting/environment-variables/s3.zh-CN.mdx +1 -0
- package/docs/self-hosting/environment-variables.mdx +6 -9
- package/docs/self-hosting/platform/alibaba-cloud.mdx +1 -2
- package/docs/self-hosting/platform/alibaba-cloud.zh-CN.mdx +1 -2
- package/docs/self-hosting/platform/btpanel.mdx +7 -13
- package/docs/self-hosting/platform/btpanel.zh-CN.mdx +8 -13
- package/docs/self-hosting/platform/docker.zh-CN.mdx +2 -1
- package/docs/self-hosting/platform/netlify.zh-CN.mdx +2 -1
- package/docs/self-hosting/server-database/docker.mdx +18 -5
- package/docs/self-hosting/server-database/docker.zh-CN.mdx +9 -6
- package/docs/self-hosting/server-database/netlify.mdx +0 -1
- package/docs/self-hosting/server-database/railway.mdx +0 -1
- package/docs/self-hosting/server-database/repocloud.mdx +5 -2
- package/docs/self-hosting/server-database/repocloud.zh-CN.mdx +23 -3
- package/docs/self-hosting/server-database/sealos.mdx +3 -0
- package/docs/self-hosting/server-database/vercel.mdx +35 -32
- package/docs/self-hosting/server-database/vercel.zh-CN.mdx +25 -25
- package/docs/self-hosting/server-database/zeabur.mdx +2 -2
- package/docs/self-hosting/server-database/zeabur.zh-CN.mdx +3 -4
- package/docs/self-hosting/server-database.mdx +23 -8
- package/docs/self-hosting/start.mdx +8 -2
- package/docs/usage/features/database.zh-CN.mdx +1 -1
- package/docs/usage/foundation/text2image.mdx +1 -2
- package/docs/usage/foundation/text2image.zh-CN.mdx +1 -3
- package/docs/usage/providers/ai21.mdx +14 -15
- package/docs/usage/providers/ai21.zh-CN.mdx +1 -3
- package/docs/usage/providers/ai360.mdx +14 -15
- package/docs/usage/providers/ai360.zh-CN.mdx +1 -3
- package/docs/usage/providers/cloudflare.mdx +1 -1
- package/docs/usage/providers/fireworksai.mdx +19 -19
- package/docs/usage/providers/fireworksai.zh-CN.mdx +1 -3
- package/docs/usage/providers/github.mdx +22 -21
- package/docs/usage/providers/github.zh-CN.mdx +6 -6
- package/docs/usage/providers/hunyuan.mdx +17 -18
- package/docs/usage/providers/hunyuan.zh-CN.mdx +1 -3
- package/docs/usage/providers/siliconcloud.mdx +14 -15
- package/docs/usage/providers/siliconcloud.zh-CN.mdx +3 -5
- package/docs/usage/providers/spark.mdx +17 -18
- package/docs/usage/providers/spark.zh-CN.mdx +1 -3
- package/docs/usage/providers/upstage.mdx +14 -15
- package/docs/usage/providers/upstage.zh-CN.mdx +1 -3
- package/docs/usage/providers/wenxin.mdx +17 -18
- package/docs/usage/providers/wenxin.zh-CN.mdx +1 -3
- package/docs/usage/providers/zeroone.mdx +2 -2
- package/locales/ar/providers.json +3 -0
- package/locales/bg-BG/providers.json +3 -0
- package/locales/de-DE/providers.json +3 -0
- package/locales/en-US/providers.json +3 -0
- package/locales/es-ES/providers.json +3 -0
- package/locales/fa-IR/providers.json +3 -0
- package/locales/fr-FR/providers.json +3 -0
- package/locales/it-IT/providers.json +3 -0
- package/locales/ja-JP/providers.json +3 -0
- package/locales/ko-KR/providers.json +3 -0
- package/locales/nl-NL/providers.json +3 -0
- package/locales/pl-PL/providers.json +3 -0
- package/locales/pt-BR/providers.json +3 -0
- package/locales/ru-RU/providers.json +3 -0
- package/locales/tr-TR/providers.json +3 -0
- package/locales/vi-VN/providers.json +3 -0
- package/locales/zh-CN/providers.json +3 -0
- package/locales/zh-TW/providers.json +3 -0
- package/package.json +6 -1
- package/scripts/changelogWorkflow/buildStaticChangelog.ts +135 -0
- package/scripts/changelogWorkflow/const.ts +11 -0
- package/scripts/changelogWorkflow/index.ts +10 -0
- package/src/server/modules/AgentRuntime/index.ts +21 -219
@@ -57,17 +57,17 @@ LobeChat 与 Clerk 做了深度集成,能够为用户提供一个更加安全
|
|
57
57
|
|
58
58
|
顺序为 SSO 提供商的显示顺序。
|
59
59
|
|
60
|
-
| SSO 提供商
|
61
|
-
|
|
62
|
-
| Auth0
|
63
|
-
| Authenlia
|
64
|
-
| Authentik
|
65
|
-
| Casdoor
|
60
|
+
| SSO 提供商 | 值 |
|
61
|
+
| --------------------- | ----------------------- |
|
62
|
+
| Auth0 | `auth0` |
|
63
|
+
| Authenlia | `authenlia` |
|
64
|
+
| Authentik | `authentik` |
|
65
|
+
| Casdoor | `casdoor` |
|
66
66
|
| Cloudflare Zero Trust | `cloudflare-zero-trust` |
|
67
|
-
| Github
|
68
|
-
| Logto
|
69
|
-
| Microsoft Entra ID
|
70
|
-
| ZITADEL
|
67
|
+
| Github | `github` |
|
68
|
+
| Logto | `logto` |
|
69
|
+
| Microsoft Entra ID | `microsoft-entra-id` |
|
70
|
+
| ZITADEL | `zitadel` |
|
71
71
|
|
72
72
|
## 其他 SSO 提供商
|
73
73
|
|
@@ -42,6 +42,6 @@ tags:
|
|
42
42
|
| `market` | 启用助手市场功能。 | 开启 |
|
43
43
|
| `speech_to_text` | 启用语音转文本功能。 | 开启 |
|
44
44
|
| `knowledge_base` | 启用知识库功能。 | 开启 |
|
45
|
-
| `clerk_sign_up`
|
45
|
+
| `clerk_sign_up` | 启用Clerk注册功能。 | 开启 |
|
46
46
|
|
47
47
|
你可以随时检查 [featureFlags](https://github.com/lobehub/lobe-chat/blob/main/src/config/featureFlags/schema.ts) 以获取最新的特性标志列表。
|
@@ -12,7 +12,7 @@ tags:
|
|
12
12
|
|
13
13
|
# Model List
|
14
14
|
|
15
|
-
LobeChat supports customizing the model list during deployment. This configuration is done in the environment for each [model provider](/docs/self-hosting/environment-variables/model-provider).
|
15
|
+
LobeChat supports customizing the model list during deployment. This configuration is done in the environment for each [model provider](/docs/self-hosting/environment-variables/model-provider).
|
16
16
|
|
17
17
|
You can use `+` to add a model, `-` to hide a model, and use `model name=display name<extension configuration>` to customize the display name of a model, separated by English commas. The basic syntax is as follows:
|
18
18
|
|
@@ -6,6 +6,7 @@ tags:
|
|
6
6
|
- S3 Storage
|
7
7
|
- Configuration Guide
|
8
8
|
---
|
9
|
+
|
9
10
|
# Configuring Cloudflare R2 Storage Service
|
10
11
|
|
11
12
|
We need to configure an S3 storage service in the server-side database to store files.
|
@@ -23,13 +24,14 @@ The interface of Cloudflare R2 is shown below:
|
|
23
24
|
<Image
|
24
25
|
alt={'Cloudflare R2 Storage Interface'}
|
25
26
|
src={'https://github.com/lobehub/lobe-chat/assets/28616219/41f7f677-0153-4a96-b849-5ac9b7ebefee'}
|
26
|
-
|
27
|
+
/>
|
27
28
|
|
28
29
|
When creating the bucket, specify its name and then click create.
|
30
|
+
|
29
31
|
<Image
|
30
32
|
alt={'Create Bucket in R2'}
|
31
33
|
src={'https://github.com/lobehub/lobe-chat/assets/28616219/9c0d184c-3169-40fa-9115-011cfffb9ca7'}
|
32
|
-
|
34
|
+
/>
|
33
35
|
|
34
36
|
### Obtain Environment Variables for the Bucket
|
35
37
|
|
@@ -38,7 +40,7 @@ In the settings of the R2 storage bucket, you can view the bucket configuration
|
|
38
40
|
<Image
|
39
41
|
alt={'View relevant information of the bucket'}
|
40
42
|
src={'https://github.com/lobehub/lobe-chat/assets/28616219/2ceb210c-eca0-4439-ba27-8734d4ebb3ee'}
|
41
|
-
|
43
|
+
/>
|
42
44
|
|
43
45
|
The corresponding environment variables are:
|
44
46
|
|
@@ -51,7 +53,9 @@ S3_ENDPOINT=https://0b33a03b5c993fd2f453379dc36558e5.r2.cloudflarestorage.com
|
|
51
53
|
S3_PUBLIC_DOMAIN=https://s3-for-lobechat.your-domain.com
|
52
54
|
```
|
53
55
|
|
54
|
-
<Callout type={'warning'}
|
56
|
+
<Callout type={'warning'}>
|
57
|
+
`S3_ENDPOINT` must have its path removed, otherwise uploaded files cannot be accessed.
|
58
|
+
</Callout>
|
55
59
|
|
56
60
|
### Obtain S3 Key Environment Variables
|
57
61
|
|
@@ -60,28 +64,28 @@ You need to obtain the access key for S3 so that the LobeChat server has permiss
|
|
60
64
|
<Image
|
61
65
|
alt={'View access key of the bucket'}
|
62
66
|
src={'https://github.com/lobehub/lobe-chat/assets/28616219/be0c95c0-6693-44ee-a490-7e8dfaa8b34d'}
|
63
|
-
|
67
|
+
/>
|
64
68
|
|
65
69
|
Click the button in the upper right corner to create an API token and enter the create API Token page.
|
66
70
|
|
67
71
|
<Image
|
68
72
|
alt={'Create corresponding API token'}
|
69
73
|
src={'https://github.com/lobehub/lobe-chat/assets/28616219/7b0ea46c-5157-40a8-888f-f47664a4884f'}
|
70
|
-
|
74
|
+
/>
|
71
75
|
|
72
76
|
Since our server-side database needs to read and write to the S3 storage service, the permission needs to be set to `Object Read and Write`, then click create.
|
73
77
|
|
74
78
|
<Image
|
75
79
|
alt={'Configure API token permissions'}
|
76
80
|
src={'https://github.com/lobehub/lobe-chat/assets/28616219/d6f5a918-7b50-4d6e-83a6-3894ab930ddf'}
|
77
|
-
|
81
|
+
/>
|
78
82
|
|
79
83
|
After creation, you can see the corresponding S3 API token.
|
80
84
|
|
81
85
|
<Image
|
82
86
|
alt={'Copy API token'}
|
83
87
|
src={'https://github.com/lobehub/lobe-chat/assets/28616219/763b18f9-2b5f-44bb-a479-9b56d46f7397'}
|
84
|
-
|
88
|
+
/>
|
85
89
|
|
86
90
|
The corresponding environment variables are:
|
87
91
|
|
@@ -99,14 +103,14 @@ In R2, you can find the CORS configuration in the settings of the storage bucket
|
|
99
103
|
<Image
|
100
104
|
alt={'Cross-Origin Settings in Cloudflare R2'}
|
101
105
|
src={'https://github.com/lobehub/lobe-chat/assets/28616219/ab008be7-26b2-4b78-8bd9-24301bf34d23'}
|
102
|
-
|
106
|
+
/>
|
103
107
|
|
104
108
|
Add a CORS rule to allow requests from your domain (in the previous section, it is `https://your-project.vercel.app`):
|
105
109
|
|
106
110
|
<Image
|
107
111
|
alt={'Configure allowed site domain'}
|
108
112
|
src={'https://github.com/lobehub/lobe-chat/assets/28616219/dfcc2cb3-2958-4498-a8a4-51bec584fe7d'}
|
109
|
-
|
113
|
+
/>
|
110
114
|
|
111
115
|
Example configuration is as follows:
|
112
116
|
|
@@ -126,7 +130,9 @@ After configuration, click save.
|
|
126
130
|
|
127
131
|
## Overview of Environment Variables
|
128
132
|
|
129
|
-
<Callout type={'warning'}>
|
133
|
+
<Callout type={'warning'}>
|
134
|
+
The `https://` in the URL is essential and must be included to maintain the integrity of the URL.
|
135
|
+
</Callout>
|
130
136
|
|
131
137
|
```shell
|
132
138
|
# S3 Keys
|
@@ -143,4 +149,3 @@ S3_PUBLIC_DOMAIN=https://s3-dev.your-domain.com
|
|
143
149
|
# Bucket Region, such as us-west-1. Generally not required, but some service providers may need it.
|
144
150
|
# S3_REGION=us-west-1
|
145
151
|
```
|
146
|
-
|
@@ -19,45 +19,58 @@ We need to configure S3 storage service for file storage in the server-side data
|
|
19
19
|
<Steps>
|
20
20
|
### Configure and Obtain S3 Bucket
|
21
21
|
|
22
|
-
|
22
|
+
Create a new bucket on [Tencent Cloud COS](https://console.cloud.tencent.com/cos/bucket):
|
23
23
|
|
24
|
-
|
24
|
+
<Image
|
25
|
+
alt={'Tencent Cloud COS Storage Interface'}
|
26
|
+
src={'https://github.com/user-attachments/assets/d3626294-74ba-4944-9a63-052e6cf719ab'}
|
27
|
+
/>
|
25
28
|
|
26
|
-
|
29
|
+
Name the bucket (e.g., 'lobe'). Choose 'Public Read, Private Write', select any region, and keep other settings default.
|
27
30
|
|
28
|
-
|
31
|
+
<Image
|
32
|
+
alt={'COS Create Bucket'}
|
33
|
+
src={'https://github.com/user-attachments/assets/7257eb0e-4e2c-4db2-981d-354598e2c60f'}
|
34
|
+
/>
|
29
35
|
|
30
|
-
|
36
|
+
### Get Bucket-related Environment Variables
|
31
37
|
|
32
|
-
|
38
|
+
View bucket information in COS bucket overview:
|
33
39
|
|
34
|
-
|
40
|
+
<Image
|
41
|
+
alt={'View Bucket Information'}
|
42
|
+
src={'https://github.com/user-attachments/assets/d7d65e32-679d-4e50-a933-28cf5dde1330'}
|
43
|
+
/>
|
35
44
|
|
36
|
-
|
45
|
+
Corresponding environment variables:
|
37
46
|
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
47
|
+
```shell
|
48
|
+
S3_BUCKET=lobe-130xxxxxx2
|
49
|
+
S3_ENDPOINT=https://cos.ap-chengdu.myqcloud.com
|
50
|
+
S3_REGION=ap-chengdu
|
51
|
+
S3_PUBLIC_DOMAIN=https://lobe-1251234567.cos.ap-chengdu.myqcloud.com
|
52
|
+
```
|
44
53
|
|
45
54
|
<Callout type={'warning'}>
|
46
55
|
Note: `S3_ENDPOINT` should be `https://cos.ap-chengdu.myqcloud.com`, not `https://lobe-130xxxxxx2.cos.ap-chengdu.myqcloud.com`
|
47
56
|
|
48
57
|
Include `https://` in the URL
|
49
|
-
|
58
|
+
|
50
59
|
</Callout>
|
51
60
|
|
52
|
-
|
61
|
+
### Configure CORS
|
62
|
+
|
63
|
+
Add the following in 'Security Management - CORS Settings':
|
53
64
|
|
54
|
-
|
65
|
+
<Image
|
66
|
+
alt={'Configure CORS'}
|
67
|
+
src={'https://github.com/user-attachments/assets/35164b25-c964-42ce-9cb0-32f6ebe1d07c'}
|
68
|
+
/>
|
55
69
|
|
56
|
-
|
70
|
+
### Get S3 Keys
|
57
71
|
|
58
|
-
|
72
|
+
Create a new SecretId and SecretKey at [Tencent Cloud API Key Management](https://console.cloud.tencent.com/cam/capi). Use as `S3_ACCESS_KEY_ID` and `S3_SECRET_ACCESS_KEY`.
|
59
73
|
|
60
|
-
Create a new SecretId and SecretKey at [Tencent Cloud API Key Management](https://console.cloud.tencent.com/cam/capi). Use as `S3_ACCESS_KEY_ID` and `S3_SECRET_ACCESS_KEY`.
|
61
74
|
</Steps>
|
62
75
|
|
63
76
|
### Additional Notes
|
@@ -8,6 +8,7 @@ tags:
|
|
8
8
|
- Cloud Storage
|
9
9
|
- Image Upload
|
10
10
|
---
|
11
|
+
|
11
12
|
# Configuring S3 Storage Service
|
12
13
|
|
13
14
|
LobeChat has supported multimodal AI conversations since [a long time ago](https://x.com/lobehub/status/1724289575672291782), which involves the function of uploading images to AI. In the client-side database solution, image files are stored as binary data directly in the browser's IndexedDB database. However, this solution is not feasible in the server-side database. Storing file-like data directly in Postgres would greatly waste database storage space and slow down computational performance.
|
@@ -15,7 +16,9 @@ LobeChat has supported multimodal AI conversations since [a long time ago](https
|
|
15
16
|
The best practice in this area is to use a file storage service (S3) to store image files. S3 is also the storage solution on which the file upload/knowledge base function depends.
|
16
17
|
|
17
18
|
<Callout type={'info'}>
|
18
|
-
In this documentation, S3 refers to a compatible S3 storage solution, which supports the Amazon S3
|
19
|
+
In this documentation, S3 refers to a compatible S3 storage solution, which supports the Amazon S3
|
20
|
+
API for object storage systems. Common examples include Cloudflare R2, Alibaba Cloud OSS, and
|
21
|
+
self-deployable Minio, all of which support the S3 compatible API.
|
19
22
|
</Callout>
|
20
23
|
|
21
24
|
## Core Environment Variables
|
@@ -23,57 +26,58 @@ In this documentation, S3 refers to a compatible S3 storage solution, which supp
|
|
23
26
|
<Steps>
|
24
27
|
### `S3_ACCESS_KEY_ID` and `S3_SECRET_ACCESS_KEY`
|
25
28
|
|
26
|
-
|
29
|
+
These are the two keys required by all S3 compatible storage services to access the S3 storage service, not detailed here.
|
27
30
|
|
28
|
-
|
31
|
+
### `S3_ENDPOINT`
|
29
32
|
|
30
|
-
|
33
|
+
The request endpoint of the storage bucket. Note that this link should not contain the name of the storage bucket.
|
31
34
|
|
32
|
-
|
35
|
+
<Callout type={'warning'}>
|
36
|
+
`S3_ENDPOINT` must remove the suffix path, otherwise the uploaded files will not be accessible
|
37
|
+
</Callout>
|
33
38
|
|
34
|
-
|
39
|
+
For example, for Cloudflare:
|
35
40
|
|
36
|
-
|
37
|
-
|
38
|
-
|
41
|
+
```shell
|
42
|
+
S3_ENDPOINT=https://0b33a03b5c993fd2f453379dc36558e5.r2.cloudflarestorage.com
|
43
|
+
```
|
39
44
|
|
40
|
-
|
45
|
+
### `S3_BUCKET` and `S3_REGION`
|
41
46
|
|
42
|
-
|
47
|
+
The name and region of the storage bucket. `S3_BUCKET` is required to specify the name of the storage bucket. `S3_REGION` is optional and is used to specify the region of the storage bucket. Generally, it does not need to be added, but some service providers may require configuration.
|
43
48
|
|
44
|
-
|
49
|
+
### `S3_SET_ACL`
|
45
50
|
|
46
|
-
|
51
|
+
Whether to set the ACL to `public-read` when uploading files. This option is enabled by default. If the service provider does not support setting individual ACLs for files (i.e., all files inherit the ACL of the storage bucket), enabling this option may cause request errors. Set `S3_SET_ACL` to `0` to disable it.
|
47
52
|
|
48
|
-
|
53
|
+
### `S3_PUBLIC_DOMAIN`
|
49
54
|
|
50
|
-
|
55
|
+
The public access domain of the storage bucket, used to access files in the storage bucket. This address needs to be **publicly readable**. The reason is that when OpenAI's gpt-4o and other vision models recognize images, OpenAI will try to download this image link on their servers. Therefore, this link must be publicly accessible. If it is a private link, OpenAI will not be able to access the image and thus will not be able to recognize the image content properly.
|
51
56
|
|
52
|
-
|
53
|
-
|
54
|
-
|
57
|
+
<Callout type={'warning'}>
|
58
|
+
Additionally, since this access domain is often a separate URL, it needs to be configured to allow
|
59
|
+
cross-origin access to the site. Otherwise, cross-origin issues will occur in the browser.
|
55
60
|
</Callout>
|
56
61
|
|
57
|
-
|
62
|
+
### `S3_ENABLE_PATH_STYLE`
|
58
63
|
|
59
|
-
|
64
|
+
Whether to enable the `path-style` access mode of S3. This option is disabled by default. If your S3 service provider uses `path-style`, set `S3_ENABLE_PATH_STYLE` to `1` to enable it.
|
60
65
|
|
61
66
|
<Callout type={'info'}>
|
62
67
|
|
63
|
-
|
68
|
+
`path-style` and `virtual-host` are different ways to access buckets and objects in S3, with different URL structures and domain name resolutions.
|
64
69
|
|
65
|
-
|
66
|
-
|
67
|
-
|
70
|
+
Assuming the domain name of the S3 service provider is s3.example.net, the bucket is mybucket, and the object is config.env, the specific differences are as follows:
|
71
|
+
|
72
|
+
- path-style: `s3.example.net/mybucket/config.env`
|
73
|
+
- virtual-host: `mybucket.s3.example.net/config.env`
|
68
74
|
|
69
|
-
|
70
75
|
</Callout>
|
71
76
|
|
72
77
|
<Callout type={'tip'}>
|
73
78
|
|
74
|
-
|
79
|
+
Common S3 cloud service providers often default to the `virtual-host` mode, while self-deployed services like Minio default to using `path-style`. Therefore, if you use Minio as the S3 service, you need to set `S3_ENABLE_PATH_STYLE=1`.
|
75
80
|
|
76
|
-
|
77
81
|
</Callout>
|
78
82
|
|
79
83
|
</Steps>
|
@@ -88,4 +92,3 @@ Currently, the S3 configuration tutorials included in the documentation are:
|
|
88
92
|
</Cards>
|
89
93
|
|
90
94
|
Click to view the tutorial for the corresponding platform. If the above tutorials do not include the S3 service provider you are using, feel free to submit a Pull Request to collectively improve the guide on S3 object storage.
|
91
|
-
|
@@ -64,6 +64,7 @@ S3_ENDPOINT=https://0b33a03b5c993fd2f453379dc36558e5.r2.cloudflarestorage.com
|
|
64
64
|
`path-style` 和 `virtual-host` 在 S3 中是访问 bucket 和 object 的不同方式,URL 的结构和域名解析不太一样
|
65
65
|
|
66
66
|
假设 S3 服务商的域名是 s3.example.net ,bucket为mybucket,object为config.env,具体区别如下:
|
67
|
+
|
67
68
|
- path-style : `s3.example.net/mybucket/config.env`
|
68
69
|
- virtual-host : `mybucket.s3.example.net/config.env`
|
69
70
|
|
@@ -75,8 +75,9 @@ LobeChat supports multimodal AI sessions, including the ability to upload unstru
|
|
75
75
|
<Callout type={'info'}>
|
76
76
|
`path-style` and `virtual-host` are different methods of accessing buckets and objects in S3, with differences in URL structure and domain name resolution.
|
77
77
|
|
78
|
-
|
78
|
+
Assuming the S3 service provider's domain is s3.example.net, the bucket is mybucket, and the object is config.env, the specific differences are:
|
79
|
+
|
80
|
+
- path-style: `s3.example.net/mybucket/config.env`
|
81
|
+
- virtual-host: `mybucket.s3.example.net/config.env`
|
79
82
|
|
80
|
-
- path-style: `s3.example.net/mybucket/config.env`
|
81
|
-
- virtual-host: `mybucket.s3.example.net/config.env`
|
82
83
|
</Callout>
|
@@ -75,6 +75,7 @@ LobeChat 支持多模态的 AI 会话,包括将图片、文件等非结构化
|
|
75
75
|
`path-style` 和 `virtual-host` 在 S3 中是访问 bucket 和 object 的不同方式,URL 的结构和域名解析不太一样
|
76
76
|
|
77
77
|
假设 S3 服务商的域名是 s3.example.net ,bucket为mybucket,object为config.env,具体区别如下:
|
78
|
+
|
78
79
|
- path-style : `s3.example.net/mybucket/config.env`
|
79
80
|
- virtual-host : `mybucket.s3.example.net/config.env`
|
80
81
|
|
@@ -24,14 +24,14 @@ LobeChat provides some additional configuration options when deployed, which can
|
|
24
24
|
|
25
25
|
## Building a Custom Image with Overridden NEXT_PUBLIC Variables
|
26
26
|
|
27
|
-
If you need to override NEXT_PUBLIC environment variables, you can build a custom Docker image using GitHub Actions
|
28
|
-
without forking the entire LobeChat repository. Here's a guide on how to do this:
|
27
|
+
If you need to override NEXT_PUBLIC environment variables, you can build a custom Docker image using GitHub Actions without forking the entire LobeChat repository. Here's a guide on how to do this:
|
29
28
|
|
30
29
|
1. Create a new GitHub repository for your custom build.
|
31
30
|
|
32
31
|
2. In your new repository, create a `.github/workflows` directory.
|
33
32
|
|
34
33
|
3. Inside the `.github/workflows` directory, create a file named `build-custom-lobe.yml`:
|
34
|
+
|
35
35
|
```yaml
|
36
36
|
name: Build Custom Image
|
37
37
|
|
@@ -82,13 +82,10 @@ jobs:
|
|
82
82
|
NEXT_PUBLIC_SERVICE_MODE=${{ secrets.NEXT_PUBLIC_SERVICE_MODE }}
|
83
83
|
```
|
84
84
|
|
85
|
-
4. In your GitHub Repository settings > Secrets and variables > Actions > Repository secrets,
|
86
|
-
add any NEXT_PUBLIC variables you want to override
|
85
|
+
4. In your GitHub Repository settings > Secrets and variables > Actions > Repository secrets, add any NEXT_PUBLIC variables you want to override
|
87
86
|
|
88
|
-
5. Set "Read and write" permissions for workflows in
|
87
|
+
5. Set "Read and write" permissions for workflows in Repository settings > Actions > General > Workflow permissions.
|
89
88
|
|
90
|
-
6. To build your custom image, go to the "Actions" tab in your GitHub repository and manually trigger the
|
91
|
-
"Build Custom LobeChat Image" workflow.
|
89
|
+
6. To build your custom image, go to the "Actions" tab in your GitHub repository and manually trigger the "Build Custom LobeChat Image" workflow.
|
92
90
|
|
93
|
-
This approach allows you to create a custom build with your desired NEXT_PUBLIC variables without maintaining
|
94
|
-
a full fork of the LobeChat repository. You can trigger a new build whenever you need to update your custom image.
|
91
|
+
This approach allows you to create a custom build with your desired NEXT_PUBLIC variables without maintaining a full fork of the LobeChat repository. You can trigger a new build whenever you need to update your custom image.
|
@@ -21,8 +21,7 @@ If you want to deploy LobeChat on Alibaba Cloud, you can follow the steps below:
|
|
21
21
|
|
22
22
|
### Prepare your API Key
|
23
23
|
|
24
|
-
Go to [OpenAI API Key](https://platform.openai.com/account/api-keys) to get your OpenAI API Key.
|
25
|
-
Or go to [Tongyi Qianwen API Key](https://bailian.console.aliyun.com/?apiKey=1#/api-key) to get your API Key.
|
24
|
+
Go to [OpenAI API Key](https://platform.openai.com/account/api-keys) to get your OpenAI API Key. Or go to [Tongyi Qianwen API Key](https://bailian.console.aliyun.com/?apiKey=1#/api-key) to get your API Key.
|
26
25
|
|
27
26
|
### One-click to deploy
|
28
27
|
|
@@ -18,8 +18,7 @@ tags:
|
|
18
18
|
|
19
19
|
### 准备好你的 API Key
|
20
20
|
|
21
|
-
前往 [OpenAI API Key](https://platform.openai.com/account/api-keys) 获取你的 OpenAI API Key
|
22
|
-
或 前往 [通义千问 API Key](https://bailian.console.aliyun.com/?apiKey=1#/api-key) 获取你的通义千问 API Key
|
21
|
+
前往 [OpenAI API Key](https://platform.openai.com/account/api-keys) 获取你的 OpenAI API Key 或 前往 [通义千问 API Key](https://bailian.console.aliyun.com/?apiKey=1#/api-key) 获取你的通义千问 API Key
|
23
22
|
|
24
23
|
### 点击下方按钮进行部署
|
25
24
|
|
@@ -17,20 +17,16 @@ To install aaPanel, go to the [aaPanel](https://www.aapanel.com/new/download.htm
|
|
17
17
|
|
18
18
|
## Deployment
|
19
19
|
|
20
|
-
1. Log in to aaPanel and click `Docker` in the menu bar
|
21
|
-

|
20
|
+
1. Log in to aaPanel and click `Docker` in the menu bar 
|
22
21
|
|
23
|
-
2. The first time you will be prompted to install the `Docker` and `Docker Compose` services, click Install Now. If it is already installed, please ignore it.
|
24
|
-

|
22
|
+
2. The first time you will be prompted to install the `Docker` and `Docker Compose` services, click Install Now. If it is already installed, please ignore it. 
|
25
23
|
|
26
24
|
3. After the installation is complete, find `LobeChat` in `One-Click Install` and click `install`
|
27
|
-

|
25
|
+

|
28
26
|
|
29
|
-
4. configure basic information such as the domain name, OpenAI API key, and port to complete the installation
|
30
|
-
Note:
|
31
|
-
The domain name is optional, if the domain name is filled, it can be managed through [Website]--> [Proxy Project], and you do not need to check [Allow external access] after filling in the domain name, otherwise you need to check it before you can access it through the port
|
32
|
-

|
27
|
+
4. configure basic information such as the domain name, OpenAI API key, and port to complete the installation Note: The domain name is optional, if the domain name is filled, it can be managed through [Website]--> [Proxy Project], and you do not need to check [Allow external access] after filling in the domain name, otherwise you need to check it before you can access it through the port 
|
33
28
|
5. After installation, enter the domain name or IP+ port set in the previous step in the browser to access.
|
29
|
+
|
34
30
|
- Name: application name, default `LobeChat-random characters`
|
35
31
|
- Version selection: default `latest`
|
36
32
|
- Domain name: If you need to access directly through the domain name, please configure the domain name here and resolve the domain name to the server
|
@@ -39,9 +35,7 @@ To install aaPanel, go to the [aaPanel](https://www.aapanel.com/new/download.htm
|
|
39
35
|
|
40
36
|
6. After submission, the panel will automatically initialize the application, which will take about `1-3` minutes. It can be accessed after the initialization is completed.
|
41
37
|
|
42
|
-
|
43
38
|
## Visit LobeChat
|
44
|
-
- If you have set a domain name, please directly enter the domain name in the browser address bar, such as `http://demo.lobechat`, to access the `LobeChat` console.
|
45
|
-
- If you choose to access through `IP+Port`, please enter the domain name in the browser address bar to access `http://<aaPanelIP>:3210` to access the `HertzBeat` console.
|
46
|
-

|
47
39
|
|
40
|
+
- If you have set a domain name, please directly enter the domain name in the browser address bar, such as `http://demo.lobechat`, to access the `LobeChat` console.
|
41
|
+
- If you choose to access through `IP+Port`, please enter the domain name in the browser address bar to access `http://<aaPanelIP>:3210` to access the `HertzBeat` console. 
|
@@ -12,23 +12,20 @@ tags:
|
|
12
12
|
# 宝塔面板部署
|
13
13
|
|
14
14
|
## 前提
|
15
|
+
|
15
16
|
- 仅适用于宝塔面板9.2.0及以上版本
|
16
17
|
- 安装宝塔面板,前往[宝塔面板](https://www.bt.cn/new/download.html)官网,选择正式版的脚本下载安装
|
17
18
|
|
18
|
-
|
19
19
|
## 部署
|
20
20
|
|
21
|
-
1. 登录宝塔面板,在左侧菜单栏中点击 `Docker`
|
22
|
-
|
21
|
+
1. 登录宝塔面板,在左侧菜单栏中点击 `Docker` 
|
22
|
+
|
23
|
+
2. 首次会提示安装`Docker`和`Docker Compose`服务,点击立即安装,若已安装请忽略。 
|
23
24
|
|
24
|
-
|
25
|
-

|
25
|
+
3. 安装完成后在`Docker-应用商店-AI/大模型`中找到 `LobeChat`,点击`安装` 
|
26
26
|
|
27
|
-
|
28
|
-

|
27
|
+
4. 设置域名等基本信息,点击`确定` 
|
29
28
|
|
30
|
-
4. 设置域名等基本信息,点击`确定`
|
31
|
-

|
32
29
|
- 名称:应用名称,默认`lobechat_随机字符`
|
33
30
|
- 版本选择:默认`latest`
|
34
31
|
- 域名:如您需要通过域名访问,请在此处填写您的域名
|
@@ -41,11 +38,9 @@ tags:
|
|
41
38
|
- CPU 核心数限制:0为不限制,根据实际需要设置
|
42
39
|
- 内存限制:0为不限制,根据实际需要设置
|
43
40
|
|
44
|
-
|
45
41
|
5. 提交后面板会自动进行应用初始化,大概需要`1-3`分钟,初始化完成后即可访问。
|
46
42
|
|
47
|
-
|
48
43
|
## 访问 LobeChat
|
44
|
+
|
49
45
|
- 如果您填写域名,请在浏览器输入您的域名访问,如`http://demo.lobechat`,即可访问 `LobeChat` 页面。
|
50
|
-
- 请在浏览器地址栏中输入域名访问 `http://<宝塔面板IP>:3210`,即可访问 `LobeChat` 页面。
|
51
|
-

|
46
|
+
- 请在浏览器地址栏中输入域名访问 `http://<宝塔面板IP>:3210`,即可访问 `LobeChat` 页面。 
|
@@ -65,7 +65,8 @@ $ docker run -d -p 3210:3210 \
|
|
65
65
|
- 使用你的 OpenAI API Key 替换上述命令中的 `sk-xxxx` ,获取 API Key 的方式详见最后一节。
|
66
66
|
|
67
67
|
<Callout type={'tip'}>
|
68
|
-
LobeChat 支持的完整环境变量列表请参考 [📘 环境变量](/zh/docs/self-hosting/environment-variables)
|
68
|
+
LobeChat 支持的完整环境变量列表请参考 [📘 环境变量](/zh/docs/self-hosting/environment-variables)
|
69
|
+
部分
|
69
70
|
</Callout>
|
70
71
|
|
71
72
|
<Callout>
|
@@ -86,7 +86,8 @@ tags:
|
|
86
86
|
| `OPENAI_PROXY_URL` | 可选 | 如果你手动配置了 OpenAI 接口代理,可以使用此配置项来覆盖默认的 OpenAI API 请求基础 URL | `https://aihubmix.com/v1` ,默认值:`https://api.openai.com/v1` |
|
87
87
|
|
88
88
|
<Callout type={'tip'}>
|
89
|
-
LobeChat 支持的完整环境变量列表请参考 [📘 环境变量](/zh/docs/self-hosting/environment-variables)
|
89
|
+
LobeChat 支持的完整环境变量列表请参考 [📘 环境变量](/zh/docs/self-hosting/environment-variables)
|
90
|
+
部分
|
90
91
|
</Callout>
|
91
92
|
|
92
93
|
添加完成后,最后点击「Deploy lobe-chat」 进入部署阶段。
|
@@ -9,6 +9,7 @@ tags:
|
|
9
9
|
- Database Deployment
|
10
10
|
- Postgres
|
11
11
|
---
|
12
|
+
|
12
13
|
# Deploying Server Database Version Using Docker
|
13
14
|
|
14
15
|
<div style={{display:"flex", gap: 4}}>
|
@@ -21,7 +22,11 @@ tags:
|
|
21
22
|
</div>
|
22
23
|
|
23
24
|
<Callout type="info">
|
24
|
-
This article assumes that you are familiar with the basic principles and processes of deploying
|
25
|
+
This article assumes that you are familiar with the basic principles and processes of deploying
|
26
|
+
the LobeChat server database version, so it only includes content related to core environment
|
27
|
+
variable configuration. If you are not familiar with the deployment principles of the LobeChat
|
28
|
+
server database version, please refer to [Deploying Server
|
29
|
+
Database](/docs/self-hosting/server-database) first.
|
25
30
|
</Callout>
|
26
31
|
|
27
32
|
<Callout type="warning">
|
@@ -50,11 +55,14 @@ docker run --name my-postgres --network pg -e POSTGRES_PASSWORD=mysecretpassword
|
|
50
55
|
The above command will create a PG instance named `my-postgres` on the network `pg`, where `pgvector/pgvector:pg16` is a Postgres 16 image with the pgvector plugin installed by default.
|
51
56
|
|
52
57
|
<Callout type="info">
|
53
|
-
The pgvector plugin provides vector search capabilities for Postgres, which is an important
|
58
|
+
The pgvector plugin provides vector search capabilities for Postgres, which is an important
|
59
|
+
component for LobeChat to implement RAG.
|
54
60
|
</Callout>
|
55
61
|
|
56
62
|
<Callout type="warning">
|
57
|
-
The above command does not specify a persistent storage location for the pg instance, so it is
|
63
|
+
The above command does not specify a persistent storage location for the pg instance, so it is
|
64
|
+
only for testing/demonstration purposes. Please configure persistent storage for production
|
65
|
+
environments.
|
58
66
|
</Callout>
|
59
67
|
|
60
68
|
### Create a file named `lobe-chat.env` to store environment variables:
|
@@ -119,7 +127,10 @@ If you see the following logs in the container, it means it has started successf
|
|
119
127
|
</Steps>
|
120
128
|
|
121
129
|
<Callout type="tip">
|
122
|
-
In our official Docker image, the database schema migration is automatically executed before
|
130
|
+
In our official Docker image, the database schema migration is automatically executed before
|
131
|
+
starting the image. We ensure stability from an empty database to all tables being formally
|
132
|
+
available. Therefore, we recommend using an empty table instance for your database to avoid the
|
133
|
+
cost of manually maintaining table structure migration.
|
123
134
|
</Callout>
|
124
135
|
|
125
136
|
## Using Locally (Mac / Windows)
|
@@ -150,7 +161,9 @@ $ docker run -it -d --name lobe-chat-database -p 3210:3210 \
|
|
150
161
|
```
|
151
162
|
|
152
163
|
<Callout type="tip">
|
153
|
-
`Docker` uses a virtual machine solution on `Windows` and `macOS`. If you use `localhost` /
|
164
|
+
`Docker` uses a virtual machine solution on `Windows` and `macOS`. If you use `localhost` /
|
165
|
+
`127.0.0.1`, it will refer to the container's `localhost`. In this case, try using
|
166
|
+
`host.docker.internal` instead of `localhost`.
|
154
167
|
</Callout>
|
155
168
|
|
156
169
|
[docker-pulls-link]: https://hub.docker.com/r/lobehub/lobe-chat-database
|