@lobehub/chat 0.147.0 → 0.147.2
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/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/app/settings/llm/Azure/index.tsx +1 -1
- package/src/app/settings/llm/components/ProviderConfig/index.tsx +1 -1
- package/src/app/settings/llm/components/ProviderModelList/CustomModelOption.tsx +1 -1
- package/src/app/settings/llm/components/ProviderModelList/ModelConfigModal.tsx +1 -1
- package/src/app/settings/llm/components/ProviderModelList/ModelFetcher.tsx +3 -3
- package/src/app/settings/llm/components/ProviderModelList/index.tsx +2 -2
- package/src/features/AgentSetting/AgentConfig/ModelSelect.tsx +1 -1
- package/src/features/Conversation/Error/APIKeyForm/ProviderApiKeyForm.tsx +2 -2
- package/src/features/ModelSwitchPanel/index.tsx +1 -1
- package/src/locales/resources.test.ts +49 -0
- package/src/locales/resources.ts +7 -20
- package/src/services/_auth.ts +5 -3
- package/src/services/_header.ts +3 -4
- package/src/services/chat.ts +1 -1
- package/src/services/ollama.ts +3 -2
- package/src/store/global/slices/settings/actions/llm.test.ts +1 -1
- package/src/store/global/slices/settings/actions/llm.ts +2 -2
- package/src/store/global/slices/settings/selectors/modelConfig.test.ts +35 -14
- package/src/store/global/slices/settings/selectors/modelConfig.ts +55 -118
|
@@ -11,63 +11,92 @@ tags:
|
|
|
11
11
|
- Environment Variables
|
|
12
12
|
- ZITADEL Applications
|
|
13
13
|
---
|
|
14
|
+
|
|
14
15
|
# Configure ZITADEL Authentication Service
|
|
15
16
|
|
|
16
17
|
<Steps>
|
|
17
18
|
### Create ZITADEL Application
|
|
18
19
|
|
|
19
|
-
|
|
20
|
+
Log in to the console of your ZITADEL instance using an account with at least a [`Project Owner` role](https://zitadel.com/docs/guides/manage/console/managers#roles), navigate to (or [create](https://zitadel.com/docs/guides/manage/console/projects#create-a-project)) the project you'd like to host your application in, and click the **New** button to create an application.
|
|
20
21
|
|
|
21
|
-
|
|
22
|
+
<Image
|
|
23
|
+
alt="Create ZITADEL Application S1"
|
|
24
|
+
inStep
|
|
25
|
+
src="https://github.com/lobehub/lobe-chat/assets/8692892/b05473ad-04a6-4ebc-9810-116c778d4448"
|
|
26
|
+
/>
|
|
22
27
|
|
|
23
|
-
|
|
28
|
+
Fill in the name, choose **Web** as the application type, and click **Continue**.
|
|
24
29
|
|
|
25
|
-
|
|
30
|
+
<Image
|
|
31
|
+
alt="Create ZITADEL Application S2"
|
|
32
|
+
inStep
|
|
33
|
+
src="https://github.com/lobehub/lobe-chat/assets/8692892/5a0e6c58-9e6f-4ffb-8af2-32e48cfb45b0"
|
|
34
|
+
/>
|
|
26
35
|
|
|
27
|
-
|
|
36
|
+
Choose **Code** as the authentication method.
|
|
28
37
|
|
|
29
|
-
|
|
38
|
+
<Image
|
|
39
|
+
alt="Create ZITADEL Application S3"
|
|
40
|
+
inStep
|
|
41
|
+
src="https://github.com/lobehub/lobe-chat/assets/8692892/14ecaa12-74a1-4e2f-b171-9d9ac09d3d63"
|
|
42
|
+
/>
|
|
30
43
|
|
|
31
|
-
|
|
44
|
+
In the **Redirect URIs** field, fill in:
|
|
32
45
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
46
|
+
```
|
|
47
|
+
http(s)://your-domain/api/auth/callback/zitadel
|
|
48
|
+
```
|
|
36
49
|
|
|
37
|
-
|
|
50
|
+
<Image
|
|
51
|
+
alt="Create ZITADEL Application S4"
|
|
52
|
+
inStep
|
|
53
|
+
src="https://github.com/lobehub/lobe-chat/assets/8692892/4ff3c3a0-9ca0-45ff-8f3a-219f4445098b"
|
|
54
|
+
/>
|
|
38
55
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
56
|
+
<Callout type={'important'}>
|
|
57
|
+
- You can fill in or modify redirect URIs after creating the application, but make sure the filled
|
|
58
|
+
URL is consistent with the deployed URL. - Replace `http(s)://your-domain` with the actual URL
|
|
59
|
+
that LobeChat is deployed to.
|
|
43
60
|
</Callout>
|
|
44
61
|
|
|
45
|
-
|
|
62
|
+
Confirm the configuration and click **Create**.
|
|
46
63
|
|
|
47
|
-
|
|
64
|
+
<Image
|
|
65
|
+
alt="Create ZITADEL Application S5"
|
|
66
|
+
inStep
|
|
67
|
+
src="https://github.com/lobehub/lobe-chat/assets/8692892/bee24764-aa42-47d9-ad43-bcb8e7b35bc3"
|
|
68
|
+
/>
|
|
48
69
|
|
|
49
|
-
|
|
70
|
+
Save the **ClientId** and **ClientSecret** for later use.
|
|
50
71
|
|
|
51
|
-
|
|
72
|
+
<Image
|
|
73
|
+
alt="Create ZITADEL Application S6"
|
|
74
|
+
inStep
|
|
75
|
+
src="https://github.com/lobehub/lobe-chat/assets/8692892/407b4eed-7f21-4aa6-b68f-9bae2faf09d0"
|
|
76
|
+
/>
|
|
52
77
|
|
|
53
|
-
|
|
78
|
+
In the application settings page, navigate to the **URLs** tab, and save the **issuer** URL.
|
|
54
79
|
|
|
55
|
-
|
|
80
|
+
<Image
|
|
81
|
+
alt="Create ZITADEL Application S7"
|
|
82
|
+
inStep
|
|
83
|
+
src="https://github.com/lobehub/lobe-chat/assets/8692892/d12a2661-7b98-484f-8f3d-07e84d42ae08"
|
|
84
|
+
/>
|
|
56
85
|
|
|
57
|
-
|
|
86
|
+
### Configure Environment Variables
|
|
58
87
|
|
|
59
|
-
|
|
88
|
+
When deploying LobeChat, you need to configure the following environment variables:
|
|
60
89
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
90
|
+
| Environment Variable | Type | Description |
|
|
91
|
+
| --- | --- | --- |
|
|
92
|
+
| `ENABLE_OAUTH_SSO` | Required | Enable single sign-on (SSO) for LobeChat. Set to `1` to enable single sign-on. |
|
|
93
|
+
| `NEXTAUTH_SECRET` | Required | Key used to encrypt Auth.js session tokens. You can generate a key using the following command: `openssl rand -base64 32` |
|
|
94
|
+
| `SSO_PROVIDERS` | Optional | Select the single sign-on provider for LoboChat. Use `zitadel` for ZITADEL. |
|
|
95
|
+
| `ZITADEL_CLIENT_ID` | Required | Client ID (`ClientId` as shown in ZITADEL) of the ZITADEL application |
|
|
96
|
+
| `ZITADEL_CLIENT_SECRET` | Required | Client Secret (`ClientSecret` as shown in ZITADEL) of the ZITADEL application |
|
|
97
|
+
| `ZITADEL_ISSUER` | Required | Issuer URL of the ZITADEL application |
|
|
98
|
+
| `ACCESS_CODE` | Required | Add a password to access this service. You can set a sufficiently long random password to "disable" access code authorization. |
|
|
99
|
+
| `NEXTAUTH_URL` | Optional | The URL is used to specify the callback address for the execution of OAuth authentication in Auth.js. It needs to be set only when the default address is incorrect. `https://example.com/api/auth` |
|
|
71
100
|
|
|
72
101
|
<Callout type={'tip'}>
|
|
73
102
|
You can refer to the related variable details at [📘Environment Variables](/en/self-hosting/environment-variables/auth#zitadel).
|
|
@@ -76,5 +105,6 @@ tags:
|
|
|
76
105
|
</Steps>
|
|
77
106
|
|
|
78
107
|
<Callout>
|
|
79
|
-
After successful deployment, users will be able to authenticate and use LobeChat using existing
|
|
108
|
+
After successful deployment, users will be able to authenticate and use LobeChat using existing
|
|
109
|
+
users configured in ZITADEL.
|
|
80
110
|
</Callout>
|
|
@@ -8,63 +8,91 @@ tags:
|
|
|
8
8
|
- 单点登录
|
|
9
9
|
- LobeChat
|
|
10
10
|
---
|
|
11
|
+
|
|
11
12
|
# 配置 ZITADEL 身份验证服务
|
|
12
13
|
|
|
13
14
|
<Steps>
|
|
14
15
|
### 创建 ZITADEL 应用
|
|
15
16
|
|
|
16
|
-
|
|
17
|
+
使用具有 [`Project Owner` 角色](https://zitadel.com/docs/guides/manage/console/managers#roles)的账户登录到 ZITADEL 实例控制台,进入(或[创建](https://zitadel.com/docs/guides/manage/console/projects#create-a-project))该应用所属的项目,点击「创建」按钮创建应用。
|
|
17
18
|
|
|
18
|
-
|
|
19
|
+
<Image
|
|
20
|
+
alt="创建 ZITADEL 应用 1"
|
|
21
|
+
inStep
|
|
22
|
+
src="https://github.com/lobehub/lobe-chat/assets/8692892/3564110d-bef9-47f3-b775-e5f28b4275b2"
|
|
23
|
+
/>
|
|
19
24
|
|
|
20
|
-
|
|
25
|
+
填写应用名称,应用类型选择「Web」,点击「继续」。
|
|
21
26
|
|
|
22
|
-
|
|
27
|
+
<Image
|
|
28
|
+
alt="创建 ZITADEL 应用 2"
|
|
29
|
+
inStep
|
|
30
|
+
src="https://github.com/lobehub/lobe-chat/assets/8692892/12451b47-8dcd-40a9-b18d-2806b07efecc"
|
|
31
|
+
/>
|
|
23
32
|
|
|
24
|
-
|
|
33
|
+
选择「Code」作为身份验证方式。
|
|
25
34
|
|
|
26
|
-
|
|
35
|
+
<Image
|
|
36
|
+
alt="创建 ZITADEL 应用 3"
|
|
37
|
+
inStep
|
|
38
|
+
src="https://github.com/lobehub/lobe-chat/assets/8692892/9d5cb651-ad10-47c7-8c8b-2256163c5521"
|
|
39
|
+
/>
|
|
27
40
|
|
|
28
|
-
|
|
41
|
+
在「重定向 URLs」字段中填写:
|
|
29
42
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
43
|
+
```
|
|
44
|
+
http(s)://your-domain/api/auth/callback/zitadel
|
|
45
|
+
```
|
|
33
46
|
|
|
34
|
-
|
|
47
|
+
<Image
|
|
48
|
+
alt="创建 ZITADEL 应用 4"
|
|
49
|
+
inStep
|
|
50
|
+
src="https://github.com/lobehub/lobe-chat/assets/8692892/1699bf46-0c8d-4238-9eb5-34282bfe529a"
|
|
51
|
+
/>
|
|
35
52
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
53
|
+
<Callout type={'important'}>
|
|
54
|
+
- 可以创建应用后再填写或修改重定向 URL,但请确保填写的 URL 与部署的 URL 一致。 - 请将
|
|
55
|
+
`http(s)://your-domain` 替换为 LobeChat 部署的实际 URL。
|
|
40
56
|
</Callout>
|
|
41
57
|
|
|
42
|
-
|
|
58
|
+
确认配置并点击「创建」。
|
|
43
59
|
|
|
44
|
-
|
|
60
|
+
<Image
|
|
61
|
+
alt="创建 ZITADEL 应用 5"
|
|
62
|
+
inStep
|
|
63
|
+
src="https://github.com/lobehub/lobe-chat/assets/8692892/375b3d73-6796-465c-9063-f2762093f763"
|
|
64
|
+
/>
|
|
45
65
|
|
|
46
|
-
|
|
66
|
+
记录下「ClientId」和「ClientSecret」备用。
|
|
47
67
|
|
|
48
|
-
|
|
68
|
+
<Image
|
|
69
|
+
alt="创建 ZITADEL 应用 6"
|
|
70
|
+
inStep
|
|
71
|
+
src="https://github.com/lobehub/lobe-chat/assets/8692892/40bb6b4c-18e0-4ae5-abae-ae0cf202cf08"
|
|
72
|
+
/>
|
|
49
73
|
|
|
50
|
-
|
|
74
|
+
在应用设置页面中,切换到「URLs」选项卡,记录下「issuer」URL。
|
|
51
75
|
|
|
52
|
-
|
|
76
|
+
<Image
|
|
77
|
+
alt="创建 ZITADEL 应用 7"
|
|
78
|
+
inStep
|
|
79
|
+
src="https://github.com/lobehub/lobe-chat/assets/8692892/79c55d44-8dcb-429c-a072-d3eb014bbceb"
|
|
80
|
+
/>
|
|
53
81
|
|
|
54
|
-
|
|
82
|
+
### 配置环境变量
|
|
55
83
|
|
|
56
|
-
|
|
84
|
+
部署 LobeChat 时,您需要配置以下环境变量:
|
|
57
85
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
86
|
+
| 环境变量 | 类型 | 描述 |
|
|
87
|
+
| --- | --- | --- |
|
|
88
|
+
| `ENABLE_OAUTH_SSO` | 必选 | 为 LobeChat 启用单点登录(SSO)。设置为 `1` 以启用单点登录。 |
|
|
89
|
+
| `NEXTAUTH_SECRET` | 必选 | 用于加密 Auth.js 会话令牌的密钥。您可以使用以下命令生成密钥:`openssl rand -base64 32` |
|
|
90
|
+
| `SSO_PROVIDERS` | 可选 | 为 LobeChat 选择单点登录提供程序。对于 ZITADEL,请填写 `zitadel`。 |
|
|
91
|
+
| `ZITADEL_CLIENT_ID` | 必选 | ZITADEL 应用的 Client ID(`ClientId`)。 |
|
|
92
|
+
| `ZITADEL_CLIENT_SECRET` | 必选 | ZITADEL 应用的 Client Secret(`ClientSecret`)。 |
|
|
93
|
+
| `ZITADEL_ISSUER` | 必选 | ZITADEL 应用的 OpenID Connect 颁发者(issuer)URL。 |
|
|
94
|
+
| `ACCESS_CODE` | 必选 | 添加访问此服务的代码。您可以设置一个足够长的随机密码以「禁用」访问码授权。 |
|
|
95
|
+
| `NEXTAUTH_URL` | 可选 | 该 URL 用于指定 Auth.js 中执行 OAuth 认证的回调地址。仅当默认地址不正确时才需要设置。`https://example.com/api/auth` |
|
|
68
96
|
|
|
69
97
|
<Callout type={'tip'}>
|
|
70
98
|
您可以在 [📘 环境变量](/zh/self-hosting/environment-variables/auth#zitadel) 中查看相关变量的详细信息。
|
|
@@ -72,6 +100,4 @@ tags:
|
|
|
72
100
|
</Callout>
|
|
73
101
|
</Steps>
|
|
74
102
|
|
|
75
|
-
<Callout>
|
|
76
|
-
部署成功后,用户将能够通过 ZITADEL 中配置的用户进行身份验证并使用 LobeChat。
|
|
77
|
-
</Callout>
|
|
103
|
+
<Callout>部署成功后,用户将能够通过 ZITADEL 中配置的用户进行身份验证并使用 LobeChat。</Callout>
|
|
@@ -11,6 +11,7 @@ tags:
|
|
|
11
11
|
- Automatic Updates
|
|
12
12
|
- Redeploy Docker Container
|
|
13
13
|
---
|
|
14
|
+
|
|
14
15
|
# Upstream Sync
|
|
15
16
|
|
|
16
17
|
## `A` Vercel / Zeabur Deployment
|
|
@@ -29,9 +30,15 @@ If you deployed your project according to the one-click deployment steps in the
|
|
|
29
30
|
|
|
30
31
|
After forking the project, due to Github's limitations, you need to manually enable Workflows on the Actions page of your forked project and start the Upstream Sync Action. Once enabled, you can set up automatic updates to occur every hour.
|
|
31
32
|
|
|
32
|
-
<Image
|
|
33
|
+
<Image
|
|
34
|
+
alt="Enable Automatic Updates S1"
|
|
35
|
+
src="https://github-production-user-asset-6210df.s3.amazonaws.com/17870709/266985117-4d48fe7b-0412-4667-8129-b25ebcf2c9de.png"
|
|
36
|
+
/>
|
|
33
37
|
|
|
34
|
-
<Image
|
|
38
|
+
<Image
|
|
39
|
+
alt="Enable Automatic Updates S2"
|
|
40
|
+
src="https://github-production-user-asset-6210df.s3.amazonaws.com/17870709/266985177-7677b4ce-c348-4145-9f60-829d448d5be6.png"
|
|
41
|
+
/>
|
|
35
42
|
|
|
36
43
|
## `B` Docker Deployment
|
|
37
44
|
|
|
@@ -40,33 +47,34 @@ Upgrading the Docker deployment version is very simple, you just need to redeplo
|
|
|
40
47
|
<Steps>
|
|
41
48
|
### Stop and Remove the Current Running LobeChat Container
|
|
42
49
|
|
|
43
|
-
|
|
50
|
+
Assuming the LobeChat container is named `lobe-chat`, use the following commands to stop and remove the currently running LobeChat container:
|
|
51
|
+
|
|
52
|
+
```fish
|
|
53
|
+
docker stop lobe-chat
|
|
54
|
+
docker rm lobe-chat
|
|
55
|
+
```
|
|
44
56
|
|
|
45
|
-
|
|
46
|
-
docker stop lobe-chat
|
|
47
|
-
docker rm lobe-chat
|
|
48
|
-
```
|
|
57
|
+
### Pull the Latest LobeChat Image
|
|
49
58
|
|
|
50
|
-
|
|
59
|
+
Use the following command to pull the latest Docker image for LobeChat:
|
|
51
60
|
|
|
52
|
-
|
|
61
|
+
```fish
|
|
62
|
+
docker pull lobehub/lobe-chat
|
|
63
|
+
```
|
|
53
64
|
|
|
54
|
-
|
|
55
|
-
docker pull lobehub/lobe-chat
|
|
56
|
-
```
|
|
65
|
+
### Restart the Docker Container
|
|
57
66
|
|
|
58
|
-
|
|
67
|
+
Redeploy the LobeChat container using the newly pulled image:
|
|
59
68
|
|
|
60
|
-
|
|
69
|
+
```fish
|
|
70
|
+
docker run -d -p 3210:3210 \
|
|
71
|
+
-e OPENAI_API_KEY=sk-xxxx \
|
|
72
|
+
-e OPENAI_PROXY_URL=https://api-proxy.com/v1 \
|
|
73
|
+
-e ACCESS_CODE=lobe66 \
|
|
74
|
+
--name lobe-chat \
|
|
75
|
+
lobehub/lobe-chat
|
|
76
|
+
```
|
|
61
77
|
|
|
62
|
-
```fish
|
|
63
|
-
docker run -d -p 3210:3210 \
|
|
64
|
-
-e OPENAI_API_KEY=sk-xxxx \
|
|
65
|
-
-e OPENAI_PROXY_URL=https://api-proxy.com/v1 \
|
|
66
|
-
-e ACCESS_CODE=lobe66 \
|
|
67
|
-
--name lobe-chat \
|
|
68
|
-
lobehub/lobe-chat
|
|
69
|
-
```
|
|
70
78
|
</Steps>
|
|
71
79
|
|
|
72
80
|
Ensure that you have sufficient permissions to stop and remove the container before executing these commands, and that Docker has sufficient permissions to pull the new image.
|
|
@@ -74,5 +82,6 @@ Ensure that you have sufficient permissions to stop and remove the container bef
|
|
|
74
82
|
<Callout type={'tip'}>
|
|
75
83
|
**If I redeploy, will I lose my local chat records?**
|
|
76
84
|
|
|
77
|
-
|
|
85
|
+
No need to worry, you won't. All of LobeChat's chat records are stored in your local browser. Therefore, when redeploying LobeChat using Docker, your chat records will not be lost.
|
|
86
|
+
|
|
78
87
|
</Callout>
|
|
@@ -8,6 +8,7 @@ tags:
|
|
|
8
8
|
- Docker部署
|
|
9
9
|
- Github Actions
|
|
10
10
|
---
|
|
11
|
+
|
|
11
12
|
# 启动自动更新
|
|
12
13
|
|
|
13
14
|
## `A` Vercel / Zeabur 部署
|
|
@@ -24,9 +25,15 @@ tags:
|
|
|
24
25
|
|
|
25
26
|
当你 Fork 了项目后,由于 Github 的限制,你需要手动在你 Fork 的项目的 Actions 页面启用 Workflows,并启动 Upstream Sync Action。启用后,你可以设置每小时进行一次自动更新。
|
|
26
27
|
|
|
27
|
-
<Image
|
|
28
|
+
<Image
|
|
29
|
+
alt="启动自动更新 S1"
|
|
30
|
+
src="https://github-production-user-asset-6210df.s3.amazonaws.com/17870709/266985117-4d48fe7b-0412-4667-8129-b25ebcf2c9de.png"
|
|
31
|
+
/>
|
|
28
32
|
|
|
29
|
-
<Image
|
|
33
|
+
<Image
|
|
34
|
+
alt="启动自动更新 S2"
|
|
35
|
+
src="https://github-production-user-asset-6210df.s3.amazonaws.com/17870709/266985177-7677b4ce-c348-4145-9f60-829d448d5be6.png"
|
|
36
|
+
/>
|
|
30
37
|
|
|
31
38
|
## `B` Docker 部署
|
|
32
39
|
|
|
@@ -35,33 +42,34 @@ Docker 部署版本的升级非常简单,只需要重新部署 LobeChat 的最
|
|
|
35
42
|
<Steps>
|
|
36
43
|
### 停止并删除当前运行的 LobeChat 容器
|
|
37
44
|
|
|
38
|
-
|
|
45
|
+
假设 LobeChat 容器的名称是 `lobe-chat`,使用以下指令停止并删除当前运行的 LobeChat 容器:
|
|
46
|
+
|
|
47
|
+
```fish
|
|
48
|
+
docker stop lobe-chat
|
|
49
|
+
docker rm lobe-chat
|
|
50
|
+
```
|
|
39
51
|
|
|
40
|
-
|
|
41
|
-
docker stop lobe-chat
|
|
42
|
-
docker rm lobe-chat
|
|
43
|
-
```
|
|
52
|
+
### 拉取最新的 LobeChat 镜像
|
|
44
53
|
|
|
45
|
-
|
|
54
|
+
使用以下命令拉取 LobeChat 的最新 Docker 镜像:
|
|
46
55
|
|
|
47
|
-
|
|
56
|
+
```fish
|
|
57
|
+
docker pull lobehub/lobe-chat
|
|
58
|
+
```
|
|
48
59
|
|
|
49
|
-
|
|
50
|
-
docker pull lobehub/lobe-chat
|
|
51
|
-
```
|
|
60
|
+
### 重新启动 Docker 容器
|
|
52
61
|
|
|
53
|
-
|
|
62
|
+
使用新拉取的镜像重新部署 LobeChat 容器:
|
|
54
63
|
|
|
55
|
-
|
|
64
|
+
```fish
|
|
65
|
+
docker run -d -p 3210:3210 \
|
|
66
|
+
-e OPENAI_API_KEY=sk-xxxx \
|
|
67
|
+
-e OPENAI_PROXY_URL=https://api-proxy.com/v1 \
|
|
68
|
+
-e ACCESS_CODE=lobe66 \
|
|
69
|
+
--name lobe-chat \
|
|
70
|
+
lobehub/lobe-chat
|
|
71
|
+
```
|
|
56
72
|
|
|
57
|
-
```fish
|
|
58
|
-
docker run -d -p 3210:3210 \
|
|
59
|
-
-e OPENAI_API_KEY=sk-xxxx \
|
|
60
|
-
-e OPENAI_PROXY_URL=https://api-proxy.com/v1 \
|
|
61
|
-
-e ACCESS_CODE=lobe66 \
|
|
62
|
-
--name lobe-chat \
|
|
63
|
-
lobehub/lobe-chat
|
|
64
|
-
```
|
|
65
73
|
</Steps>
|
|
66
74
|
|
|
67
75
|
确保在执行这些命令之前,您有足够的权限来停止和删除容器,并且 Docker 有足够的权限来拉取新的镜像。
|
|
@@ -69,5 +77,6 @@ Docker 部署版本的升级非常简单,只需要重新部署 LobeChat 的最
|
|
|
69
77
|
<Callout type={'tip'}>
|
|
70
78
|
**重新部署的话,我本地的聊天记录会丢失吗?**
|
|
71
79
|
|
|
72
|
-
|
|
80
|
+
放心,不会的。LobeChat 的聊天记录全部都存储在你的本地浏览器中。因此使用 Docker 重新部署 LobeChat 时,你的聊天记录并不会丢失。
|
|
81
|
+
|
|
73
82
|
</Callout>
|
|
@@ -12,6 +12,7 @@ tags:
|
|
|
12
12
|
- NextAuth
|
|
13
13
|
- Provider Details
|
|
14
14
|
---
|
|
15
|
+
|
|
15
16
|
## Authentication Service
|
|
16
17
|
|
|
17
18
|
LobeChat provides a complete authentication service capability when deployed. The following are the relevant environment variables. You can use these environment variables to easily define the identity verification services that need to be enabled in LobeChat.
|
|
@@ -24,6 +24,7 @@ tags:
|
|
|
24
24
|
- 01.AI
|
|
25
25
|
- TogetherAI
|
|
26
26
|
---
|
|
27
|
+
|
|
27
28
|
# Model Service Providers
|
|
28
29
|
|
|
29
30
|
When deploying LobeChat, a rich set of environment variables related to model service providers is provided, allowing you to easily define the model service providers to be enabled in LobeChat.
|
|
@@ -10,6 +10,7 @@ tags:
|
|
|
10
10
|
- Azure API
|
|
11
11
|
- Model Service Provider
|
|
12
12
|
---
|
|
13
|
+
|
|
13
14
|
# Integrating with Azure OpenAI
|
|
14
15
|
|
|
15
16
|
LobeChat supports using [Azure OpenAI][azure-openai-url] as the model service provider for OpenAI. This article will explain how to configure Azure OpenAI.
|
|
@@ -26,7 +27,10 @@ Due to development costs ([#178][rfc]), the current version of LobeChat does not
|
|
|
26
27
|
|
|
27
28
|
Click in the bottom left corner "Actions" - "Settings", then switch to the "Language Model" tab and enable the "Azure OpenAI" switch to start using Azure OpenAI.
|
|
28
29
|
|
|
29
|
-
<Image
|
|
30
|
+
<Image
|
|
31
|
+
alt="Configuring in the Interface"
|
|
32
|
+
src="https://github-production-user-asset-6210df.s3.amazonaws.com/28616219/267083420-422a3714-627e-4bef-9fbc-141a2a8ca916.png"
|
|
33
|
+
/>
|
|
30
34
|
|
|
31
35
|
You can fill in the corresponding configuration items as needed:
|
|
32
36
|
|
|
@@ -40,13 +44,13 @@ After completing the configuration of the above fields, click "Check". If it pro
|
|
|
40
44
|
|
|
41
45
|
If you want the deployed version to be pre-configured with Azure OpenAI for end users to use directly, you need to configure the following environment variables during deployment:
|
|
42
46
|
|
|
43
|
-
| Environment Variable | Type
|
|
44
|
-
|
|
|
45
|
-
| `USE_AZURE_OPENAI`
|
|
46
|
-
| `AZURE_API_KEY`
|
|
47
|
-
| `OPENAI_PROXY_URL`
|
|
48
|
-
| `AZURE_API_VERSION`
|
|
49
|
-
| `ACCESS_CODE`
|
|
47
|
+
| Environment Variable | Type | Description | Default Value | Example |
|
|
48
|
+
| --- | --- | --- | --- | --- |
|
|
49
|
+
| `USE_AZURE_OPENAI` | Required | Set this value to `1` to enable Azure OpenAI configuration | - | `1` |
|
|
50
|
+
| `AZURE_API_KEY` | Required | This is the API key you obtained from the Azure OpenAI account page | - | `c55168be3874490ef0565d9779ecd5a6` |
|
|
51
|
+
| `OPENAI_PROXY_URL` | Required | Azure API address, can be found in the "Keys and Endpoints" section when checking resources in the Azure portal | - | `https://docs-test-001.openai.azure.com` |
|
|
52
|
+
| `AZURE_API_VERSION` | Optional | Azure API version, following the format YYYY-MM-DD | 2023-08-01-preview | `2023-05-15`, see [latest version][azure-api-verion-url] |
|
|
53
|
+
| `ACCESS_CODE` | Optional | 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` |
|
|
50
54
|
|
|
51
55
|
<Callout>
|
|
52
56
|
When you enable `USE_AZURE_OPENAI` on the server, users will be unable to modify and use the
|
|
@@ -10,6 +10,7 @@ tags:
|
|
|
10
10
|
- API密钥
|
|
11
11
|
- 环境变量
|
|
12
12
|
---
|
|
13
|
+
|
|
13
14
|
# 与 Azure OpenAI 集成使用
|
|
14
15
|
|
|
15
16
|
LobeChat 支持使用 [Azure OpenAI][azure-openai-url] 作为 OpenAI 的模型服务商,本文将介绍如何配置 Azure OpenAI。
|
|
@@ -26,7 +27,10 @@ LobeChat 支持使用 [Azure OpenAI][azure-openai-url] 作为 OpenAI 的模型
|
|
|
26
27
|
|
|
27
28
|
点击左下角「操作」 -「设置」,切到 「语言模型」 Tab 后通过开启「Azure OpenAI」开关,即可开启使用 Azure OpenAI。
|
|
28
29
|
|
|
29
|
-
<Image
|
|
30
|
+
<Image
|
|
31
|
+
alt="在界面中配置"
|
|
32
|
+
src="https://github-production-user-asset-6210df.s3.amazonaws.com/28616219/267083420-422a3714-627e-4bef-9fbc-141a2a8ca916.png"
|
|
33
|
+
/>
|
|
30
34
|
|
|
31
35
|
你按需填写相应的配置项:
|
|
32
36
|
|
|
@@ -42,13 +46,13 @@ LobeChat 支持使用 [Azure OpenAI][azure-openai-url] 作为 OpenAI 的模型
|
|
|
42
46
|
|
|
43
47
|
如果你希望部署的版本直接配置好 Azure OpenAI,让终端用户直接使用,那么你需要在部署时配置以下环境变量:
|
|
44
48
|
|
|
45
|
-
| 环境变量
|
|
46
|
-
|
|
|
47
|
-
| `USE_AZURE_OPENAI`
|
|
48
|
-
| `AZURE_API_KEY`
|
|
49
|
-
| `OPENAI_PROXY_URL`
|
|
50
|
-
| `AZURE_API_VERSION` | 可选 | Azure 的 API 版本,遵循 YYYY-MM-DD 格式
|
|
51
|
-
| `ACCESS_CODE`
|
|
49
|
+
| 环境变量 | 类型 | 描述 | 默认值 | 示例 |
|
|
50
|
+
| --- | --- | --- | --- | --- |
|
|
51
|
+
| `USE_AZURE_OPENAI` | 必选 | 设置改值为 `1` 开启 Azure OpenAI 配置 | - | `1` |
|
|
52
|
+
| `AZURE_API_KEY` | 必选 | 这是你在 Azure OpenAI 账户页面申请的 API 密钥 | - | `c55168be3874490ef0565d9779ecd5a6` |
|
|
53
|
+
| `OPENAI_PROXY_URL` | 必选 | Azure API 地址,从 Azure 门户检查资源时,可在 “密钥和终结点” 部分中找到此值 | - | `https://docs-test-001.openai.azure.com` |
|
|
54
|
+
| `AZURE_API_VERSION` | 可选 | Azure 的 API 版本,遵循 YYYY-MM-DD 格式 | 2023-08-01-preview | `2023-05-15`,查阅[最新版本][azure-api-verion-url] |
|
|
55
|
+
| `ACCESS_CODE` | 可选 | 添加访问此服务的密码,你可以设置一个长密码以防被爆破,该值用逗号分隔时为密码数组 | - | `awCT74` 或 `e3@09!` or `code1,code2,code3` |
|
|
52
56
|
|
|
53
57
|
<Callout>
|
|
54
58
|
当你在服务端开启 `USE_AZURE_OPENAI` 后,用户将无法在前端配置中修改并使用 OpenAI API key。
|
|
@@ -11,6 +11,7 @@ tags:
|
|
|
11
11
|
- Language models
|
|
12
12
|
- Ollama usage
|
|
13
13
|
---
|
|
14
|
+
|
|
14
15
|
# Integrating with Ollama
|
|
15
16
|
|
|
16
17
|
Ollama is a powerful framework for running large language models (LLMs) locally, supporting various language models including Llama 2, Mistral, and more. Now, LobeChat supports integration with Ollama, meaning you can easily use the language models provided by Ollama to enhance your application within LobeChat.
|