@lobehub/chat 0.136.0 → 0.138.0
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/.env.example +11 -5
- package/CHANGELOG.md +50 -0
- package/README.md +8 -8
- package/README.zh-CN.md +8 -8
- package/docs/self-hosting/advanced/authentication.mdx +6 -7
- package/docs/self-hosting/advanced/authentication.zh-CN.mdx +6 -7
- package/docs/self-hosting/advanced/sso-providers/auth0.mdx +13 -14
- package/docs/self-hosting/advanced/sso-providers/auth0.zh-CN.mdx +13 -13
- package/docs/self-hosting/advanced/sso-providers/microsoft-entra-id.mdx +16 -21
- package/docs/self-hosting/advanced/sso-providers/microsoft-entra-id.zh-CN.mdx +39 -40
- package/docs/self-hosting/environment-variables/basic.zh-CN.mdx +1 -1
- package/docs/self-hosting/environment-variables/model-provider.mdx +9 -4
- package/docs/self-hosting/environment-variables/model-provider.zh-CN.mdx +9 -3
- package/docs/self-hosting/start.mdx +1 -9
- package/docs/usage/features/agent-market.mdx +1 -1
- package/docs/usage/features/tts.mdx +0 -3
- package/docs/usage/features/vision.mdx +0 -1
- package/docs/usage/providers/ollama/gemma.mdx +0 -1
- package/docs/usage/providers/ollama.mdx +0 -3
- package/docs/usage/start.mdx +1 -1
- package/docs/usage/start.zh-CN.mdx +1 -1
- package/locales/ar/common.json +1 -0
- package/locales/ar/error.json +14 -0
- package/locales/ar/setting.json +17 -1
- package/locales/de-DE/common.json +1 -0
- package/locales/de-DE/error.json +14 -0
- package/locales/de-DE/setting.json +17 -1
- package/locales/en-US/common.json +1 -0
- package/locales/en-US/error.json +14 -0
- package/locales/en-US/setting.json +17 -1
- package/locales/es-ES/common.json +1 -0
- package/locales/es-ES/error.json +14 -0
- package/locales/es-ES/setting.json +17 -1
- package/locales/fr-FR/common.json +1 -0
- package/locales/fr-FR/error.json +14 -0
- package/locales/fr-FR/setting.json +17 -1
- package/locales/it-IT/common.json +1 -0
- package/locales/it-IT/error.json +14 -0
- package/locales/it-IT/setting.json +17 -1
- package/locales/ja-JP/common.json +1 -0
- package/locales/ja-JP/error.json +14 -0
- package/locales/ja-JP/setting.json +17 -1
- package/locales/ko-KR/common.json +1 -0
- package/locales/ko-KR/error.json +14 -0
- package/locales/ko-KR/setting.json +17 -1
- package/locales/nl-NL/common.json +1 -0
- package/locales/nl-NL/error.json +14 -0
- package/locales/nl-NL/setting.json +17 -1
- package/locales/pl-PL/common.json +1 -0
- package/locales/pl-PL/error.json +14 -0
- package/locales/pl-PL/setting.json +17 -1
- package/locales/pt-BR/common.json +1 -0
- package/locales/pt-BR/error.json +14 -0
- package/locales/pt-BR/setting.json +17 -1
- package/locales/ru-RU/common.json +1 -0
- package/locales/ru-RU/error.json +14 -0
- package/locales/ru-RU/setting.json +17 -1
- package/locales/tr-TR/common.json +1 -0
- package/locales/tr-TR/error.json +14 -0
- package/locales/tr-TR/setting.json +17 -1
- package/locales/vi-VN/common.json +1 -0
- package/locales/vi-VN/error.json +14 -0
- package/locales/vi-VN/setting.json +17 -1
- package/locales/zh-CN/common.json +1 -0
- package/locales/zh-CN/error.json +14 -0
- package/locales/zh-CN/setting.json +17 -1
- package/locales/zh-TW/common.json +1 -0
- package/locales/zh-TW/error.json +14 -0
- package/locales/zh-TW/setting.json +17 -1
- package/package.json +2 -1
- package/src/app/api/chat/[provider]/agentRuntime.ts +15 -2
- package/src/app/api/config/route.ts +5 -2
- package/src/app/api/errorResponse.ts +5 -1
- package/src/app/settings/llm/Groq/index.tsx +47 -0
- package/src/app/settings/llm/Ollama/Checker.tsx +73 -0
- package/src/app/settings/llm/Ollama/index.tsx +2 -4
- package/src/app/settings/llm/components/Checker.tsx +23 -17
- package/src/app/settings/llm/index.tsx +2 -0
- package/src/components/ModelIcon/index.tsx +2 -0
- package/src/components/ModelProviderIcon/index.tsx +5 -0
- package/src/components/ModelTag/ModelIcon.tsx +2 -0
- package/src/config/modelProviders/groq.ts +24 -0
- package/src/config/modelProviders/index.ts +3 -0
- package/src/config/modelProviders/ollama.ts +14 -0
- package/src/config/server/provider.ts +13 -3
- package/src/const/settings.ts +4 -0
- package/src/features/Conversation/Error/APIKeyForm/Groq.tsx +60 -0
- package/src/features/Conversation/Error/APIKeyForm/index.tsx +5 -0
- package/src/features/Conversation/Error/InvalidOllamaModel/index.tsx +138 -0
- package/src/features/Conversation/Error/InvalidOllamaModel/useDownloadMonitor.ts +48 -0
- package/src/features/Conversation/Error/OllamaBizError.tsx +34 -0
- package/src/features/Conversation/Error/index.tsx +6 -0
- package/src/features/Conversation/Error/style.tsx +2 -2
- package/src/features/Conversation/components/ChatItem/index.tsx +2 -1
- package/src/libs/agent-runtime/error.ts +3 -0
- package/src/libs/agent-runtime/groq/index.ts +78 -0
- package/src/libs/agent-runtime/index.ts +1 -0
- package/src/libs/agent-runtime/types/type.ts +1 -0
- package/src/locales/default/common.ts +1 -0
- package/src/locales/default/error.ts +15 -0
- package/src/locales/default/setting.ts +17 -1
- package/src/services/__tests__/ollama.test.ts +26 -0
- package/src/services/_auth.ts +5 -1
- package/src/services/ollama.ts +64 -0
- package/src/store/global/slices/settings/selectors/modelProvider.ts +25 -15
- package/src/store/middleware/createHyperStorage/index.ts +1 -2
- package/src/store/middleware/createHyperStorage/indexedDB.ts +1 -1
- package/src/store/middleware/createHyperStorage/localStorage.ts +1 -1
- package/src/store/middleware/createHyperStorage/urlStorage.ts +1 -1
- package/src/types/fetch.ts +1 -0
- package/src/types/settings/modelProvider.ts +6 -0
- package/tsconfig.json +1 -1
package/.env.example
CHANGED
|
@@ -73,19 +73,25 @@ OPENAI_API_KEY=sk-xxxxxxxxx
|
|
|
73
73
|
########### Mistral AI Service ##########
|
|
74
74
|
########################################
|
|
75
75
|
|
|
76
|
-
#MISTRAL_API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
|
76
|
+
# MISTRAL_API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
|
77
77
|
|
|
78
78
|
########################################
|
|
79
|
-
######### Perplexity Service
|
|
79
|
+
######### Perplexity Service ###########
|
|
80
80
|
########################################
|
|
81
81
|
|
|
82
|
-
#PERPLEXITY_API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
|
82
|
+
# PERPLEXITY_API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
|
83
83
|
|
|
84
84
|
########################################
|
|
85
|
-
######### Anthropic Service
|
|
85
|
+
######### Anthropic Service ############
|
|
86
86
|
########################################
|
|
87
87
|
|
|
88
|
-
#ANTHROPIC_API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
|
88
|
+
# ANTHROPIC_API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
|
89
|
+
|
|
90
|
+
########################################
|
|
91
|
+
############ Groq Service ##############
|
|
92
|
+
########################################
|
|
93
|
+
|
|
94
|
+
# GROQ_API_KEY=gsk_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
|
89
95
|
|
|
90
96
|
########################################
|
|
91
97
|
############ Market Service ############
|
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,56 @@
|
|
|
2
2
|
|
|
3
3
|
# Changelog
|
|
4
4
|
|
|
5
|
+
## [Version 0.138.0](https://github.com/lobehub/lobe-chat/compare/v0.137.0...v0.138.0)
|
|
6
|
+
|
|
7
|
+
<sup>Released on **2024-03-15**</sup>
|
|
8
|
+
|
|
9
|
+
#### ✨ Features
|
|
10
|
+
|
|
11
|
+
- **misc**: Support groq as a model provider.
|
|
12
|
+
|
|
13
|
+
<br/>
|
|
14
|
+
|
|
15
|
+
<details>
|
|
16
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
|
17
|
+
|
|
18
|
+
#### What's improved
|
|
19
|
+
|
|
20
|
+
- **misc**: Support groq as a model provider, closes [#1569](https://github.com/lobehub/lobe-chat/issues/1569) [#1562](https://github.com/lobehub/lobe-chat/issues/1562) [#1570](https://github.com/lobehub/lobe-chat/issues/1570) ([a04c364](https://github.com/lobehub/lobe-chat/commit/a04c364))
|
|
21
|
+
|
|
22
|
+
</details>
|
|
23
|
+
|
|
24
|
+
<div align="right">
|
|
25
|
+
|
|
26
|
+
[](#readme-top)
|
|
27
|
+
|
|
28
|
+
</div>
|
|
29
|
+
|
|
30
|
+
## [Version 0.137.0](https://github.com/lobehub/lobe-chat/compare/v0.136.0...v0.137.0)
|
|
31
|
+
|
|
32
|
+
<sup>Released on **2024-03-15**</sup>
|
|
33
|
+
|
|
34
|
+
#### ✨ Features
|
|
35
|
+
|
|
36
|
+
- **ollama**: Improve connection check method and provide selector for user to control model options.
|
|
37
|
+
|
|
38
|
+
<br/>
|
|
39
|
+
|
|
40
|
+
<details>
|
|
41
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
|
42
|
+
|
|
43
|
+
#### What's improved
|
|
44
|
+
|
|
45
|
+
- **ollama**: Improve connection check method and provide selector for user to control model options, closes [#1397](https://github.com/lobehub/lobe-chat/issues/1397) ([675902f](https://github.com/lobehub/lobe-chat/commit/675902f))
|
|
46
|
+
|
|
47
|
+
</details>
|
|
48
|
+
|
|
49
|
+
<div align="right">
|
|
50
|
+
|
|
51
|
+
[](#readme-top)
|
|
52
|
+
|
|
53
|
+
</div>
|
|
54
|
+
|
|
5
55
|
## [Version 0.136.0](https://github.com/lobehub/lobe-chat/compare/v0.135.4...v0.136.0)
|
|
6
56
|
|
|
7
57
|
<sup>Released on **2024-03-15**</sup>
|
package/README.md
CHANGED
|
@@ -255,14 +255,14 @@ Our marketplace is not just a showcase platform but also a collaborative space.
|
|
|
255
255
|
|
|
256
256
|
<!-- AGENT LIST -->
|
|
257
257
|
|
|
258
|
-
| Recent Submits
|
|
259
|
-
|
|
|
260
|
-
| [
|
|
261
|
-
| [
|
|
262
|
-
| [
|
|
263
|
-
| [
|
|
264
|
-
|
|
265
|
-
> 📊 Total agents: [<kbd>**
|
|
258
|
+
| Recent Submits | Description |
|
|
259
|
+
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
260
|
+
| [Amazon Seller Support Agent](https://chat-preview.lobehub.com/market?agent=amazon-seller-support-agent)<br/><sup>By **[etnperlong](https://github.com/etnperlong)** on **2024-03-15**</sup> | AI assistant that assists Amazon sellers in responding to customer service replies, providing detailed and cogent responses towards a satisfactory resolution.<br/>`amazon` `seller` `writing` |
|
|
261
|
+
| [TikTok Script Writer](https://chat-preview.lobehub.com/market?agent=tiktok-script-writer)<br/><sup>By **[sdhjn19dj1m](https://github.com/sdhjn19dj1m)** on **2024-03-12**</sup> | This script is tailored for TikTok's short video format, designed to engage and entertain the specified target audience. It incorporates trending elements and best practices for content virality, ensuring the video captures attention from the start. The script is structured to include a captivating opening, concise and impactful message body, and a compelling call-to-action, all while reflecting the user's desired tone and theme.<br/>`tik-tok` `short-video` `viral-content` `trending-hashtag` `engagement` |
|
|
262
|
+
| [Gen Z Engagement Specialist](https://chat-preview.lobehub.com/market?agent=gen-z)<br/><sup>By **[MYSeaIT](https://github.com/MYSeaIT)** on **2024-03-09**</sup> | Specializes in engaging Gen Z users with tailored interactions reflecting their preferences and values.<br/>`engagement` `gen-z` `communication` `advice` `interaction` |
|
|
263
|
+
| [Schedule Management Assistant](https://chat-preview.lobehub.com/market?agent=calendar-manager)<br/><sup>By **[ccdanpian](https://github.com/ccdanpian)** on **2024-03-07**</sup> | Schedule Management Assistant, calls the time plugin to handle requests for adding, querying, and deleting schedules, supports multiple operations and reminders.<br/>`schedule-management` `time-plugin` `add-schedule` `query-schedule` `delete-schedule` |
|
|
264
|
+
|
|
265
|
+
> 📊 Total agents: [<kbd>**202**</kbd> ](https://github.com/lobehub/lobe-chat-agents)
|
|
266
266
|
|
|
267
267
|
<!-- AGENT LIST -->
|
|
268
268
|
|
package/README.zh-CN.md
CHANGED
|
@@ -243,14 +243,14 @@ LobeChat 的插件生态系统是其核心功能的重要扩展,它极大地
|
|
|
243
243
|
|
|
244
244
|
<!-- AGENT LIST -->
|
|
245
245
|
|
|
246
|
-
| 最近新增
|
|
247
|
-
|
|
|
248
|
-
| [
|
|
249
|
-
| [
|
|
250
|
-
| [
|
|
251
|
-
| [
|
|
252
|
-
|
|
253
|
-
> 📊 Total agents: [<kbd>**
|
|
246
|
+
| 最近新增 | 助手说明 |
|
|
247
|
+
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
248
|
+
| [亚马逊卖家支持代理](https://chat-preview.lobehub.com/market?agent=amazon-seller-support-agent)<br/><sup>By **[etnperlong](https://github.com/etnperlong)** on **2024-03-15**</sup> | AI 助手,协助亚马逊卖家回复客户服务回复,提供详细和有力的回复,以达到令人满意的解决方案。<br/>`亚马逊` `卖家` `写作` |
|
|
249
|
+
| [TikTok 脚本撰写器](https://chat-preview.lobehub.com/market?agent=tiktok-script-writer)<br/><sup>By **[sdhjn19dj1m](https://github.com/sdhjn19dj1m)** on **2024-03-12**</sup> | 此脚本专为 TikTok 的短视频格式量身定制,旨在吸引和娱乐特定目标受众。它融入了流行元素和内容病毒传播的最佳实践,确保视频从一开始就吸引注意力。脚本结构包括引人入胜的开场、简洁而有影响力的主体信息和引人注目的行动号召,同时反映用户期望的语气和主题。<br/>`tik-tok` `short-video` `viral-content` `trending-hashtag` `engagement` |
|
|
250
|
+
| [Gen Z Engagement Specialist](https://chat-preview.lobehub.com/market?agent=gen-z)<br/><sup>By **[MYSeaIT](https://github.com/MYSeaIT)** on **2024-03-09**</sup> | 专注于通过定制互动反映他们的偏好和价值观,与 Gen Z 用户进行互动。<br/>`engagement` `gen-z` `communication` `advice` `interaction` |
|
|
251
|
+
| [日程管理助手](https://chat-preview.lobehub.com/market?agent=calendar-manager)<br/><sup>By **[ccdanpian](https://github.com/ccdanpian)** on **2024-03-07**</sup> | 日程管理助手,调用时间插件,处理新增、查询、删除日程请求,支持多种操作和提醒。<br/>`日程管理` `时间插件` `新增日程` `查询日程` `删除日程` |
|
|
252
|
+
|
|
253
|
+
> 📊 Total agents: [<kbd>**202**</kbd> ](https://github.com/lobehub/lobe-chat-agents)
|
|
254
254
|
|
|
255
255
|
<!-- AGENT LIST -->
|
|
256
256
|
|
|
@@ -4,8 +4,8 @@ LobeChat supports the configuration of external identity verification services f
|
|
|
4
4
|
|
|
5
5
|
Currently supported identity verification services include:
|
|
6
6
|
|
|
7
|
-
- [Auth0](/en/self-hosting/sso-providers/auth0)
|
|
8
|
-
- [Microsoft Entra ID](/en/self-hosting/sso-providers/microsoft-entra-id)
|
|
7
|
+
- [Auth0](/en/self-hosting/advanced/sso-providers/auth0)
|
|
8
|
+
- [Microsoft Entra ID](/en/self-hosting/advanced/sso-providers/microsoft-entra-id)
|
|
9
9
|
|
|
10
10
|
Click on the links to view the corresponding platform's configuration documentation.
|
|
11
11
|
|
|
@@ -15,14 +15,13 @@ To simultaneously enable multiple identity verification sources, please set the
|
|
|
15
15
|
|
|
16
16
|
The order corresponds to the display order of the SSO providers.
|
|
17
17
|
|
|
18
|
-
| SSO Provider
|
|
19
|
-
|
|
|
20
|
-
| Auth0
|
|
18
|
+
| SSO Provider | Value |
|
|
19
|
+
| ------------------ | -------- |
|
|
20
|
+
| Auth0 | auth0 |
|
|
21
21
|
| Microsoft Entra ID | azure-ad |
|
|
22
22
|
|
|
23
23
|
## Other SSO Providers
|
|
24
24
|
|
|
25
25
|
Please refer to the [NextAuth.js][next-auth-js] documentation and feel free to submit a Pull Request.
|
|
26
26
|
|
|
27
|
-
|
|
28
|
-
[next-auth-js]: https://next-auth.js.org/providers
|
|
27
|
+
[next-auth-js]: https://next-auth.js.org/providers
|
|
@@ -4,8 +4,8 @@ LobeChat 支持配置外部身份验证服务,供企业 / 组织内部使用
|
|
|
4
4
|
|
|
5
5
|
目前支持的身份验证服务有:
|
|
6
6
|
|
|
7
|
-
- [Auth0](/zh/self-hosting/sso-providers/auth0)
|
|
8
|
-
- [Microsoft Entra ID](/zh/self-hosting/sso-providers/microsoft-entra-id)
|
|
7
|
+
- [Auth0](/zh/self-hosting/advanced/sso-providers/auth0)
|
|
8
|
+
- [Microsoft Entra ID](/zh/self-hosting/advanced/sso-providers/microsoft-entra-id)
|
|
9
9
|
|
|
10
10
|
点击链接可以查看对应平台的配置文档。
|
|
11
11
|
|
|
@@ -15,14 +15,13 @@ LobeChat 支持配置外部身份验证服务,供企业 / 组织内部使用
|
|
|
15
15
|
|
|
16
16
|
顺序为 SSO 提供商的显示顺序。
|
|
17
17
|
|
|
18
|
-
| SSO 提供商
|
|
19
|
-
|
|
|
20
|
-
| Auth0
|
|
18
|
+
| SSO 提供商 | 值 |
|
|
19
|
+
| ------------------ | -------- |
|
|
20
|
+
| Auth0 | auth0 |
|
|
21
21
|
| Microsoft Entra ID | azure-ad |
|
|
22
22
|
|
|
23
23
|
## 其他 SSO 提供商
|
|
24
24
|
|
|
25
25
|
请参考 [NextAuth.js][next-auth-js] 文档,欢迎提交 Pull Request。
|
|
26
26
|
|
|
27
|
-
|
|
28
|
-
[next-auth-js]: https://next-auth.js.org/providers
|
|
27
|
+
[next-auth-js]: https://next-auth.js.org/providers
|
|
@@ -40,19 +40,18 @@ import { Callout, Steps } from 'nextra/components';
|
|
|
40
40
|
|
|
41
41
|
When deploying LobeChat, you need to configure the following environment variables:
|
|
42
42
|
|
|
43
|
-
| Environment Variable | Type | Description |
|
|
44
|
-
| --------------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
45
|
-
| `ENABLE_OAUTH_SSO` | Required | Enable single sign-on (SSO) for LobeChat. Set to `1` to enable single sign-on. |
|
|
46
|
-
| `NEXTAUTH_SECRET` | Required | Key used to encrypt Auth.js session tokens. You can generate a key using the following command: `openssl rand -base64 32` |
|
|
47
|
-
| `SSO_PROVIDERS` | Optional | Select the single sign-on provider for LoboChat. Use `auth0` for Auth0. |
|
|
48
|
-
| `AUTH0_CLIENT_ID` | Required | Client ID of the Auth0 application |
|
|
49
|
-
| `AUTH0_CLIENT_SECRET` | Required | Client Secret of the Auth0 application |
|
|
50
|
-
| `AUTH0_ISSUER` | Required | Domain of the Auth0 application, `https://example.auth0.com` |
|
|
51
|
-
| `ACCESS_CODE` | Required | Add a password to access this service. You can set a sufficiently long random password to "disable" access code authorization. |
|
|
52
|
-
| `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` |
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
You can refer to the related variable details at [Environment Variables](/en/self-hosting/environment-variable#auth0).
|
|
43
|
+
| Environment Variable | Type | Description |
|
|
44
|
+
| --------------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
45
|
+
| `ENABLE_OAUTH_SSO` | Required | Enable single sign-on (SSO) for LobeChat. Set to `1` to enable single sign-on. |
|
|
46
|
+
| `NEXTAUTH_SECRET` | Required | Key used to encrypt Auth.js session tokens. You can generate a key using the following command: `openssl rand -base64 32` |
|
|
47
|
+
| `SSO_PROVIDERS` | Optional | Select the single sign-on provider for LoboChat. Use `auth0` for Auth0. |
|
|
48
|
+
| `AUTH0_CLIENT_ID` | Required | Client ID of the Auth0 application |
|
|
49
|
+
| `AUTH0_CLIENT_SECRET` | Required | Client Secret of the Auth0 application |
|
|
50
|
+
| `AUTH0_ISSUER` | Required | Domain of the Auth0 application, `https://example.auth0.com` |
|
|
51
|
+
| `ACCESS_CODE` | Required | Add a password to access this service. You can set a sufficiently long random password to "disable" access code authorization. |
|
|
52
|
+
| `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` |
|
|
53
|
+
|
|
54
|
+
<Callout type={'info'}>You can refer to the related variable details at [📘Environment Variables](/en/self-hosting/environment-variable#auth0).</Callout>
|
|
56
55
|
</Steps>
|
|
57
56
|
|
|
58
57
|
<Callout>
|
|
@@ -89,4 +88,4 @@ If your enterprise or organization needs to support external user logins, you ca
|
|
|
89
88
|
|
|
90
89
|
[auth0-client-page]: https://manage.auth0.com/dashboard
|
|
91
90
|
[auth0-login-actions-manual]: https://auth0.com/blog/permit-or-deny-login-requests-using-auth0-actions/
|
|
92
|
-
[auth0-sso-integrations]: https://marketplace.auth0.com/features/sso-integrations
|
|
91
|
+
[auth0-sso-integrations]: https://marketplace.auth0.com/features/sso-integrations
|
|
@@ -39,21 +39,21 @@ import { Callout, Steps } from 'nextra/components';
|
|
|
39
39
|
|
|
40
40
|
在部署 LobeChat 时,你需要配置以下环境变量:
|
|
41
41
|
|
|
42
|
-
| 环境变量
|
|
43
|
-
|
|
|
44
|
-
| `ENABLE_OAUTH_SSO`
|
|
45
|
-
| `NEXTAUTH_SECRET`
|
|
46
|
-
| `SSO_PROVIDERS`
|
|
47
|
-
| `AUTH0_CLIENT_ID`
|
|
48
|
-
| `AUTH0_CLIENT_SECRET`
|
|
49
|
-
| `AUTH0_ISSUER`
|
|
50
|
-
| `ACCESS_CODE`
|
|
51
|
-
| `NEXTAUTH_URL`
|
|
52
|
-
|
|
53
|
-
前往 [环境变量](/zh/self-hosting/environment-variable#auth0)
|
|
42
|
+
| 环境变量 | 类型 | 描述 |
|
|
43
|
+
| --------------------- | -- | ------------------------------------------------------------------------------------------- |
|
|
44
|
+
| `ENABLE_OAUTH_SSO` | 必选 | 为 LobeChat 启用单点登录 (SSO)。设置为 `1` 以启用单点登录。 |
|
|
45
|
+
| `NEXTAUTH_SECRET` | 必选 | 用于加密 Auth.js 会话令牌的密钥。您可以使用以下命令生成秘钥: `openssl rand -base64 32` |
|
|
46
|
+
| `SSO_PROVIDERS` | 必选 | 选择 LoboChat 的单点登录提供商。使用 Auth0 请填写 `auth0`。 |
|
|
47
|
+
| `AUTH0_CLIENT_ID` | 必选 | Auth0 应用程序的 Client ID |
|
|
48
|
+
| `AUTH0_CLIENT_SECRET` | 必选 | Auth0 应用程序的 Client Secret |
|
|
49
|
+
| `AUTH0_ISSUER` | 必选 | Auth0 应用程序的 Domain,`https://example.auth0.com` |
|
|
50
|
+
| `ACCESS_CODE` | 必选 | 添加访问此服务的密码,你可以设置一个足够长的随机密码以 “禁用” 访问码授权 |
|
|
51
|
+
| `NEXTAUTH_URL` | 可选 | 该 URL 用于指定 Auth.js 在执行 OAuth 验证时的回调地址,当默认生成的重定向地址发生不正确时才需要设置。`https://example.com/api/auth` |
|
|
52
|
+
|
|
53
|
+
<Callout type={'info'}> 前往 [📘 环境变量](/zh/self-hosting/environment-variable#auth0) 可查阅相关变量详情。</Callout>
|
|
54
54
|
</Steps>
|
|
55
55
|
|
|
56
|
-
<Callout>部署成功后,用户将可以使用 Auth0 中配置的用户通过身份认证并使用 LobeChat。</Callout>
|
|
56
|
+
<Callout type={'info'}>部署成功后,用户将可以使用 Auth0 中配置的用户通过身份认证并使用 LobeChat。</Callout>
|
|
57
57
|
|
|
58
58
|
## 进阶配置
|
|
59
59
|
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import { Callout, Steps } from 'nextra/components';
|
|
2
|
-
|
|
3
1
|
# Configuration of Microsoft Entra ID Authentication Service
|
|
4
2
|
|
|
5
3
|
<Steps>
|
|
@@ -21,7 +19,7 @@ import { Callout, Steps } from 'nextra/components';
|
|
|
21
19
|
</Callout>
|
|
22
20
|
|
|
23
21
|

|
|
24
|
-
|
|
22
|
+
|
|
25
23
|
Click on "Register".
|
|
26
24
|
|
|
27
25
|
After successfully creating the application, click on the corresponding application to enter the application details page, and switch to the "Overview" tab to view the corresponding configuration information.
|
|
@@ -32,10 +30,7 @@ import { Callout, Steps } from 'nextra/components';
|
|
|
32
30
|
|
|
33
31
|

|
|
34
32
|
|
|
35
|
-
<Callout type={'info'}>
|
|
36
|
-
- Please make sure to save your client secret as this is your only chance to view it.
|
|
37
|
-
</Callout>
|
|
38
|
-
|
|
33
|
+
<Callout type={'info'}>Please make sure to save your client secret as this is your only chance to view it.</Callout>
|
|
39
34
|
|
|
40
35
|
### Add Users
|
|
41
36
|
|
|
@@ -45,17 +40,18 @@ import { Callout, Steps } from 'nextra/components';
|
|
|
45
40
|
|
|
46
41
|
When deploying LobeChat, you need to configure the following environment variables:
|
|
47
42
|
|
|
48
|
-
| Environment Variable | Type | Description |
|
|
49
|
-
| ------------------------ | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
50
|
-
| `ENABLE_OAUTH_SSO` | Required | Enable single sign-on (SSO) for LobeChat. Set to `1` to enable single sign-on. |
|
|
51
|
-
| `NEXTAUTH_SECRET` | Required | Key used to encrypt Auth.js session tokens. You can generate the key using the following command: `openssl rand -base64 32` |
|
|
52
|
-
| `SSO_PROVIDERS` | Required | Select the single sign-on provider for LoboChat. Use `azure-ad` for Microsoft Entra ID. |
|
|
53
|
-
| `AZURE_AD_CLIENT_ID` | Required | Client ID of the Microsoft Entra ID application. |
|
|
54
|
-
| `AZURE_AD_CLIENT_SECRET` | Required | Client Secret of the Microsoft Entra ID application. |
|
|
55
|
-
| `AZURE_AD_TENANT_ID` | Required | Tenant ID of the Microsoft Entra ID application. |
|
|
56
|
-
| `ACCESS_CODE` | Required | Add a password for accessing this service, you can set a sufficiently long random password to "disable" access code authorization. |
|
|
57
|
-
| `NEXTAUTH_URL` | Optional | This URL is used to specify the callback address for Auth.js when performing OAuth authentication. It is only necessary to set it when the default generated redirect address is incorrect. `https://example.com/api/auth` |
|
|
58
|
-
|
|
43
|
+
| Environment Variable | Type | Description |
|
|
44
|
+
| ------------------------ | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
45
|
+
| `ENABLE_OAUTH_SSO` | Required | Enable single sign-on (SSO) for LobeChat. Set to `1` to enable single sign-on. |
|
|
46
|
+
| `NEXTAUTH_SECRET` | Required | Key used to encrypt Auth.js session tokens. You can generate the key using the following command: `openssl rand -base64 32` |
|
|
47
|
+
| `SSO_PROVIDERS` | Required | Select the single sign-on provider for LoboChat. Use `azure-ad` for Microsoft Entra ID. |
|
|
48
|
+
| `AZURE_AD_CLIENT_ID` | Required | Client ID of the Microsoft Entra ID application. |
|
|
49
|
+
| `AZURE_AD_CLIENT_SECRET` | Required | Client Secret of the Microsoft Entra ID application. |
|
|
50
|
+
| `AZURE_AD_TENANT_ID` | Required | Tenant ID of the Microsoft Entra ID application. |
|
|
51
|
+
| `ACCESS_CODE` | Required | Add a password for accessing this service, you can set a sufficiently long random password to "disable" access code authorization. |
|
|
52
|
+
| `NEXTAUTH_URL` | Optional | This URL is used to specify the callback address for Auth.js when performing OAuth authentication. It is only necessary to set it when the default generated redirect address is incorrect. `https://example.com/api/auth` |
|
|
53
|
+
|
|
54
|
+
<Callout type={'info'}>You can refer to [📘 environment variables](/en/self-hosting/environment-variable#microsoft-entra-id) for details on related variables.</Callout>
|
|
59
55
|
</Steps>
|
|
60
56
|
|
|
61
57
|
<Callout>After successful deployment, users will be able to authenticate and use LobeChat using the users configured in Microsoft Entra ID.</Callout>
|
|
@@ -68,7 +64,6 @@ Please explore further in the [Microsoft Entra ID Learning Center][microsoft-lea
|
|
|
68
64
|
|
|
69
65
|
- [Quickstart: Register an app][microsoft-entra-register-app]
|
|
70
66
|
|
|
71
|
-
[microsoft-learn-entra]: https://learn.microsoft.com/en-us/entra/identity/
|
|
72
|
-
[microsoft-entra-register-app]: https://learn.microsoft.com/en-us/entra/identity-platform/quickstart-register-app
|
|
73
67
|
[microsoft-azure-portal]: https://portal.azure.com/
|
|
74
|
-
[microsoft-entra-
|
|
68
|
+
[microsoft-entra-register-app]: https://learn.microsoft.com/en-us/entra/identity-platform/quickstart-register-app
|
|
69
|
+
[microsoft-learn-entra]: https://learn.microsoft.com/en-us/entra/identity/
|
|
@@ -2,75 +2,74 @@ import { Callout, Steps } from 'nextra/components';
|
|
|
2
2
|
|
|
3
3
|
# 配置 Microsoft Entra ID 身份验证服务
|
|
4
4
|
|
|
5
|
+
## Microsoft Entra ID 配置流程
|
|
6
|
+
|
|
5
7
|
<Steps>
|
|
6
8
|
### 创建 Microsoft Entra ID 应用
|
|
7
9
|
|
|
8
|
-
|
|
10
|
+
在你的 [Microsoft Azure Portal][microsoft-azure-portal] 进入 Microsoft Entra ID -> App registrations -> New registration 创建一个新的应用。
|
|
9
11
|
|
|
10
|
-
|
|
12
|
+
填写你想向组织用户显示的应用名称,选择你期望支持的账户类型,如果只支持内部用户请选择 `Accounts in this organizational directory only (Default Directory only - Single tenant)`。
|
|
11
13
|
|
|
12
|
-
|
|
14
|
+
在 `Redirect URI (optional)` 中,应用类型选择 `Web`,Callback URL, 处填写:
|
|
13
15
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
16
|
+
```bash
|
|
17
|
+
https://your-domain/api/auth/callback/azure-ad
|
|
18
|
+
```
|
|
17
19
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
<Callout type={'info'}>
|
|
21
|
+
- 可以在 Register 后再填写或修改 Redirect URIs,但是务必保证填写的 URL 与部署的 URL 一致。
|
|
22
|
+
- your-domain 请填写自己的域名
|
|
23
|
+
</Callout>
|
|
22
24
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
点击「Register」
|
|
25
|
+

|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
点击「Register」
|
|
28
28
|
|
|
29
|
-
|
|
29
|
+
创建成功后,点击相应的应用,进入应用详情页,切换到「Overview」标签页,就可以看到相应的配置信息。
|
|
30
30
|
|
|
31
|
-
|
|
31
|
+

|
|
32
32
|
|
|
33
|
-
|
|
33
|
+
进入「Certificates & secrets」,选择「Client secrets」标签,点击「New client secret」,填写描述,选择过期时间,点击「Add」,创建一个新的客户端密钥。
|
|
34
34
|
|
|
35
|
-
|
|
36
|
-
- 请务必保存好你的客户端密钥,因为这是你唯一的机会查看它。
|
|
37
|
-
</Callout>
|
|
35
|
+

|
|
38
36
|
|
|
37
|
+
=<Callout type={'info'}>请务必保存好你的客户端密钥,因为这是你唯一的机会查看它。</Callout>
|
|
39
38
|
|
|
40
|
-
|
|
39
|
+
### 新增用户
|
|
41
40
|
|
|
42
|
-
|
|
41
|
+
回到「Microsoft Entra ID」界面,进入「Users」,点击「New user」,填写用户信息,点击「Create」,创建用户以使用 LobeChat。
|
|
43
42
|
|
|
44
|
-
|
|
43
|
+
### 配置环境变量
|
|
45
44
|
|
|
46
|
-
|
|
45
|
+
在部署 LobeChat 时,你需要配置以下环境变量:
|
|
47
46
|
|
|
48
|
-
| 环境变量
|
|
49
|
-
|
|
|
50
|
-
| `ENABLE_OAUTH_SSO`
|
|
51
|
-
| `NEXTAUTH_SECRET`
|
|
52
|
-
| `SSO_PROVIDERS`
|
|
53
|
-
| `AZURE_AD_CLIENT_ID`
|
|
54
|
-
| `AZURE_AD_CLIENT_SECRET` | 必选
|
|
55
|
-
| `AZURE_AD_TENANT_ID`
|
|
56
|
-
| `ACCESS_CODE`
|
|
57
|
-
| `NEXTAUTH_URL`
|
|
47
|
+
| 环境变量 | 类型 | 描述 |
|
|
48
|
+
| --- | --- | --- |
|
|
49
|
+
| `ENABLE_OAUTH_SSO` | 必选 | 为 LobeChat 启用单点登录 (SSO)。设置为 `1` 以启用单点登录。 |
|
|
50
|
+
| `NEXTAUTH_SECRET` | 必选 | 用于加密 Auth.js 会话令牌的密钥。您可以使用以下命令生成秘钥: `openssl rand -base64 32` |
|
|
51
|
+
| `SSO_PROVIDERS` | 必选 | 选择 LoboChat 的单点登录提供商。使用 Microsoft Entra ID 请填写 `azure-ad`。 |
|
|
52
|
+
| `AZURE_AD_CLIENT_ID` | 必选 | Microsoft Entra ID 应用程序的 Client ID |
|
|
53
|
+
| `AZURE_AD_CLIENT_SECRET` | 必选 | Microsoft Entra ID 应用程序的 Client Secret |
|
|
54
|
+
| `AZURE_AD_TENANT_ID` | 必选 | Microsoft Entra ID 应用程序的 Tenant ID |
|
|
55
|
+
| `ACCESS_CODE` | 必选 | 添加访问此服务的密码,你可以设置一个足够长的随机密码以 “禁用” 访问码授权 |
|
|
56
|
+
| `NEXTAUTH_URL` | 可选 | 该 URL 用于指定 Auth.js 在执行 OAuth 验证时的回调地址,当默认生成的重定向地址发生不正确时才需要设置。`https://example.com/api/auth` |
|
|
58
57
|
|
|
59
|
-
前往 [环境变量](/zh/self-hosting/environment-variable#microsoft-entra-id)
|
|
58
|
+
<Callout type={'info'}> 前往 [📘 环境变量](/zh/self-hosting/environment-variable#microsoft-entra-id) 可查阅相关变量详情。</Callout>
|
|
60
59
|
</Steps>
|
|
61
60
|
|
|
62
|
-
<Callout
|
|
61
|
+
<Callout type={'info'}>
|
|
62
|
+
部署成功后,用户将可以使用 Microsoft Entra ID 中配置的用户通过身份认证并使用 LobeChat。
|
|
63
|
+
</Callout>
|
|
63
64
|
|
|
64
65
|
## 进阶配置
|
|
65
66
|
|
|
66
67
|
请在 [Microsoft Entra ID 学习中心][microsoft-learn-entra],做进一步探索。
|
|
67
68
|
|
|
68
|
-
|
|
69
69
|
## 相关资料
|
|
70
70
|
|
|
71
71
|
- [快速注册应用指导][microsoft-entra-register-app]
|
|
72
72
|
|
|
73
|
-
[microsoft-learn-entra]: https://learn.microsoft.com/en-us/entra/identity/
|
|
74
|
-
[microsoft-entra-register-app]: https://learn.microsoft.com/en-us/entra/identity-platform/quickstart-register-app
|
|
75
73
|
[microsoft-azure-portal]: https://portal.azure.com/
|
|
76
|
-
[microsoft-entra-
|
|
74
|
+
[microsoft-entra-register-app]: https://learn.microsoft.com/en-us/entra/identity-platform/quickstart-register-app
|
|
75
|
+
[microsoft-learn-entra]: https://learn.microsoft.com/en-us/entra/identity/
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import { Callout } from 'nextra/components';
|
|
2
|
-
|
|
3
1
|
# Model Service Providers
|
|
4
2
|
|
|
5
3
|
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.
|
|
@@ -163,6 +161,15 @@ When using the `turn` mode, the API Keys will be retrieved in a round-robin mann
|
|
|
163
161
|
- Default: -
|
|
164
162
|
- Example: `sk-ant-apixx-xxxxxxxxx-xxxxxxxxxxxxxxxxx-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx-xxxxxxxx`
|
|
165
163
|
|
|
164
|
+
## Groq AI
|
|
165
|
+
|
|
166
|
+
### `GROQ_API_KEY`
|
|
167
|
+
|
|
168
|
+
- Type: Required
|
|
169
|
+
- Description: This is the API key you applied from Groq AI
|
|
170
|
+
- Default: -
|
|
171
|
+
- Example: `gsk_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx`
|
|
172
|
+
|
|
166
173
|
## Mistral AI
|
|
167
174
|
|
|
168
175
|
### `MISTRAL_API_KEY`
|
|
@@ -172,6 +179,4 @@ When using the `turn` mode, the API Keys will be retrieved in a round-robin mann
|
|
|
172
179
|
- Default: -
|
|
173
180
|
- Example: `xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=`
|
|
174
181
|
|
|
175
|
-
|
|
176
182
|
[azure-api-verion-url]: https://docs.microsoft.com/zh-cn/azure/developer/javascript/api-reference/es-modules/azure-sdk/ai-translation/translationconfiguration?view=azure-node-latest#api-version
|
|
177
|
-
[openai-api-page]: https://platform.openai.com/account/api-keys
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import { Callout } from 'nextra/components';
|
|
2
|
-
|
|
3
1
|
# 模型服务商
|
|
4
2
|
|
|
5
3
|
LobeChat 在部署时提供了丰富的模型服务商相关的环境变量,你可以使用这些环境变量轻松定义需要在 LobeChat 中开启的模型服务商。
|
|
@@ -170,5 +168,13 @@ LobeChat 在部署时提供了丰富的模型服务商相关的环境变量,
|
|
|
170
168
|
- 默认值:-
|
|
171
169
|
- 示例:`xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=`
|
|
172
170
|
|
|
171
|
+
## Groq AI
|
|
172
|
+
|
|
173
|
+
### `GROQ_API_KEY`
|
|
174
|
+
|
|
175
|
+
- 类型:必选
|
|
176
|
+
- 描述:这是你在 Groq AI 服务中申请的 API 密钥
|
|
177
|
+
- 默认值:-
|
|
178
|
+
- 示例:`gsk_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx`
|
|
179
|
+
|
|
173
180
|
[azure-api-verion-url]: https://docs.microsoft.com/zh-cn/azure/developer/javascript/api-reference/es-modules/azure-sdk/ai-translation/translationconfiguration?view=azure-node-latest#api-version
|
|
174
|
-
[openai-api-page]: https://platform.openai.com/account/api-keys
|
|
@@ -6,12 +6,4 @@ Choose your favorite platform to get started.
|
|
|
6
6
|
|
|
7
7
|
LobeChat support multiple deployment platforms, including Vercel, Docker, and Docker Compose and so on, you can choose the deployment platform that suits you.
|
|
8
8
|
|
|
9
|
-
<PlatformCards
|
|
10
|
-
docker={'Docker'}
|
|
11
|
-
dockerCompose={'Docker Compose'}
|
|
12
|
-
netlify={'Netlify'}
|
|
13
|
-
repocloud={'RepoCloud'}
|
|
14
|
-
sealos={'SealOS'}
|
|
15
|
-
vercel={'Vercel'}
|
|
16
|
-
zeabur={'Zeabur'}
|
|
17
|
-
/>
|
|
9
|
+
<PlatformCards docker={'Docker'} dockerCompose={'Docker Compose'} netlify={'Netlify'} repocloud={'RepoCloud'} sealos={'SealOS'} vercel={'Vercel'} zeabur={'Zeabur'} />
|
|
@@ -39,4 +39,4 @@ In LobeChat's Assistant Market, creators can discover a vibrant and innovative c
|
|
|
39
39
|
| [Self-media Operation Expert](https://chat-preview.lobehub.com/market?agent=gl-zmtyy)<br /><sup>By **[guling-io](https://github.com/guling-io)** on **2024-02-14**</sup> | Proficient in self-media operation and content creation<br />`Self-media operation` `Social media` `Content creation` `Fan growth` `Brand promotion` |
|
|
40
40
|
| [Product Description](https://chat-preview.lobehub.com/market?agent=product-description)<br /><sup>By **[pllz7](https://github.com/pllz7)** on **2024-02-14**</sup> | Create captivating product descriptions to improve e-commerce sales performance<br />`E-commerce` |
|
|
41
41
|
|
|
42
|
-
> 📊 Total agents: [<kbd>**177**</kbd> ](https://github.com/lobehub/lobe-chat-agents)
|
|
42
|
+
> 📊 Total agents: [<kbd>**177**</kbd> ](https://github.com/lobehub/lobe-chat-agents)
|