@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
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,56 @@
|
|
|
2
2
|
|
|
3
3
|
# Changelog
|
|
4
4
|
|
|
5
|
+
### [Version 0.147.2](https://github.com/lobehub/lobe-chat/compare/v0.147.1...v0.147.2)
|
|
6
|
+
|
|
7
|
+
<sup>Released on **2024-04-11**</sup>
|
|
8
|
+
|
|
9
|
+
#### 🐛 Bug Fixes
|
|
10
|
+
|
|
11
|
+
- **misc**: Fix custom model not display correctly.
|
|
12
|
+
|
|
13
|
+
<br/>
|
|
14
|
+
|
|
15
|
+
<details>
|
|
16
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
|
17
|
+
|
|
18
|
+
#### What's fixed
|
|
19
|
+
|
|
20
|
+
- **misc**: Fix custom model not display correctly, closes [#1972](https://github.com/lobehub/lobe-chat/issues/1972) ([5d7cae9](https://github.com/lobehub/lobe-chat/commit/5d7cae9))
|
|
21
|
+
|
|
22
|
+
</details>
|
|
23
|
+
|
|
24
|
+
<div align="right">
|
|
25
|
+
|
|
26
|
+
[](#readme-top)
|
|
27
|
+
|
|
28
|
+
</div>
|
|
29
|
+
|
|
30
|
+
### [Version 0.147.1](https://github.com/lobehub/lobe-chat/compare/v0.147.0...v0.147.1)
|
|
31
|
+
|
|
32
|
+
<sup>Released on **2024-04-11**</sup>
|
|
33
|
+
|
|
34
|
+
#### 🐛 Bug Fixes
|
|
35
|
+
|
|
36
|
+
- **misc**: Fix normalizeLocale with first matching locale.
|
|
37
|
+
|
|
38
|
+
<br/>
|
|
39
|
+
|
|
40
|
+
<details>
|
|
41
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
|
42
|
+
|
|
43
|
+
#### What's fixed
|
|
44
|
+
|
|
45
|
+
- **misc**: Fix normalizeLocale with first matching locale, closes [#1767](https://github.com/lobehub/lobe-chat/issues/1767) ([182ff23](https://github.com/lobehub/lobe-chat/commit/182ff23))
|
|
46
|
+
|
|
47
|
+
</details>
|
|
48
|
+
|
|
49
|
+
<div align="right">
|
|
50
|
+
|
|
51
|
+
[](#readme-top)
|
|
52
|
+
|
|
53
|
+
</div>
|
|
54
|
+
|
|
5
55
|
## [Version 0.147.0](https://github.com/lobehub/lobe-chat/compare/v0.146.2...v0.147.0)
|
|
6
56
|
|
|
7
57
|
<sup>Released on **2024-04-10**</sup>
|
package/README.md
CHANGED
|
@@ -259,14 +259,14 @@ Our marketplace is not just a showcase platform but also a collaborative space.
|
|
|
259
259
|
|
|
260
260
|
<!-- AGENT LIST -->
|
|
261
261
|
|
|
262
|
-
| Recent Submits | Description
|
|
263
|
-
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
264
|
-
| [Dirty Talk Learning Assistant](https://chat-preview.lobehub.com/market?agent=profanity-assistant)<br/><sup>By **[cokice](https://github.com/cokice)** on **2024-04-10**</sup> | I only know how to curse, nothing else.<br/>`answer` `dirty-talk`
|
|
265
|
-
| [
|
|
266
|
-
| [
|
|
267
|
-
| [
|
|
268
|
-
|
|
269
|
-
> 📊 Total agents: [<kbd>**
|
|
262
|
+
| Recent Submits | Description |
|
|
263
|
+
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
264
|
+
| [Dirty Talk Learning Assistant](https://chat-preview.lobehub.com/market?agent=profanity-assistant)<br/><sup>By **[cokice](https://github.com/cokice)** on **2024-04-10**</sup> | I only know how to curse, nothing else.<br/>`answer` `dirty-talk` |
|
|
265
|
+
| [TadzGenius](https://chat-preview.lobehub.com/market?agent=tadz-genius)<br/><sup>By **[infoaitek24](https://github.com/infoaitek24)** on **2024-04-10**</sup> | Expert in business development and development practices in the Philippine market<br/>`business-development` `ai-assistant` `market-analysis` `strategic-planning` `customer-acquisition` |
|
|
266
|
+
| [Microcontroller Engineer](https://chat-preview.lobehub.com/market?agent=with-keil-u-vision-5-c-code-explainer)<br/><sup>By **[bingjuu](https://github.com/bingjuu)** on **2024-04-10**</sup> | Proficient in interpreting embedded C code using Keil uVision 5 and Proteus<br/>`microcontroller` `c-code` `education` `interpretation` `embedded-systems` |
|
|
267
|
+
| [Design Philosophy Analysis](https://chat-preview.lobehub.com/market?agent=sixin-design-analysis)<br/><sup>By **[YuJiaoChiu](https://github.com/YuJiaoChiu)** on **2024-04-09**</sup> | Helps you identify and analyze architectural design philosophies<br/>`arch` |
|
|
268
|
+
|
|
269
|
+
> 📊 Total agents: [<kbd>**234**</kbd> ](https://github.com/lobehub/lobe-chat-agents)
|
|
270
270
|
|
|
271
271
|
<!-- AGENT LIST -->
|
|
272
272
|
|
package/README.zh-CN.md
CHANGED
|
@@ -247,14 +247,14 @@ LobeChat 的插件生态系统是其核心功能的重要扩展,它极大地
|
|
|
247
247
|
|
|
248
248
|
<!-- AGENT LIST -->
|
|
249
249
|
|
|
250
|
-
| 最近新增
|
|
251
|
-
|
|
|
252
|
-
| [脏话学习助手](https://chat-preview.lobehub.com/market?agent=profanity-assistant)<br/><sup>By **[cokice](https://github.com/cokice)** on **2024-04-10**</sup>
|
|
253
|
-
| [
|
|
254
|
-
| [
|
|
255
|
-
| [
|
|
256
|
-
|
|
257
|
-
> 📊 Total agents: [<kbd>**
|
|
250
|
+
| 最近新增 | 助手说明 |
|
|
251
|
+
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
252
|
+
| [脏话学习助手](https://chat-preview.lobehub.com/market?agent=profanity-assistant)<br/><sup>By **[cokice](https://github.com/cokice)** on **2024-04-10**</sup> | 我只会骂人 别的都不会<br/>`回答` `脏话` |
|
|
253
|
+
| [TadzGenius](https://chat-preview.lobehub.com/market?agent=tadz-genius)<br/><sup>By **[infoaitek24](https://github.com/infoaitek24)** on **2024-04-10**</sup> | Expert in business development and development practices in the Philippine market<br/>`business-development` `ai-assistant` `market-analysis` `strategic-planning` `customer-acquisition` |
|
|
254
|
+
| [单片机工程师](https://chat-preview.lobehub.com/market?agent=with-keil-u-vision-5-c-code-explainer)<br/><sup>By **[bingjuu](https://github.com/bingjuu)** on **2024-04-10**</sup> | 擅长使用 Keil uVision 5 和 Proteus 的嵌入式 C 代码解释<br/>`单片机` `c代码` `教育` `解释` `嵌入式系统` |
|
|
255
|
+
| [设计理念分析](https://chat-preview.lobehub.com/market?agent=sixin-design-analysis)<br/><sup>By **[YuJiaoChiu](https://github.com/YuJiaoChiu)** on **2024-04-09**</sup> | 帮助你识图并分析建筑设计理念<br/>`arch` |
|
|
256
|
+
|
|
257
|
+
> 📊 Total agents: [<kbd>**234**</kbd> ](https://github.com/lobehub/lobe-chat-agents)
|
|
258
258
|
|
|
259
259
|
<!-- AGENT LIST -->
|
|
260
260
|
|
|
@@ -10,6 +10,7 @@ tags:
|
|
|
10
10
|
- Vercel Analytics
|
|
11
11
|
- web analytics
|
|
12
12
|
---
|
|
13
|
+
|
|
13
14
|
# Data Analysis
|
|
14
15
|
|
|
15
16
|
To better help analyze the usage of LobeChat users, we have integrated several free/open-source data analytics services in LobeChat for collecting user usage data, which you can enable as needed.
|
|
@@ -17,6 +17,7 @@ tags:
|
|
|
17
17
|
- Github
|
|
18
18
|
- ZITADEL
|
|
19
19
|
---
|
|
20
|
+
|
|
20
21
|
# Identity Verification Service
|
|
21
22
|
|
|
22
23
|
LobeChat supports the configuration of external identity verification services for internal use within enterprises/organizations to centrally manage user authorization.
|
|
@@ -37,13 +38,13 @@ To simultaneously enable multiple identity verification sources, please set the
|
|
|
37
38
|
|
|
38
39
|
The order corresponds to the display order of the SSO providers.
|
|
39
40
|
|
|
40
|
-
| SSO Provider | Value
|
|
41
|
-
| ------------------ |
|
|
42
|
-
| Auth0 | `auth0`
|
|
43
|
-
| Microsoft Entra ID | `azure-ad`
|
|
41
|
+
| SSO Provider | Value |
|
|
42
|
+
| ------------------ | ----------- |
|
|
43
|
+
| Auth0 | `auth0` |
|
|
44
|
+
| Microsoft Entra ID | `azure-ad` |
|
|
44
45
|
| Authentik | `authentik` |
|
|
45
|
-
| Github |
|
|
46
|
-
| ZITADEL | `zitadel`
|
|
46
|
+
| Github | `github` |
|
|
47
|
+
| ZITADEL | `zitadel` |
|
|
47
48
|
|
|
48
49
|
## Other SSO Providers
|
|
49
50
|
|
|
@@ -13,6 +13,7 @@ tags:
|
|
|
13
13
|
- Github
|
|
14
14
|
- ZITADEL
|
|
15
15
|
---
|
|
16
|
+
|
|
16
17
|
# 身份验证服务
|
|
17
18
|
|
|
18
19
|
LobeChat 支持配置外部身份验证服务,供企业 / 组织内部使用,统一管理用户授权。
|
|
@@ -33,13 +34,13 @@ LobeChat 支持配置外部身份验证服务,供企业 / 组织内部使用
|
|
|
33
34
|
|
|
34
35
|
顺序为 SSO 提供商的显示顺序。
|
|
35
36
|
|
|
36
|
-
| SSO 提供商
|
|
37
|
-
| ------------------ |
|
|
38
|
-
| Auth0 | `auth0`
|
|
39
|
-
| Microsoft Entra ID | `azure-ad`
|
|
37
|
+
| SSO 提供商 | 值 |
|
|
38
|
+
| ------------------ | ----------- |
|
|
39
|
+
| Auth0 | `auth0` |
|
|
40
|
+
| Microsoft Entra ID | `azure-ad` |
|
|
40
41
|
| Authentik | `authentik` |
|
|
41
|
-
| Github |
|
|
42
|
-
| ZITADEL | `zitadel`
|
|
42
|
+
| Github | `github` |
|
|
43
|
+
| ZITADEL | `zitadel` |
|
|
43
44
|
|
|
44
45
|
## 其他 SSO 提供商
|
|
45
46
|
|
|
@@ -13,57 +13,77 @@ tags:
|
|
|
13
13
|
- SSO Integrations
|
|
14
14
|
- Social Login
|
|
15
15
|
---
|
|
16
|
+
|
|
16
17
|
# Configure Auth0 Identity Verification Service
|
|
17
18
|
|
|
18
19
|
<Steps>
|
|
19
20
|
### Create Auth0 Application
|
|
20
21
|
|
|
21
|
-
|
|
22
|
+
Register and log in to [Auth0][auth0-client-page], click on the "Applications" in the left navigation bar to switch to the application management interface, and click "Create Application" in the upper right corner to create an application.
|
|
22
23
|
|
|
23
|
-
|
|
24
|
+
<Image
|
|
25
|
+
alt="Create Auth0 Application S1"
|
|
26
|
+
inStep
|
|
27
|
+
src="https://github.com/lobehub/lobe-chat/assets/30863298/f068190f-0027-4d3b-8667-d632e43d5a86"
|
|
28
|
+
/>
|
|
24
29
|
|
|
25
|
-
|
|
30
|
+
Fill in the application name you want to display to the organization users, choose any application type, and click "Create".
|
|
26
31
|
|
|
27
|
-
|
|
32
|
+
<Image
|
|
33
|
+
alt="Create Auth0 Application S2"
|
|
34
|
+
inStep
|
|
35
|
+
src="https://github.com/lobehub/lobe-chat/assets/30863298/3e0082df-9b6f-46f3-b67f-bdc79e1eb2cc"
|
|
36
|
+
/>
|
|
28
37
|
|
|
29
|
-
|
|
38
|
+
After successful creation, click on the corresponding application to enter the application details page, switch to the "Settings" tab, and you can see the corresponding configuration information.
|
|
30
39
|
|
|
31
|
-
|
|
40
|
+
<Image
|
|
41
|
+
alt="Create Auth0 Application S3"
|
|
42
|
+
inStep
|
|
43
|
+
src="https://github.com/lobehub/lobe-chat/assets/30863298/df4cea85-616a-46f5-b2de-42725d9b82a6"
|
|
44
|
+
/>
|
|
32
45
|
|
|
33
|
-
|
|
46
|
+
In the application configuration page, you also need to configure Allowed Callback URLs, where you should fill in:
|
|
34
47
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
48
|
+
```bash
|
|
49
|
+
http(s)://your-domain/api/auth/callback/auth0
|
|
50
|
+
```
|
|
38
51
|
|
|
39
|
-
|
|
52
|
+
<Image
|
|
53
|
+
alt="Create Auth0 Application S4"
|
|
54
|
+
inStep
|
|
55
|
+
src="https://github.com/lobehub/lobe-chat/assets/30863298/62fbd09f-a69a-4460-949b-0f6285fa65b9"
|
|
56
|
+
/>
|
|
40
57
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
58
|
+
<Callout type={'important'}>
|
|
59
|
+
You can fill in or modify Allowed Callback URLs after deployment, but make sure the filled URL is
|
|
60
|
+
consistent with the deployed URL.
|
|
45
61
|
</Callout>
|
|
46
62
|
|
|
47
|
-
|
|
63
|
+
### Add Users
|
|
48
64
|
|
|
49
|
-
|
|
65
|
+
Click on the "Users Management" in the left navigation bar to enter the user management interface, where you can create users for your organization to log in to LobeChat.
|
|
50
66
|
|
|
51
|
-
|
|
67
|
+
<Image
|
|
68
|
+
alt="Add Users"
|
|
69
|
+
inStep
|
|
70
|
+
src="https://github.com/lobehub/lobe-chat/assets/30863298/0beda150-d0b6-43cf-a9f1-fce928b83a96"
|
|
71
|
+
/>
|
|
52
72
|
|
|
53
|
-
|
|
73
|
+
### Configure Environment Variables
|
|
54
74
|
|
|
55
|
-
|
|
75
|
+
When deploying LobeChat, you need to configure the following environment variables:
|
|
56
76
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
77
|
+
| Environment Variable | Type | Description |
|
|
78
|
+
| --- | --- | --- |
|
|
79
|
+
| `ENABLE_OAUTH_SSO` | Required | Enable single sign-on (SSO) for LobeChat. Set to `1` to enable single sign-on. |
|
|
80
|
+
| `NEXTAUTH_SECRET` | Required | Key used to encrypt Auth.js session tokens. You can generate a key using the following command: `openssl rand -base64 32` |
|
|
81
|
+
| `SSO_PROVIDERS` | Optional | Select the single sign-on provider for LoboChat. Use `auth0` for Auth0. |
|
|
82
|
+
| `AUTH0_CLIENT_ID` | Required | Client ID of the Auth0 application |
|
|
83
|
+
| `AUTH0_CLIENT_SECRET` | Required | Client Secret of the Auth0 application |
|
|
84
|
+
| `AUTH0_ISSUER` | Required | Domain of the Auth0 application, `https://example.auth0.com` |
|
|
85
|
+
| `ACCESS_CODE` | Required | Add a password to access this service. You can set a sufficiently long random password to "disable" access code authorization. |
|
|
86
|
+
| `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` |
|
|
67
87
|
|
|
68
88
|
<Callout type={'tip'}>
|
|
69
89
|
You can refer to the related variable details at [📘Environment Variables](/en/self-hosting/environment-variable#auth0).
|
|
@@ -84,13 +104,19 @@ If your enterprise or organization already has a unified identity authentication
|
|
|
84
104
|
|
|
85
105
|
Auth0 supports single sign-on services such as Azure Active Directory, Slack, Google Workspace, Office 365, Zoom, and more. For a detailed list of supported services, please refer to [this link][auth0-sso-integrations].
|
|
86
106
|
|
|
87
|
-
<Image
|
|
107
|
+
<Image
|
|
108
|
+
alt="Connecting to an Existing Single Sign-On Service"
|
|
109
|
+
src="https://github.com/lobehub/lobe-chat/assets/30863298/9891347e-a338-4aa9-8714-f16c8dbcfcec"
|
|
110
|
+
/>
|
|
88
111
|
|
|
89
112
|
### Configuring Social Login
|
|
90
113
|
|
|
91
114
|
If your enterprise or organization needs to support external user logins, you can configure social login services in Authentication -> Social.
|
|
92
115
|
|
|
93
|
-
<Image
|
|
116
|
+
<Image
|
|
117
|
+
alt="Configuring Social Login"
|
|
118
|
+
src="https://github.com/lobehub/lobe-chat/assets/30863298/880749a6-5ba4-4e20-a968-b583a54de7fa"
|
|
119
|
+
/>
|
|
94
120
|
|
|
95
121
|
<Callout type={'warning'}>
|
|
96
122
|
Configuring social login services by default allows anyone to authenticate, which may lead to
|
|
@@ -9,56 +9,76 @@ tags:
|
|
|
9
9
|
- 环境变量
|
|
10
10
|
- 用户管理
|
|
11
11
|
---
|
|
12
|
+
|
|
12
13
|
# 配置 Auth0 身份验证服务
|
|
13
14
|
|
|
14
15
|
<Steps>
|
|
15
16
|
### 创建 Auth0 应用
|
|
16
17
|
|
|
17
|
-
|
|
18
|
+
注册并登录 [Auth0][auth0-client-page],点击左侧导航栏的「Applications」,切换到应用管理界面,点击右上角「Create Application」以创建应用。
|
|
18
19
|
|
|
19
|
-
|
|
20
|
+
<Image
|
|
21
|
+
alt="创建 Auth0 应用 S1"
|
|
22
|
+
inStep
|
|
23
|
+
src="https://github.com/lobehub/lobe-chat/assets/30863298/f068190f-0027-4d3b-8667-d632e43d5a86"
|
|
24
|
+
/>
|
|
20
25
|
|
|
21
|
-
|
|
26
|
+
填写你想向组织用户显示的应用名称,可选择任意应用类型,点击「Create」。
|
|
22
27
|
|
|
23
|
-
|
|
28
|
+
<Image
|
|
29
|
+
alt="创建 Auth0 应用 S2"
|
|
30
|
+
inStep
|
|
31
|
+
src="https://github.com/lobehub/lobe-chat/assets/30863298/3e0082df-9b6f-46f3-b67f-bdc79e1eb2cc"
|
|
32
|
+
/>
|
|
24
33
|
|
|
25
|
-
|
|
34
|
+
创建成功后,点击相应的应用,进入应用详情页,切换到「Settings」标签页,就可以看到相应的配置信息
|
|
26
35
|
|
|
27
|
-
|
|
36
|
+
<Image
|
|
37
|
+
alt="创建 Auth0 应用 S3"
|
|
38
|
+
inStep
|
|
39
|
+
src="https://github.com/lobehub/lobe-chat/assets/30863298/df4cea85-616a-46f5-b2de-42725d9b82a6"
|
|
40
|
+
/>
|
|
28
41
|
|
|
29
|
-
|
|
42
|
+
在应用配置页面中,还需要配置 Allowed Callback URLs,在此处填写:
|
|
30
43
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
44
|
+
```bash
|
|
45
|
+
http(s)://your-domain/api/auth/callback/auth0
|
|
46
|
+
```
|
|
34
47
|
|
|
35
|
-
|
|
48
|
+
<Image
|
|
49
|
+
alt="创建 Auth0 应用 S4"
|
|
50
|
+
inStep
|
|
51
|
+
src="https://github.com/lobehub/lobe-chat/assets/30863298/62fbd09f-a69a-4460-949b-0f6285fa65b9"
|
|
52
|
+
/>
|
|
36
53
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
54
|
+
<Callout type={'important'}>
|
|
55
|
+
可以在部署后再填写或修改 Allowed Callback URLs,但是务必保证填写的 URL 与部署的 URL 一致
|
|
40
56
|
</Callout>
|
|
41
57
|
|
|
42
|
-
|
|
58
|
+
### 新增用户
|
|
43
59
|
|
|
44
|
-
|
|
60
|
+
点击左侧导航栏的「Users Management」,进入用户管理界面,可以为你的组织新建用户,用以登录 LobeChat
|
|
45
61
|
|
|
46
|
-
|
|
62
|
+
<Image
|
|
63
|
+
alt="新增用户"
|
|
64
|
+
inStep
|
|
65
|
+
src="https://github.com/lobehub/lobe-chat/assets/30863298/0beda150-d0b6-43cf-a9f1-fce928b83a96"
|
|
66
|
+
/>
|
|
47
67
|
|
|
48
|
-
|
|
68
|
+
### 配置环境变量
|
|
49
69
|
|
|
50
|
-
|
|
70
|
+
在部署 LobeChat 时,你需要配置以下环境变量:
|
|
51
71
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
72
|
+
| 环境变量 | 类型 | 描述 |
|
|
73
|
+
| --- | --- | --- |
|
|
74
|
+
| `ENABLE_OAUTH_SSO` | 必选 | 为 LobeChat 启用单点登录 (SSO)。设置为 `1` 以启用单点登录。 |
|
|
75
|
+
| `NEXTAUTH_SECRET` | 必选 | 用于加密 Auth.js 会话令牌的密钥。您可以使用以下命令生成秘钥: `openssl rand -base64 32` |
|
|
76
|
+
| `SSO_PROVIDERS` | 必选 | 选择 LoboChat 的单点登录提供商。使用 Auth0 请填写 `auth0`。 |
|
|
77
|
+
| `AUTH0_CLIENT_ID` | 必选 | Auth0 应用程序的 Client ID |
|
|
78
|
+
| `AUTH0_CLIENT_SECRET` | 必选 | Auth0 应用程序的 Client Secret |
|
|
79
|
+
| `AUTH0_ISSUER` | 必选 | Auth0 应用程序的 Domain,`https://example.auth0.com` |
|
|
80
|
+
| `ACCESS_CODE` | 必选 | 添加访问此服务的密码,你可以设置一个足够长的随机密码以 “禁用” 访问码授权 |
|
|
81
|
+
| `NEXTAUTH_URL` | 可选 | 该 URL 用于指定 Auth.js 在执行 OAuth 验证时的回调地址,当默认生成的重定向地址发生不正确时才需要设置。`https://example.com/api/auth` |
|
|
62
82
|
|
|
63
83
|
<Callout type={'tip'}>
|
|
64
84
|
前往 [📘 环境变量](/zh/self-hosting/environment-variable#auth0) 可查阅相关变量详情。
|
|
@@ -66,7 +86,9 @@ tags:
|
|
|
66
86
|
</Callout>
|
|
67
87
|
</Steps>
|
|
68
88
|
|
|
69
|
-
<Callout type={'info'}
|
|
89
|
+
<Callout type={'info'}>
|
|
90
|
+
部署成功后,用户将可以使用 Auth0 中配置的用户通过身份认证并使用 LobeChat。
|
|
91
|
+
</Callout>
|
|
70
92
|
|
|
71
93
|
## 进阶配置
|
|
72
94
|
|
|
@@ -76,13 +98,19 @@ tags:
|
|
|
76
98
|
|
|
77
99
|
Auth0 支持 Azure Active Directory / Slack / Google Workspace / Office 365 / Zoom 等单点登录服务,详细支持列表可参考 [这里][auth0-sso-integrations]
|
|
78
100
|
|
|
79
|
-
<Image
|
|
101
|
+
<Image
|
|
102
|
+
alt="Connecting to an Existing Single Sign-On Service"
|
|
103
|
+
src="https://github.com/lobehub/lobe-chat/assets/30863298/9891347e-a338-4aa9-8714-f16c8dbcfcec"
|
|
104
|
+
/>
|
|
80
105
|
|
|
81
106
|
### 配置社交登录
|
|
82
107
|
|
|
83
108
|
如果你的企业或组织需要支持外部人员登录,可以在 Authentication -> Social 中,配置社交登录服务。
|
|
84
109
|
|
|
85
|
-
<Image
|
|
110
|
+
<Image
|
|
111
|
+
alt="Configuring Social Login"
|
|
112
|
+
src="https://github.com/lobehub/lobe-chat/assets/30863298/880749a6-5ba4-4e20-a968-b583a54de7fa"
|
|
113
|
+
/>
|
|
86
114
|
|
|
87
115
|
<Callout type={'warning'}>
|
|
88
116
|
配置社交登录服务默认会允许所有人通过认证,这可能会导致 LobeChat 被外部人员滥用。
|
|
@@ -11,6 +11,7 @@ tags:
|
|
|
11
11
|
- Environment Variables
|
|
12
12
|
- Deployment Instructions
|
|
13
13
|
---
|
|
14
|
+
|
|
14
15
|
## Configuring Authentik Authentication Service
|
|
15
16
|
|
|
16
17
|
## Authentik Configuration Flow
|
|
@@ -18,46 +19,49 @@ tags:
|
|
|
18
19
|
<Steps>
|
|
19
20
|
### Create an Authentik Application Provider
|
|
20
21
|
|
|
21
|
-
|
|
22
|
+
In your Authentik instance, use the administrator account to go to **Admin Interface** -> **Applications** -> **Providers** and create a new provider.
|
|
22
23
|
|
|
23
|
-
|
|
24
|
+
Select **OAuth2/OpenID Provider** as the provider type. Fill in the provider name, select the authentication flow and authorization flow.
|
|
24
25
|
|
|
25
|
-
|
|
26
|
+
In the `Redirect URL/Origin (regex)` field, fill in:
|
|
26
27
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
```bash
|
|
29
|
+
https://your-domain/api/auth/callback/authentik
|
|
30
|
+
```
|
|
30
31
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
32
|
+
<Callout type={'info'}>
|
|
33
|
+
- You can fill in or modify the `Redirect URL/Origin (regex)` later, but make sure the filled in
|
|
34
|
+
URL matches the deployed URL. - Replace `your-domain` with your own domain name
|
|
35
35
|
</Callout>
|
|
36
36
|
|
|
37
|
-
|
|
37
|
+
<Image
|
|
38
|
+
alt="Create Authentik Provider"
|
|
39
|
+
inStep
|
|
40
|
+
src="https://github.com/lobehub/lobe-chat/assets/67304509/4244634e-5f68-48d5-aac0-e5f4b06d1c4b](https://github.com/lobehub/lobe-chat/assets/67304509/4244634e-5f68-48d5-aac0-e5f4b06d1c4b)"
|
|
41
|
+
/>
|
|
38
42
|
|
|
39
|
-
|
|
43
|
+
Click **Done**
|
|
40
44
|
|
|
41
|
-
|
|
45
|
+
After the creation is successful, click **Applications** on the left -> **Create**, fill in the name and Slug, select the provider created in the previous step, and click **Create**.
|
|
42
46
|
|
|
43
|
-
|
|
47
|
+
After the application provider is created, click the corresponding provider to enter the details page, click **Edit**, and save the `Client ID` and `Client Secret`.
|
|
44
48
|
|
|
45
|
-
|
|
49
|
+
Copy the URL of `OpenID Configuration Issuer` and save it.
|
|
46
50
|
|
|
47
|
-
|
|
51
|
+
### Configure Environment Variables
|
|
48
52
|
|
|
49
|
-
|
|
53
|
+
When deploying LobeChat, you need to configure the following environment variables:
|
|
50
54
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
55
|
+
| Environment Variable | Type | Description |
|
|
56
|
+
| --- | --- | --- |
|
|
57
|
+
| `ENABLE_OAUTH_SSO` | Required | Enable Single Sign-On (SSO) for LobeChat. Set to `1` to enable SSO. |
|
|
58
|
+
| `NEXTAUTH_SECRET` | Required | The secret used to encrypt Auth.js session tokens. You can generate a secret using the following command: `openssl rand -base64 32` |
|
|
59
|
+
| `SSO_PROVIDERS` | Required | Select the SSO provider for LoboChat. Use `authentik` for Authentik. |
|
|
60
|
+
| `AUTHENTIK_CLIENT_ID` | Required | The Client ID from the Authentik application provider details page |
|
|
61
|
+
| `AUTHENTIK_CLIENT_SECRET` | Required | The Client Secret from the Authentik application provider details page |
|
|
62
|
+
| `AUTHENTIK_ISSUER` | Required | The OpenID Configuration Issuer from the Authentik application provider details page |
|
|
63
|
+
| `ACCESS_CODE` | Required | Add a password to access this service, you can set a sufficiently long random password to "disable" access code authorization |
|
|
64
|
+
| `NEXTAUTH_URL` | Optional | This URL is used to specify the callback address for Auth.js when performing OAuth authentication. It only needs to be set when the default generated redirect address is incorrect. `https://example.com/api/auth` |
|
|
61
65
|
|
|
62
66
|
<Callout type={'tip'}>
|
|
63
67
|
Go to Environment Variables: /en/self-hosting/environment-variable#Authentik for details about the variables.
|
|
@@ -66,6 +70,6 @@ tags:
|
|
|
66
70
|
</Steps>
|
|
67
71
|
|
|
68
72
|
<Callout type={'info'}>
|
|
69
|
-
After a successful deployment, users will be able to use LobeChat by authenticating with the users
|
|
73
|
+
After a successful deployment, users will be able to use LobeChat by authenticating with the users
|
|
74
|
+
configured in Authentik.
|
|
70
75
|
</Callout>
|
|
71
|
-
|