@lobehub/chat 0.147.4 โ 0.147.6
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/authentication.mdx +5 -5
- package/docs/self-hosting/advanced/authentication.zh-CN.mdx +5 -5
- package/docs/self-hosting/advanced/sso-providers/auth0.mdx +1 -1
- package/docs/self-hosting/advanced/sso-providers/auth0.zh-CN.mdx +1 -1
- package/docs/self-hosting/advanced/sso-providers/authentik.mdx +2 -2
- package/docs/self-hosting/advanced/sso-providers/authentik.zh-CN.mdx +1 -1
- package/docs/self-hosting/advanced/sso-providers/github.mdx +1 -1
- package/docs/self-hosting/advanced/sso-providers/github.zh-CN.mdx +1 -1
- package/docs/self-hosting/advanced/sso-providers/microsoft-entra-id.mdx +1 -1
- package/docs/self-hosting/advanced/sso-providers/microsoft-entra-id.zh-CN.mdx +1 -1
- package/docs/self-hosting/advanced/sso-providers/zitadel.mdx +1 -1
- package/docs/self-hosting/advanced/sso-providers/zitadel.zh-CN.mdx +1 -1
- package/docs/self-hosting/examples/ollama.mdx +3 -3
- package/docs/self-hosting/examples/ollama.zh-CN.mdx +4 -4
- package/docs/self-hosting/platform/docker-compose.mdx +12 -11
- package/docs/self-hosting/platform/docker-compose.zh-CN.mdx +28 -26
- package/docs/self-hosting/platform/docker.mdx +1 -1
- package/docs/self-hosting/platform/docker.zh-CN.mdx +1 -1
- package/docs/self-hosting/platform/netlify.mdx +1 -1
- package/docs/self-hosting/platform/netlify.zh-CN.mdx +1 -1
- package/docs/self-hosting/platform/vercel.mdx +1 -1
- package/docs/self-hosting/platform/vercel.zh-CN.mdx +1 -1
- package/docs/usage/agents/custom-agent.mdx +2 -2
- package/docs/usage/agents/custom-agent.zh-CN.mdx +2 -2
- package/docs/usage/features/multi-ai-providers.mdx +1 -1
- package/docs/usage/features/multi-ai-providers.zh-CN.mdx +1 -1
- package/docs/usage/features/plugin-system.mdx +1 -1
- package/docs/usage/features/plugin-system.zh-CN.mdx +2 -2
- package/docs/usage/plugins/custom-plugin.mdx +1 -1
- package/docs/usage/plugins/custom-plugin.zh-CN.mdx +1 -1
- package/docs/usage/providers/ollama/gemma.mdx +2 -2
- package/docs/usage/providers/ollama/gemma.zh-CN.mdx +2 -2
- package/docs/usage/providers/ollama/qwen.mdx +2 -2
- package/docs/usage/providers/ollama/qwen.zh-CN.mdx +2 -2
- package/docs/usage/providers/ollama.mdx +1 -1
- package/docs/usage/providers/ollama.zh-CN.mdx +1 -1
- package/package.json +1 -1
- package/src/app/chat/features/TopicListContent/TopicSearchBar/index.tsx +6 -4
- package/src/config/modelProviders/mistral.ts +12 -6
- package/src/config/modelProviders/openai.ts +18 -3
- package/src/database/models/__tests__/topic.test.ts +26 -3
- package/src/database/models/topic.ts +8 -3
- package/src/libs/agent-runtime/openai/__snapshots__/index.test.ts.snap +0 -2
- package/src/libs/agent-runtime/openrouter/__snapshots__/index.test.ts.snap +1 -1
- package/src/libs/agent-runtime/utils/openaiCompatibleFactory/index.ts +1 -1
- package/src/services/__tests__/topic.test.ts +3 -3
- package/src/services/topic.ts +2 -2
- package/src/store/chat/slices/topic/action.ts +5 -4
- package/src/store/global/slices/settings/selectors/modelProvider.test.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,56 @@
|
|
|
2
2
|
|
|
3
3
|
# Changelog
|
|
4
4
|
|
|
5
|
+
### [Version 0.147.6](https://github.com/lobehub/lobe-chat/compare/v0.147.5...v0.147.6)
|
|
6
|
+
|
|
7
|
+
<sup>Released on **2024-04-11**</sup>
|
|
8
|
+
|
|
9
|
+
#### ๐ Styles
|
|
10
|
+
|
|
11
|
+
- **misc**: Add GPT-4-turbo and 2024-04-09 Turbo Vision model and mistral new model name.
|
|
12
|
+
|
|
13
|
+
<br/>
|
|
14
|
+
|
|
15
|
+
<details>
|
|
16
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
|
17
|
+
|
|
18
|
+
#### Styles
|
|
19
|
+
|
|
20
|
+
- **misc**: Add GPT-4-turbo and 2024-04-09 Turbo Vision model and mistral new model name, closes [#1984](https://github.com/lobehub/lobe-chat/issues/1984) ([f1795b1](https://github.com/lobehub/lobe-chat/commit/f1795b1))
|
|
21
|
+
|
|
22
|
+
</details>
|
|
23
|
+
|
|
24
|
+
<div align="right">
|
|
25
|
+
|
|
26
|
+
[](#readme-top)
|
|
27
|
+
|
|
28
|
+
</div>
|
|
29
|
+
|
|
30
|
+
### [Version 0.147.5](https://github.com/lobehub/lobe-chat/compare/v0.147.4...v0.147.5)
|
|
31
|
+
|
|
32
|
+
<sup>Released on **2024-04-11**</sup>
|
|
33
|
+
|
|
34
|
+
#### ๐ Bug Fixes
|
|
35
|
+
|
|
36
|
+
- **misc**: Fix only search topics in current session.
|
|
37
|
+
|
|
38
|
+
<br/>
|
|
39
|
+
|
|
40
|
+
<details>
|
|
41
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
|
42
|
+
|
|
43
|
+
#### What's fixed
|
|
44
|
+
|
|
45
|
+
- **misc**: Fix only search topics in current session, closes [#1834](https://github.com/lobehub/lobe-chat/issues/1834) ([9fdcfa4](https://github.com/lobehub/lobe-chat/commit/9fdcfa4))
|
|
46
|
+
|
|
47
|
+
</details>
|
|
48
|
+
|
|
49
|
+
<div align="right">
|
|
50
|
+
|
|
51
|
+
[](#readme-top)
|
|
52
|
+
|
|
53
|
+
</div>
|
|
54
|
+
|
|
5
55
|
### [Version 0.147.4](https://github.com/lobehub/lobe-chat/compare/v0.147.3...v0.147.4)
|
|
6
56
|
|
|
7
57
|
<sup>Released on **2024-04-11**</sup>
|
package/README.md
CHANGED
|
@@ -260,14 +260,14 @@ Our marketplace is not just a showcase platform but also a collaborative space.
|
|
|
260
260
|
|
|
261
261
|
<!-- AGENT LIST -->
|
|
262
262
|
|
|
263
|
-
| Recent Submits
|
|
264
|
-
|
|
|
265
|
-
| [
|
|
266
|
-
| [
|
|
267
|
-
| [
|
|
268
|
-
| [
|
|
269
|
-
|
|
270
|
-
> ๐ Total agents: [<kbd>**
|
|
263
|
+
| Recent Submits | Description |
|
|
264
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
265
|
+
| [Healthy Recipe Recommender](https://chat-preview.lobehub.com/market?agent=healthy-recipe-recommender)<br/><sup>By **[Greasen](https://github.com/Greasen)** on **2024-04-11**</sup> | Customized nutrition meals, scientific combinations, healthy eating, your personal nutritionist.<br/>`recipes` `fitness-meals` `nutrition-meals` |
|
|
266
|
+
| [SmartWeather Assistant](https://chat-preview.lobehub.com/market?agent=personal-weather-consultant)<br/><sup>By **[Greasen](https://github.com/Greasen)** on **2024-04-11**</sup> | SmartWeather Assistant, your personal weather advisor, fashion guide, and positive energy booster!<br/>`weather` `assistant` `fashion` |
|
|
267
|
+
| [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` |
|
|
268
|
+
| [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` |
|
|
269
|
+
|
|
270
|
+
> ๐ Total agents: [<kbd>**236**</kbd> ](https://github.com/lobehub/lobe-chat-agents)
|
|
271
271
|
|
|
272
272
|
<!-- AGENT LIST -->
|
|
273
273
|
|
package/README.zh-CN.md
CHANGED
|
@@ -248,14 +248,14 @@ LobeChat ็ๆไปถ็ๆ็ณป็ปๆฏๅ
ถๆ ธๅฟๅ่ฝ็้่ฆๆฉๅฑ๏ผๅฎๆๅคงๅฐ
|
|
|
248
248
|
|
|
249
249
|
<!-- AGENT LIST -->
|
|
250
250
|
|
|
251
|
-
| ๆ่ฟๆฐๅข
|
|
252
|
-
|
|
|
253
|
-
| [
|
|
254
|
-
| [
|
|
255
|
-
| [
|
|
256
|
-
| [
|
|
257
|
-
|
|
258
|
-
> ๐ Total agents: [<kbd>**
|
|
251
|
+
| ๆ่ฟๆฐๅข | ๅฉๆ่ฏดๆ |
|
|
252
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
253
|
+
| [ๅฅๅบท้ฃ่ฐฑๆจ่ๅธ](https://chat-preview.lobehub.com/market?agent=healthy-recipe-recommender)<br/><sup>By **[Greasen](https://github.com/Greasen)** on **2024-04-11**</sup> | ็ฒพๅๅฎๅถ่ฅๅ
ป้ค๏ผ็งๅญฆๆญ้
๏ผๅฅๅบท้ฅฎ้ฃ๏ผไฝ ็็งไบบ่ฅๅ
ปๅธใ<br/>`้ฃ่ฐฑใๅฅ่บซ้คใ่ฅๅ
ป้ค` |
|
|
254
|
+
| [ๆบ้ขๅฐๅฉๆ](https://chat-preview.lobehub.com/market?agent=personal-weather-consultant)<br/><sup>By **[Greasen](https://github.com/Greasen)** on **2024-04-11**</sup> | ๆบ้ขๅฐๅฉๆ๏ผๆจ็็งไบบๅคฉๆฐ้กพ้ฎ๏ผ็ฉฟๆญๆๅ๏ผๆญฃ่ฝ้ๅ ๆฒนๅจ๏ผ<br/>`ๅคฉๆฐ` `ๅฉ็ใ็ฉฟๆญ` |
|
|
255
|
+
| [่่ฏๅญฆไน ๅฉๆ](https://chat-preview.lobehub.com/market?agent=profanity-assistant)<br/><sup>By **[cokice](https://github.com/cokice)** on **2024-04-10**</sup> | ๆๅชไผ้ชไบบ ๅซ็้ฝไธไผ<br/>`ๅ็ญ` `่่ฏ` |
|
|
256
|
+
| [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` |
|
|
257
|
+
|
|
258
|
+
> ๐ Total agents: [<kbd>**236**</kbd> ](https://github.com/lobehub/lobe-chat-agents)
|
|
259
259
|
|
|
260
260
|
<!-- AGENT LIST -->
|
|
261
261
|
|
|
@@ -24,11 +24,11 @@ LobeChat supports the configuration of external identity verification services f
|
|
|
24
24
|
|
|
25
25
|
Currently supported identity verification services include:
|
|
26
26
|
|
|
27
|
-
- [Auth0](/
|
|
28
|
-
- [Microsoft Entra ID](/
|
|
29
|
-
- [Authentik](/
|
|
30
|
-
- [Github](/
|
|
31
|
-
- [ZITADEL](/
|
|
27
|
+
- [Auth0](/docs/self-hosting/advanced/sso-providers/auth0)
|
|
28
|
+
- [Microsoft Entra ID](/docs/self-hosting/advanced/sso-providers/microsoft-entra-id)
|
|
29
|
+
- [Authentik](/docs/self-hosting/advanced/sso-providers/authentik)
|
|
30
|
+
- [Github](/docs/self-hosting/advanced/sso-providers/github)
|
|
31
|
+
- [ZITADEL](/docs/self-hosting/advanced/sso-providers/zitadel)
|
|
32
32
|
|
|
33
33
|
Click on the links to view the corresponding platform's configuration documentation.
|
|
34
34
|
|
|
@@ -20,11 +20,11 @@ LobeChat ๆฏๆ้
็ฝฎๅค้จ่บซไปฝ้ช่ฏๆๅก๏ผไพไผไธ / ็ป็ปๅ
้จไฝฟ็จ
|
|
|
20
20
|
|
|
21
21
|
็ฎๅๆฏๆ็่บซไปฝ้ช่ฏๆๅกๆ๏ผ
|
|
22
22
|
|
|
23
|
-
- [Auth0](/
|
|
24
|
-
- [Microsoft Entra ID](/
|
|
25
|
-
- [Authentik](/
|
|
26
|
-
- [Github](/
|
|
27
|
-
- [ZITADEL](/
|
|
23
|
+
- [Auth0](/docs/self-hosting/advanced/sso-providers/auth0)
|
|
24
|
+
- [Microsoft Entra ID](/docs/self-hosting/advanced/sso-providers/microsoft-entra-id)
|
|
25
|
+
- [Authentik](/docs/self-hosting/advanced/sso-providers/authentik)
|
|
26
|
+
- [Github](/docs/self-hosting/advanced/sso-providers/github)
|
|
27
|
+
- [ZITADEL](/docs/self-hosting/advanced/sso-providers/zitadel)
|
|
28
28
|
|
|
29
29
|
็นๅป้พๆฅๅฏไปฅๆฅ็ๅฏนๅบๅนณๅฐ็้
็ฝฎๆๆกฃใ
|
|
30
30
|
|
|
@@ -86,7 +86,7 @@ When deploying LobeChat, you need to configure the following environment variabl
|
|
|
86
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` |
|
|
87
87
|
|
|
88
88
|
<Callout type={'tip'}>
|
|
89
|
-
You can refer to the related variable details at [๐Environment Variables](/
|
|
89
|
+
You can refer to the related variable details at [๐Environment Variables](/docs/self-hosting/environment-variable#auth0).
|
|
90
90
|
|
|
91
91
|
</Callout>
|
|
92
92
|
</Steps>
|
|
@@ -81,7 +81,7 @@ http(s)://your-domain/api/auth/callback/auth0
|
|
|
81
81
|
| `NEXTAUTH_URL` | ๅฏ้ | ่ฏฅ URL ็จไบๆๅฎ Auth.js ๅจๆง่ก OAuth ้ช่ฏๆถ็ๅ่ฐๅฐๅ๏ผๅฝ้ป่ฎค็ๆ็้ๅฎๅๅฐๅๅ็ไธๆญฃ็กฎๆถๆ้่ฆ่ฎพ็ฝฎใ`https://example.com/api/auth` |
|
|
82
82
|
|
|
83
83
|
<Callout type={'tip'}>
|
|
84
|
-
ๅๅพ [๐ ็ฏๅขๅ้](/
|
|
84
|
+
ๅๅพ [๐ ็ฏๅขๅ้](/docs/self-hosting/environment-variable#auth0) ๅฏๆฅ้
็ธๅ
ณๅ้่ฏฆๆ
ใ
|
|
85
85
|
|
|
86
86
|
</Callout>
|
|
87
87
|
</Steps>
|
|
@@ -37,7 +37,7 @@ https://your-domain/api/auth/callback/authentik
|
|
|
37
37
|
<Image
|
|
38
38
|
alt="Create Authentik Provider"
|
|
39
39
|
inStep
|
|
40
|
-
src="https://github.com/lobehub/lobe-chat/assets/67304509/4244634e-5f68-48d5-aac0-e5f4b06d1c4b
|
|
40
|
+
src="https://github.com/lobehub/lobe-chat/assets/67304509/4244634e-5f68-48d5-aac0-e5f4b06d1c4b"
|
|
41
41
|
/>
|
|
42
42
|
|
|
43
43
|
Click **Done**
|
|
@@ -64,7 +64,7 @@ When deploying LobeChat, you need to configure the following environment variabl
|
|
|
64
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` |
|
|
65
65
|
|
|
66
66
|
<Callout type={'tip'}>
|
|
67
|
-
Go to Environment Variables
|
|
67
|
+
Go to [๐ Environment Variables](/docs/self-hosting/environment-variable#Authentik) for details about the variables.
|
|
68
68
|
|
|
69
69
|
</Callout>
|
|
70
70
|
</Steps>
|
|
@@ -59,7 +59,7 @@ https://your-domain/api/auth/callback/authentik
|
|
|
59
59
|
| `NEXTAUTH_URL` | ๅฏ้ | ่ฏฅ URL ็จไบๆๅฎ Auth.js ๅจๆง่ก OAuth ้ช่ฏๆถ็ๅ่ฐๅฐๅ๏ผๅฝ้ป่ฎค็ๆ็้ๅฎๅๅฐๅๅ็ไธๆญฃ็กฎๆถๆ้่ฆ่ฎพ็ฝฎใ`https://example.com/api/auth` |
|
|
60
60
|
|
|
61
61
|
<Callout type={'tip'}>
|
|
62
|
-
ๅๅพ [๐ ็ฏๅขๅ้](/
|
|
62
|
+
ๅๅพ [๐ ็ฏๅขๅ้](/docs/self-hosting/environment-variable#Authentik) ๅฏๆฅ้
็ธๅ
ณๅ้่ฏฆๆ
ใ
|
|
63
63
|
|
|
64
64
|
</Callout>
|
|
65
65
|
</Steps>
|
|
@@ -91,7 +91,7 @@ When deploying LobeChat, you need to configure the following environment variabl
|
|
|
91
91
|
| `NEXTAUTH_URL` | Optional | This URL is used to specify the callback address for Auth.js when performing OAuth authentication. Only set it if the default generated redirect address is incorrect. `https://example.com/api/auth` |
|
|
92
92
|
|
|
93
93
|
<Callout type={'tip'}>
|
|
94
|
-
Go to [๐ Environment Variables](/
|
|
94
|
+
Go to [๐ Environment Variables](/docs/self-hosting/environment-variable#Github) for detailed
|
|
95
95
|
information on these variables.
|
|
96
96
|
</Callout>
|
|
97
97
|
</Steps>
|
|
@@ -87,7 +87,7 @@ tags:
|
|
|
87
87
|
| `NEXTAUTH_URL` | ๅฏ้ | ่ฏฅ URL ็จไบๆๅฎ Auth.js ๅจๆง่ก OAuth ้ช่ฏๆถ็ๅ่ฐๅฐๅ๏ผๅฝ้ป่ฎค็ๆ็้ๅฎๅๅฐๅๅ็ไธๆญฃ็กฎๆถๆ้่ฆ่ฎพ็ฝฎใ`https://example.com/api/auth` |
|
|
88
88
|
|
|
89
89
|
<Callout type={'tip'}>
|
|
90
|
-
ๅๅพ [๐ ็ฏๅขๅ้](/
|
|
90
|
+
ๅๅพ [๐ ็ฏๅขๅ้](/docs/self-hosting/environment-variable#Github) ๅฏๆฅ้
็ธๅ
ณๅ้่ฏฆๆ
ใ
|
|
91
91
|
|
|
92
92
|
</Callout>
|
|
93
93
|
</Steps>
|
|
@@ -82,7 +82,7 @@ When deploying LobeChat, you need to configure the following environment variabl
|
|
|
82
82
|
|
|
83
83
|
<Callout type={'tip'}>
|
|
84
84
|
You can refer to [๐ environment
|
|
85
|
-
variables](/
|
|
85
|
+
variables](/docs/self-hosting/environment-variable#microsoft-entra-id) for details on related
|
|
86
86
|
variables.
|
|
87
87
|
</Callout>
|
|
88
88
|
|
|
@@ -78,7 +78,7 @@ https://your-domain/api/auth/callback/azure-ad
|
|
|
78
78
|
| `NEXTAUTH_URL` | ๅฏ้ | ่ฏฅ URL ็จไบๆๅฎ Auth.js ๅจๆง่ก OAuth ้ช่ฏๆถ็ๅ่ฐๅฐๅ๏ผๅฝ้ป่ฎค็ๆ็้ๅฎๅๅฐๅๅ็ไธๆญฃ็กฎๆถๆ้่ฆ่ฎพ็ฝฎใ`https://example.com/api/auth` |
|
|
79
79
|
|
|
80
80
|
<Callout type={'tip'}>
|
|
81
|
-
ๅๅพ [๐ ็ฏๅขๅ้](/
|
|
81
|
+
ๅๅพ [๐ ็ฏๅขๅ้](/docs/self-hosting/environment-variable#microsoft-entra-id) ๅฏๆฅ้
็ธๅ
ณๅ้่ฏฆๆ
ใ
|
|
82
82
|
|
|
83
83
|
</Callout>
|
|
84
84
|
</Steps>
|
|
@@ -99,7 +99,7 @@ When deploying LobeChat, you need to configure the following environment variabl
|
|
|
99
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` |
|
|
100
100
|
|
|
101
101
|
<Callout type={'tip'}>
|
|
102
|
-
You can refer to the related variable details at [๐Environment Variables](/
|
|
102
|
+
You can refer to the related variable details at [๐Environment Variables](/docs/self-hosting/environment-variables/auth#zitadel).
|
|
103
103
|
|
|
104
104
|
</Callout>
|
|
105
105
|
</Steps>
|
|
@@ -95,7 +95,7 @@ http(s)://your-domain/api/auth/callback/zitadel
|
|
|
95
95
|
| `NEXTAUTH_URL` | ๅฏ้ | ่ฏฅ URL ็จไบๆๅฎ Auth.js ไธญๆง่ก OAuth ่ฎค่ฏ็ๅ่ฐๅฐๅใไป
ๅฝ้ป่ฎคๅฐๅไธๆญฃ็กฎๆถๆ้่ฆ่ฎพ็ฝฎใ`https://example.com/api/auth` |
|
|
96
96
|
|
|
97
97
|
<Callout type={'tip'}>
|
|
98
|
-
ๆจๅฏไปฅๅจ [๐ ็ฏๅขๅ้](/
|
|
98
|
+
ๆจๅฏไปฅๅจ [๐ ็ฏๅขๅ้](/docs/self-hosting/environment-variables/auth#zitadel) ไธญๆฅ็็ธๅ
ณๅ้็่ฏฆ็ปไฟกๆฏใ
|
|
99
99
|
|
|
100
100
|
</Callout>
|
|
101
101
|
</Steps>
|
|
@@ -38,9 +38,9 @@ For more information on using Ollama in LobeChat, please refer to [Ollama Usage]
|
|
|
38
38
|
|
|
39
39
|
## Accessing Ollama from Non-Local Locations
|
|
40
40
|
|
|
41
|
-
When you first initiate Ollama, it is configured to allow access only from the local machine. To enable access from other domains and set up port listening, you will need to adjust the environment variables accordingly.
|
|
41
|
+
When you first initiate Ollama, it is configured to allow access only from the local machine. To enable access from other domains and set up port listening, you will need to adjust the environment variables `OLLAMA_ORIGINS` and `OLLAMA_HOST` accordingly.
|
|
42
42
|
```
|
|
43
43
|
set OLLAMA_ORIGINS=*
|
|
44
|
-
set OLLAMA_HOST
|
|
44
|
+
set OLLAMA_HOST=:11434
|
|
45
45
|
```
|
|
46
|
-
For further guidance on configuration, consult the [Ollama Official Documentation](https://
|
|
46
|
+
For further guidance on configuration, consult the [Ollama Official Documentation](https://github.com/ollama/ollama/blob/main/docs/faq.md#how-do-i-configure-ollama-server).
|
|
@@ -30,13 +30,13 @@ docker run -d -p 3210:3210 -e OLLAMA_PROXY_URL=http://host.docker.internal:11434
|
|
|
30
30
|
|
|
31
31
|
ๆฅไธๆฅ๏ผไฝ ๅฐฑๅฏไปฅไฝฟ็จ LobeChat ไธๆฌๅฐ LLM ๅฏน่ฏไบใ
|
|
32
32
|
|
|
33
|
-
ๅ
ณไบๅจ LobeChat ไธญไฝฟ็จ Ollama ็ๆดๅคไฟกๆฏ๏ผ่ฏทๆฅ้
[Ollama ไฝฟ็จ](/
|
|
33
|
+
ๅ
ณไบๅจ LobeChat ไธญไฝฟ็จ Ollama ็ๆดๅคไฟกๆฏ๏ผ่ฏทๆฅ้
[Ollama ไฝฟ็จ](/docs/usage/providers/ollama)ใ
|
|
34
34
|
|
|
35
35
|
## ้ๆฌๅฐ่ฎฟ้ฎ Ollama
|
|
36
36
|
|
|
37
|
-
็ฑไบ Ollama
|
|
37
|
+
็ฑไบ Ollama ้ป่ฎคๅๆฐๅจๅฏๅจๆถ่ฎพ็ฝฎไบไป
ๆฌๅฐ่ฎฟ้ฎ๏ผๆไปฅ่ทจๅ่ฎฟ้ฎไปฅๅ็ซฏๅฃ็ๅฌ้่ฆ่ฟ่ก้ขๅค็็ฏๅขๅ้่ฎพ็ฝฎ `OLLAMA_ORIGINS` ๅ `OLLAMA_HOST`ใ
|
|
38
38
|
```
|
|
39
39
|
set OLLAMA_ORIGINS=*
|
|
40
|
-
set OLLAMA_HOST
|
|
40
|
+
set OLLAMA_HOST=:11434
|
|
41
41
|
```
|
|
42
|
-
่ฏฆ็ป้
็ฝฎๆนๆณๅฏไปฅๅ่ [Ollama ๅฎๆนๆๆกฃ](https://
|
|
42
|
+
่ฏฆ็ป้
็ฝฎๆนๆณๅฏไปฅๅ่ [Ollama ๅฎๆนๆๆกฃ](https://github.com/ollama/ollama/blob/main/docs/faq.md#how-do-i-configure-ollama-server)ใ
|
|
@@ -15,7 +15,8 @@ tags:
|
|
|
15
15
|
# Docker Compose Deployment Guide
|
|
16
16
|
|
|
17
17
|
<div style={{display:"flex", gap: 4}}>
|
|
18
|
-
|
|
18
|
+
|
|
19
|
+
[![][docker-release-shield]][docker-release-link]
|
|
19
20
|
|
|
20
21
|
[![][docker-size-shield]][docker-size-link]
|
|
21
22
|
|
|
@@ -26,29 +27,29 @@ tags:
|
|
|
26
27
|
We provide a [Docker image][docker-release-link] for deploying the LobeChat service on your private device.
|
|
27
28
|
|
|
28
29
|
<Steps>
|
|
29
|
-
|
|
30
|
+
|
|
30
31
|
### Install Docker Container Environment
|
|
31
32
|
|
|
32
33
|
(Skip this step if already installed)
|
|
33
34
|
|
|
34
35
|
<Tabs items={['Ubuntu', 'CentOS']}>
|
|
35
|
-
|
|
36
|
+
|
|
36
37
|
<Tab>
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
38
|
+
|
|
39
|
+
```fish
|
|
40
|
+
$ apt install docker.io
|
|
41
|
+
```
|
|
42
|
+
|
|
42
43
|
</Tab>
|
|
43
44
|
|
|
44
45
|
<Tab>
|
|
45
|
-
|
|
46
|
+
|
|
46
47
|
```fish
|
|
47
48
|
$ yum install docker
|
|
48
49
|
```
|
|
49
|
-
|
|
50
|
+
|
|
50
51
|
</Tab>
|
|
51
|
-
|
|
52
|
+
|
|
52
53
|
</Tabs>
|
|
53
54
|
|
|
54
55
|
### Run Docker Compose Deployment Command
|
|
@@ -12,7 +12,8 @@ tags:
|
|
|
12
12
|
# Docker Compose ้จ็ฝฒๆๅผ
|
|
13
13
|
|
|
14
14
|
<div style={{display:"flex", gap: 4}}>
|
|
15
|
-
|
|
15
|
+
|
|
16
|
+
[![][docker-release-shield]][docker-release-link]
|
|
16
17
|
|
|
17
18
|
[![][docker-size-shield]][docker-size-link]
|
|
18
19
|
|
|
@@ -23,7 +24,8 @@ tags:
|
|
|
23
24
|
ๆไปฌๆไพไบ [Docker ้ๅ][docker-release-link]๏ผไพไฝ ๅจ่ชๅทฑ็็งๆ่ฎพๅคไธ้จ็ฝฒ LobeChat ๆๅกใ
|
|
24
25
|
|
|
25
26
|
<Steps>
|
|
26
|
-
|
|
27
|
+
|
|
28
|
+
### ๅฎ่ฃ
Docker ๅฎนๅจ็ฏๅข
|
|
27
29
|
|
|
28
30
|
๏ผๅฆๆๅทฒๅฎ่ฃ
๏ผ่ฏท่ทณ่ฟๆญคๆญฅ๏ผ
|
|
29
31
|
|
|
@@ -55,16 +57,16 @@ $ yum install docker
|
|
|
55
57
|
version: '3.8'
|
|
56
58
|
|
|
57
59
|
services:
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
60
|
+
lobe-chat:
|
|
61
|
+
image: lobehub/lobe-chat
|
|
62
|
+
container_name: lobe-chat
|
|
63
|
+
restart: always
|
|
64
|
+
ports:
|
|
65
|
+
- '3210:3210'
|
|
66
|
+
environment:
|
|
67
|
+
OPENAI_API_KEY: sk-xxxx
|
|
68
|
+
OPENAI_PROXY_URL: https://api-proxy.com/v1
|
|
69
|
+
ACCESS_CODE: lobe66
|
|
68
70
|
```
|
|
69
71
|
|
|
70
72
|
่ฟ่กไปฅไธๅฝไปคๅฏๅจ Lobe Chat ๆๅก๏ผ
|
|
@@ -81,48 +83,48 @@ $ docker-compose up -d
|
|
|
81
83
|
#!/bin/bash
|
|
82
84
|
# auto-update-lobe-chat.sh
|
|
83
85
|
|
|
84
|
-
#
|
|
86
|
+
# Set proxy (optional)
|
|
85
87
|
export https_proxy=http://127.0.0.1:7890 http_proxy=http://127.0.0.1:7890 all_proxy=socks5://127.0.0.1:7890
|
|
86
88
|
|
|
87
|
-
#
|
|
89
|
+
# Pull the latest image and store the output in a variable
|
|
88
90
|
output=$(docker pull lobehub/lobe-chat:latest 2>&1)
|
|
89
91
|
|
|
90
|
-
#
|
|
92
|
+
# Check if the pull command was executed successfully
|
|
91
93
|
if [ $? -ne 0 ]; then
|
|
92
|
-
|
|
94
|
+
exit 1
|
|
93
95
|
fi
|
|
94
96
|
|
|
95
|
-
#
|
|
97
|
+
# Check if the output contains a specific string
|
|
96
98
|
echo "$output" | grep -q "Image is up to date for lobehub/lobe-chat:latest"
|
|
97
99
|
|
|
98
|
-
#
|
|
100
|
+
# If the image is already up to date, do nothing
|
|
99
101
|
if [ $? -eq 0 ]; then
|
|
100
|
-
|
|
102
|
+
exit 0
|
|
101
103
|
fi
|
|
102
104
|
|
|
103
105
|
echo "Detected Lobe-Chat update"
|
|
104
106
|
|
|
105
|
-
#
|
|
107
|
+
# Remove the old container
|
|
106
108
|
echo "Removed: $(docker rm -f Lobe-Chat)"
|
|
107
109
|
|
|
108
|
-
#
|
|
110
|
+
# You may need to navigate to the directory where `docker-compose.yml` is located first
|
|
109
111
|
# cd /path/to/docker-compose-folder
|
|
110
112
|
|
|
111
|
-
#
|
|
113
|
+
# Run the new container
|
|
112
114
|
echo "Started: $(docker-compose up)"
|
|
113
115
|
|
|
114
|
-
#
|
|
116
|
+
# Print the update time and version
|
|
115
117
|
echo "Update time: $(date)"
|
|
116
118
|
echo "Version: $(docker inspect lobehub/lobe-chat:latest | grep 'org.opencontainers.image.version' | awk -F'"' '{print $4}')"
|
|
117
119
|
|
|
118
|
-
#
|
|
120
|
+
# Clean up unused images
|
|
119
121
|
docker images | grep 'lobehub/lobe-chat' | grep -v 'latest' | awk '{print $3}' | xargs -r docker rmi > /dev/null 2>&1
|
|
120
122
|
echo "Removed old images."
|
|
121
123
|
```
|
|
122
124
|
|
|
123
|
-
|
|
125
|
+
This script can also be used in Crontab, but ensure that your Crontab can find the correct Docker command. It is recommended to use absolute paths.
|
|
124
126
|
|
|
125
|
-
|
|
127
|
+
Configure Crontab to execute the script every 5 minutes:
|
|
126
128
|
|
|
127
129
|
```bash
|
|
128
130
|
*/5 * * * * /path/to/auto-update-lobe-chat.sh >> /path/to/auto-update-lobe-chat.log 2>&1
|
|
@@ -64,7 +64,7 @@ Command explanation:
|
|
|
64
64
|
|
|
65
65
|
- Replace `sk-xxxx` in the above command with your OpenAI API Key.
|
|
66
66
|
|
|
67
|
-
- For the complete list of environment variables supported by LobeChat, please refer to the [Environment Variables](/
|
|
67
|
+
- For the complete list of environment variables supported by LobeChat, please refer to the [Environment Variables](/docs/self-hosting/environment-ariable) section.
|
|
68
68
|
|
|
69
69
|
<Callout type="tip">
|
|
70
70
|
Since the official Docker image build takes about half an hour, if you see the "update available"
|
|
@@ -63,7 +63,7 @@ $ docker run -d -p 3210:3210 \
|
|
|
63
63
|
- ไฝฟ็จไฝ ็ OpenAI API Key ๆฟๆขไธ่ฟฐๅฝไปคไธญ็ `sk-xxxx`
|
|
64
64
|
|
|
65
65
|
<Callout type={'tip'}>
|
|
66
|
-
LobeChat ๆฏๆ็ๅฎๆด็ฏๅขๅ้ๅ่กจ่ฏทๅ่ [๐ ็ฏๅขๅ้](/
|
|
66
|
+
LobeChat ๆฏๆ็ๅฎๆด็ฏๅขๅ้ๅ่กจ่ฏทๅ่ [๐ ็ฏๅขๅ้](/docs/self-hosting/environment-variables) ้จๅ
|
|
67
67
|
</Callout>
|
|
68
68
|
|
|
69
69
|
<Callout>
|
|
@@ -92,7 +92,7 @@ Taking OpenAI as an example, the environment variables you need to add are as fo
|
|
|
92
92
|
|
|
93
93
|
<Callout type={'tip'}>
|
|
94
94
|
For a complete list of environment variables supported by LobeChat, please refer to the [๐
|
|
95
|
-
Environment Variables](/
|
|
95
|
+
Environment Variables](/docs/self-hosting/environment-variables)
|
|
96
96
|
</Callout>
|
|
97
97
|
|
|
98
98
|
Afteradding the variables, finally click "Deploy lobe-chat" to enter the deployment phase
|
|
@@ -86,7 +86,7 @@ tags:
|
|
|
86
86
|
| `OPENAI_PROXY_URL` | ๅฏ้ | ๅฆๆไฝ ๆๅจ้
็ฝฎไบ OpenAI ๆฅๅฃไปฃ็๏ผๅฏไปฅไฝฟ็จๆญค้
็ฝฎ้กนๆฅ่ฆ็้ป่ฎค็ OpenAI API ่ฏทๆฑๅบ็ก URL | `https://aihubmix.com/v1` ๏ผ้ป่ฎคๅผ๏ผ`https://api.openai.com/v1` |
|
|
87
87
|
|
|
88
88
|
<Callout type={'tip'}>
|
|
89
|
-
LobeChat ๆฏๆ็ๅฎๆด็ฏๅขๅ้ๅ่กจ่ฏทๅ่ [๐ ็ฏๅขๅ้](/
|
|
89
|
+
LobeChat ๆฏๆ็ๅฎๆด็ฏๅขๅ้ๅ่กจ่ฏทๅ่ [๐ ็ฏๅขๅ้](/docs/self-hosting/environment-variables) ้จๅ
|
|
90
90
|
</Callout>
|
|
91
91
|
|
|
92
92
|
ๆทปๅ ๅฎๆๅ๏ผๆๅ็นๅปใDeploy lobe-chatใ ่ฟๅ
ฅ้จ็ฝฒ้ถๆฎตใ
|
|
@@ -41,7 +41,7 @@ Vercel's assigned domain DNS may be polluted in some regions, so binding a custo
|
|
|
41
41
|
If you have deployed your project using the one-click deployment steps mentioned above, you may find that you are always prompted with "updates available." This is because Vercel creates a new project for you by default instead of forking this project, which causes the inability to accurately detect updates.
|
|
42
42
|
|
|
43
43
|
<Callout>
|
|
44
|
-
We recommend following the [Self-Hosting Upstream Sync](/
|
|
44
|
+
We recommend following the [Self-Hosting Upstream Sync](/docs/self-hosting/upstream-sync) steps to
|
|
45
45
|
Redeploy.
|
|
46
46
|
</Callout>
|
|
47
47
|
|
|
@@ -40,7 +40,7 @@ Vercel ๅ้
็ๅๅ DNS ๅจๆไบๅบๅ่ขซๆฑกๆไบ๏ผ็ปๅฎ่ชๅฎไนๅๅ
|
|
|
40
40
|
ๅฆๆไฝ ๆ นๆฎไธ่ฟฐไธญ็ไธ้ฎ้จ็ฝฒๆญฅ้ชค้จ็ฝฒไบ่ชๅทฑ็้กน็ฎ๏ผไฝ ๅฏ่ฝไผๅ็ฐๆปๆฏ่ขซๆ็คบ โๆๅฏ็จๆดๆฐโใ่ฟๆฏๅ ไธบ Vercel ้ป่ฎคไธบไฝ ๅๅปบๆฐ้กน็ฎ่้ fork ๆฌ้กน็ฎ๏ผ่ฟๅฐๅฏผ่ดๆ ๆณๅ็กฎๆฃๆตๆดๆฐใ
|
|
41
41
|
|
|
42
42
|
<Callout>
|
|
43
|
-
ๆไปฌๅปบ่ฎฎๆ็
ง [๐ LobeChat ่ช้จ็ฝฒไฟๆๆดๆฐ](/
|
|
43
|
+
ๆไปฌๅปบ่ฎฎๆ็
ง [๐ LobeChat ่ช้จ็ฝฒไฟๆๆดๆฐ](/docs/self-hosting/advanced/upstream-sync) ๆญฅ้ชค้ๆฐ้จ็ฝฒใ
|
|
44
44
|
</Callout>
|
|
45
45
|
|
|
46
46
|
[deploy-button-image]: https://vercel.com/button
|
|
@@ -52,7 +52,7 @@ When you need to handle specific tasks, you need to consider creating a custom a
|
|
|
52
52
|
If you want to understand Prompt writing tips and common model parameter settings, you can continue to view:
|
|
53
53
|
|
|
54
54
|
<Cards>
|
|
55
|
-
<Card href={'/
|
|
55
|
+
<Card href={'/docs/usage/agents/prompt'} title={'Prompt User Guide'} />
|
|
56
56
|
|
|
57
|
-
<Card href={'/
|
|
57
|
+
<Card href={'/docs/usage/agents/model'} title={'Large Language Model User Guide'} />
|
|
58
58
|
</Cards>
|
|
@@ -47,7 +47,7 @@ tags:
|
|
|
47
47
|
ๅฆๆไฝ ๅธๆ็่งฃ Prompt ็ผๅๆๅทงๅๅธธ่ง็ๆจกๅๅๆฐ่ฎพ็ฝฎ๏ผๅฏไปฅ็ปง็ปญๆฅ็๏ผ
|
|
48
48
|
|
|
49
49
|
<Cards>
|
|
50
|
-
<Card href={'/
|
|
50
|
+
<Card href={'/docs/usage/agents/prompt'} title={'Prompt ไฝฟ็จๆๅ'} />
|
|
51
51
|
|
|
52
|
-
<Card href={'/
|
|
52
|
+
<Card href={'/docs/usage/agents/model'} title={'ๅคง่ฏญ่จๆจกๅไฝฟ็จๆๅ'} />
|
|
53
53
|
</Cards>
|
|
@@ -55,4 +55,4 @@ At the same time, we are also planning to support more model service providers,
|
|
|
55
55
|
src={'https://github.com/lobehub/lobe-chat/assets/28616219/ca9a21bc-ea6c-4c90-bf4a-fa53b4fb2b5c'}
|
|
56
56
|
/>
|
|
57
57
|
|
|
58
|
-
To meet the specific needs of users, LobeChat also supports the use of local models based on [Ollama](https://ollama.ai), allowing users to flexibly use their own or third-party models. For more details, see [Local Model Support](/
|
|
58
|
+
To meet the specific needs of users, LobeChat also supports the use of local models based on [Ollama](https://ollama.ai), allowing users to flexibly use their own or third-party models. For more details, see [Local Model Support](/docs/usage/features/local-llm).
|
|
@@ -55,4 +55,4 @@ tags:
|
|
|
55
55
|
src={'https://github.com/lobehub/lobe-chat/assets/28616219/ca9a21bc-ea6c-4c90-bf4a-fa53b4fb2b5c'}
|
|
56
56
|
/>
|
|
57
57
|
|
|
58
|
-
ไธบไบๆปก่ถณ็นๅฎ็จๆท็้ๆฑ๏ผLobeChat ่ฟๅบไบ [Ollama](https://ollama.ai) ๆฏๆไบๆฌๅฐๆจกๅ็ไฝฟ็จ๏ผ่ฎฉ็จๆท่ฝๅคๆด็ตๆดปๅฐไฝฟ็จ่ชๅทฑ็ๆ็ฌฌไธๆน็ๆจกๅ๏ผ่ฏฆ่ง [ๆฌๅฐๆจกๅๆฏๆ](/
|
|
58
|
+
ไธบไบๆปก่ถณ็นๅฎ็จๆท็้ๆฑ๏ผLobeChat ่ฟๅบไบ [Ollama](https://ollama.ai) ๆฏๆไบๆฌๅฐๆจกๅ็ไฝฟ็จ๏ผ่ฎฉ็จๆท่ฝๅคๆด็ตๆดปๅฐไฝฟ็จ่ชๅทฑ็ๆ็ฌฌไธๆน็ๆจกๅ๏ผ่ฏฆ่ง [ๆฌๅฐๆจกๅๆฏๆ](/docs/usage/features/local-llm)ใ
|
|
@@ -52,7 +52,7 @@ Learn more about [plugin usage](/en-US/usage/plugins/basic) by checking it out.
|
|
|
52
52
|
|
|
53
53
|
<Callout>
|
|
54
54
|
If you are interested in plugin development, please refer to our [๐ Plugin Development
|
|
55
|
-
Guide](/
|
|
55
|
+
Guide](/docs/usage/plugins/development) in the Wiki.
|
|
56
56
|
</Callout>
|
|
57
57
|
|
|
58
58
|
- [lobe-chat-plugins][lobe-chat-plugins]: This is the plugin index for LobeChat. It retrieves the list of plugins from the index.json of this repository and displays them to the users.
|
|
@@ -27,7 +27,7 @@ LobeChat ็ๆไปถ็ๆ็ณป็ปๆฏๅ
ถๆ ธๅฟๅ่ฝ็้่ฆๆฉๅฑ๏ผๅฎๆๅคงๅฐ
|
|
|
27
27
|
|
|
28
28
|
ๆญคๅค๏ผ่ฟไบๆไปถไธไป
ๅฑ้ไบๆฐ้ป่ๅ๏ผ่ฟๅฏไปฅๆฉๅฑๅฐๅ
ถไปๅฎ็จ็ๅ่ฝ๏ผๅฆๅฟซ้ๆฃ็ดขๆๆกฃใ็ๆๅพ็ใ่ทๅ Bilibili ใSteam ็ญๅ็งๅนณๅฐๆฐๆฎ๏ผไปฅๅไธๅ
ถไปๅๅผๅๆ ท็็ฌฌไธๆนๆๅกไบคไบใ
|
|
29
29
|
|
|
30
|
-
้่ฟๆฅ็ [ๆไปถไฝฟ็จ](/
|
|
30
|
+
้่ฟๆฅ็ [ๆไปถไฝฟ็จ](/docs/usage/plugins/basic) ไบ่งฃๆดๅคใ
|
|
31
31
|
|
|
32
32
|
<Callout type={'tip'}>
|
|
33
33
|
ไธบไบๅธฎๅฉๅผๅ่
ๆดๅฅฝๅฐๅไธๅฐ่ฟไธช็ๆไธญๆฅ๏ผๆไปฌๅจๆไพไบๅ
จ้ข็ๅผๅ่ตๆบใ่ฟๅ
ๆฌ่ฏฆๅฐฝ็็ปไปถๅผๅๆๆกฃใๅ่ฝ้ฝๅ
จ็่ฝฏไปถๅผๅๅทฅๅ
ทๅ
๏ผSDK๏ผ๏ผไปฅๅๆ ทๆฟ็คบไพ๏ผ่ฟไบ้ฝๆฏไธบไบ็ฎๅๅผๅ่ฟ็จ๏ผ้ไฝๅผๅ่
็ๅ
ฅ้จ้จๆงใ
|
|
@@ -40,7 +40,7 @@ LobeChat ็ๆไปถ็ๆ็ณป็ปๆฏๅ
ถๆ ธๅฟๅ่ฝ็้่ฆๆฉๅฑ๏ผๅฎๆๅคงๅฐ
|
|
|
40
40
|
## ๆไปถ็ๆไฝ็ณป
|
|
41
41
|
|
|
42
42
|
<Callout>
|
|
43
|
-
ๅฆๆไฝ ๅฏนๆไปถๅผๅๆๅ
ด่ถฃ๏ผ่ฏทๅจ Wiki ไธญๆฅ้
ๆไปฌ็ [๐ ๆไปถๅผๅๆๅ](/
|
|
43
|
+
ๅฆๆไฝ ๅฏนๆไปถๅผๅๆๅ
ด่ถฃ๏ผ่ฏทๅจ Wiki ไธญๆฅ้
ๆไปฌ็ [๐ ๆไปถๅผๅๆๅ](/docs/usage/plugins/development)ใ
|
|
44
44
|
</Callout>
|
|
45
45
|
|
|
46
46
|
- [lobe-chat-plugins][lobe-chat-plugins]๏ผ่ฟๆฏ LobeChat ็ๆไปถ็ดขๅผใๅฎไป่ฏฅไปๅบ็ index.json ไธญ่ทๅๆไปถๅ่กจๅนถๆพ็คบ็ป็จๆทใ
|
|
@@ -34,4 +34,4 @@ If you want to try installing custom plugins on your own, you can use the follow
|
|
|
34
34
|
|
|
35
35
|
## Developing Custom Plugins
|
|
36
36
|
|
|
37
|
-
If you wish to develop a LobeChat plugin on your own, feel free to refer to the [Plugin Development Guide](/
|
|
37
|
+
If you wish to develop a LobeChat plugin on your own, feel free to refer to the [Plugin Development Guide](/docs/usage/plugins/development) to expand the possibilities of your AI assistant!
|
|
@@ -32,4 +32,4 @@ tags:
|
|
|
32
32
|
|
|
33
33
|
## ๅผๅ่ชๅฎไนๆไปถ
|
|
34
34
|
|
|
35
|
-
ๅฆๆไฝ ๅธๆ่ช่กๅผๅไธไธช LobeChat ็ๆไปถ๏ผๆฌข่ฟๆฅ้
[ๆไปถๅผๅๆๅ](/
|
|
35
|
+
ๅฆๆไฝ ๅธๆ่ช่กๅผๅไธไธช LobeChat ็ๆไปถ๏ผๆฌข่ฟๆฅ้
[ๆไปถๅผๅๆๅ](/docs/usage/plugins/development) ไปฅๆฉๅฑไฝ ็ AI ๆบ่ฝๅฉๆ็ๅฏ่ฝๆง่พน็๏ผ
|
|
@@ -27,7 +27,7 @@ This document will guide you on how to use Google Gemma in LobeChat:
|
|
|
27
27
|
<Steps>
|
|
28
28
|
### Install Ollama locally
|
|
29
29
|
|
|
30
|
-
First, you need to install Ollama. For the installation process, please refer to the [Ollama usage documentation](/
|
|
30
|
+
First, you need to install Ollama. For the installation process, please refer to the [Ollama usage documentation](/docs/usage/providers/ollama).
|
|
31
31
|
|
|
32
32
|
### Pull Google Gemma model to local using Ollama
|
|
33
33
|
|
|
@@ -59,7 +59,7 @@ In the session page, open the model panel and then select the Gemma model.
|
|
|
59
59
|
|
|
60
60
|
<Callout type={'info'}>
|
|
61
61
|
If you do not see the Ollama provider in the model selection panel, please refer to [Integrating
|
|
62
|
-
with Ollama](/
|
|
62
|
+
with Ollama](/docs/self-hosting/examples/ollama) to learn how to enable the Ollama provider in
|
|
63
63
|
LobeChat.
|
|
64
64
|
|
|
65
65
|
</Callout>
|
|
@@ -27,7 +27,7 @@ tags:
|
|
|
27
27
|
<Steps>
|
|
28
28
|
### ๆฌๅฐๅฎ่ฃ
Ollama
|
|
29
29
|
|
|
30
|
-
้ฆๅ
๏ผไฝ ้่ฆๅฎ่ฃ
Ollama๏ผๅฎ่ฃ
่ฟ็จ่ฏทๆฅ้
[Ollama ไฝฟ็จๆไปถ](/
|
|
30
|
+
้ฆๅ
๏ผไฝ ้่ฆๅฎ่ฃ
Ollama๏ผๅฎ่ฃ
่ฟ็จ่ฏทๆฅ้
[Ollama ไฝฟ็จๆไปถ](/docs/usage/providers/ollama)ใ
|
|
31
31
|
|
|
32
32
|
### ็จ Ollama ๆๅ Google Gemma ๆจกๅๅฐๆฌๅฐ
|
|
33
33
|
|
|
@@ -59,7 +59,7 @@ ollama pull gemma
|
|
|
59
59
|
|
|
60
60
|
<Callout type={'info'}>
|
|
61
61
|
ๅฆๆไฝ ๆฒกๆๅจๆจกๅ้ๆฉ้ขๆฟไธญ็ๅฐ Ollama ๆๅกๅ๏ผ่ฏทๆฅ้
[ไธ Ollama
|
|
62
|
-
้ๆ](/
|
|
62
|
+
้ๆ](/docs/self-hosting/examples/ollama) ไบ่งฃๅฆไฝๅจ LobeChat ไธญๅผๅฏ Ollama ๆๅกๅใ
|
|
63
63
|
|
|
64
64
|
</Callout>
|
|
65
65
|
</Steps>
|
|
@@ -26,7 +26,7 @@ Now, through the integration of LobeChat and [Ollama](https://ollama.com/), you
|
|
|
26
26
|
<Steps>
|
|
27
27
|
## Local Installation of Ollama
|
|
28
28
|
|
|
29
|
-
First, you need to install Ollama. For the installation process, please refer to the [Ollama Usage Document](/
|
|
29
|
+
First, you need to install Ollama. For the installation process, please refer to the [Ollama Usage Document](/docs/usage/providers/ollama).
|
|
30
30
|
|
|
31
31
|
## Pull the Qwen Model to Local with Ollama
|
|
32
32
|
|
|
@@ -61,7 +61,7 @@ In the LobeChat conversation page, open the model selection panel, and then sele
|
|
|
61
61
|
/>
|
|
62
62
|
|
|
63
63
|
<Callout type={'info'}>
|
|
64
|
-
If you do not see the Ollama provider in the model selection panel, please refer to [Integration with Ollama](/
|
|
64
|
+
If you do not see the Ollama provider in the model selection panel, please refer to [Integration with Ollama](/docs/self-hosting/examples/ollama) to learn how to enable the Ollama provider in LobeChat.
|
|
65
65
|
|
|
66
66
|
</Callout>
|
|
67
67
|
</Steps>
|
|
@@ -28,7 +28,7 @@ tags:
|
|
|
28
28
|
<Steps>
|
|
29
29
|
### ๆฌๅฐๅฎ่ฃ
Ollama
|
|
30
30
|
|
|
31
|
-
้ฆๅ
๏ผไฝ ้่ฆๅฎ่ฃ
Ollama๏ผๅฎ่ฃ
่ฟ็จ่ฏทๆฅ้
[Ollama ไฝฟ็จๆไปถ](/
|
|
31
|
+
้ฆๅ
๏ผไฝ ้่ฆๅฎ่ฃ
Ollama๏ผๅฎ่ฃ
่ฟ็จ่ฏทๆฅ้
[Ollama ไฝฟ็จๆไปถ](/docs/usage/providers/ollama)ใ
|
|
32
32
|
|
|
33
33
|
### ็จ Ollama ๆๅ Qwen ๆจกๅๅฐๆฌๅฐ
|
|
34
34
|
|
|
@@ -58,7 +58,7 @@ ollama pull qwen:14b
|
|
|
58
58
|
|
|
59
59
|
<Callout type={'info'}>
|
|
60
60
|
ๅฆๆไฝ ๆฒกๆๅจๆจกๅ้ๆฉ้ขๆฟไธญ็ๅฐ Ollama ๆๅกๅ๏ผ่ฏทๆฅ้
[ไธ Ollama
|
|
61
|
-
้ๆ](/
|
|
61
|
+
้ๆ](/docs/self-hosting/examples/ollama) ไบ่งฃๅฆไฝๅจ LobeChat ไธญๅผๅฏ Ollama ๆๅกๅใ
|
|
62
62
|
|
|
63
63
|
</Callout>
|
|
64
64
|
</Steps>
|
|
@@ -76,7 +76,7 @@ Next, you can start conversing with the local LLM using LobeChat.
|
|
|
76
76
|
/>
|
|
77
77
|
|
|
78
78
|
<Callout type={'info'}>
|
|
79
|
-
You can visit [Integrating with Ollama](/
|
|
79
|
+
You can visit [Integrating with Ollama](/docs/self-hosting/examples/ollama) to learn how to deploy
|
|
80
80
|
LobeChat to meet the integration requirements with Ollama.
|
|
81
81
|
|
|
82
82
|
</Callout>
|
|
@@ -76,7 +76,7 @@ Ollama ๆฏๆๅค็งๆจกๅ๏ผไฝ ๅฏไปฅๅจ [Ollama Library](https://ollama.com/lib
|
|
|
76
76
|
/>
|
|
77
77
|
|
|
78
78
|
<Callout type={'info'}>
|
|
79
|
-
ไฝ ๅฏไปฅๅๅพ [ไธ Ollama ้ๆ](/
|
|
79
|
+
ไฝ ๅฏไปฅๅๅพ [ไธ Ollama ้ๆ](/docs/self-hosting/examples/ollama) ไบ่งฃๅฆไฝ้จ็ฝฒ LobeChat ๏ผไปฅๆปก่ถณไธ Ollama ็้ๆ้ๆฑใ
|
|
80
80
|
|
|
81
81
|
</Callout>
|
|
82
82
|
</Steps>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lobehub/chat",
|
|
3
|
-
"version": "0.147.
|
|
3
|
+
"version": "0.147.6",
|
|
4
4
|
"description": "Lobe Chat - an open-source, high-performance chatbot framework that supports speech synthesis, multimodal, and extensible Function Call plugin system. Supports one-click free deployment of your private ChatGPT/LLM web application.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"framework",
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { SearchBar } from '@lobehub/ui';
|
|
2
|
+
import { useUnmount } from 'ahooks';
|
|
2
3
|
import { useResponsive } from 'antd-style';
|
|
3
4
|
import { memo, useState } from 'react';
|
|
4
5
|
import { useTranslation } from 'react-i18next';
|
|
@@ -10,11 +11,12 @@ const TopicSearchBar = memo<{ onClear?: () => void }>(({ onClear }) => {
|
|
|
10
11
|
|
|
11
12
|
const [keywords, setKeywords] = useState('');
|
|
12
13
|
const { mobile } = useResponsive();
|
|
14
|
+
const [activeSessionId, useSearchTopics] = useChatStore((s) => [s.activeId, s.useSearchTopics]);
|
|
13
15
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
useSearchTopics(keywords, activeSessionId);
|
|
17
|
+
useUnmount(() => {
|
|
18
|
+
useChatStore.setState({ isSearchingTopic: false });
|
|
19
|
+
});
|
|
18
20
|
return (
|
|
19
21
|
<SearchBar
|
|
20
22
|
autoFocus
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ModelProviderCard } from '@/types/llm';
|
|
2
2
|
|
|
3
|
+
// ref https://docs.mistral.ai/platform/pricing/#chat-completions-api
|
|
3
4
|
const Mistral: ModelProviderCard = {
|
|
4
5
|
chatModels: [
|
|
5
6
|
{
|
|
@@ -15,21 +16,26 @@ const Mistral: ModelProviderCard = {
|
|
|
15
16
|
tokens: 32_768,
|
|
16
17
|
},
|
|
17
18
|
{
|
|
18
|
-
displayName: 'Mistral Small
|
|
19
|
+
displayName: 'Mistral Small',
|
|
19
20
|
enabled: true,
|
|
20
|
-
id: 'mistral-small-
|
|
21
|
+
id: 'mistral-small-latest',
|
|
21
22
|
tokens: 32_768,
|
|
22
23
|
},
|
|
23
24
|
{
|
|
24
|
-
displayName: 'Mistral Medium
|
|
25
|
+
displayName: 'Mistral Medium',
|
|
25
26
|
enabled: true,
|
|
26
|
-
id: 'mistral-medium-
|
|
27
|
+
id: 'mistral-medium-latest',
|
|
27
28
|
tokens: 32_768,
|
|
28
29
|
},
|
|
29
30
|
{
|
|
30
|
-
displayName: 'Mistral Large
|
|
31
|
+
displayName: 'Mistral Large',
|
|
31
32
|
enabled: true,
|
|
32
|
-
id: 'mistral-large-
|
|
33
|
+
id: 'mistral-large-latest',
|
|
34
|
+
tokens: 32_768,
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
displayName: 'Mixtral 8x22B',
|
|
38
|
+
id: 'mixtral-8x22b',
|
|
33
39
|
tokens: 32_768,
|
|
34
40
|
},
|
|
35
41
|
],
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ModelProviderCard } from '@/types/llm';
|
|
2
2
|
|
|
3
|
-
// refs to: https://platform.openai.com/docs/models/gpt-4-and-gpt-4
|
|
3
|
+
// refs to: https://platform.openai.com/docs/models/gpt-4-turbo-and-gpt-4
|
|
4
4
|
const OpenAI: ModelProviderCard = {
|
|
5
5
|
chatModels: [
|
|
6
6
|
{
|
|
@@ -47,7 +47,6 @@ const OpenAI: ModelProviderCard = {
|
|
|
47
47
|
},
|
|
48
48
|
{
|
|
49
49
|
displayName: 'GPT-4 Turbo Preview',
|
|
50
|
-
enabled: true,
|
|
51
50
|
functionCall: true,
|
|
52
51
|
id: 'gpt-4-turbo-preview',
|
|
53
52
|
tokens: 128_000,
|
|
@@ -61,7 +60,6 @@ const OpenAI: ModelProviderCard = {
|
|
|
61
60
|
{
|
|
62
61
|
description: 'GPT-4 ่ง่ง้ข่ง็๏ผๆฏๆ่ง่งไปปๅก',
|
|
63
62
|
displayName: 'GPT-4 Turbo Vision Preview',
|
|
64
|
-
enabled: true,
|
|
65
63
|
id: 'gpt-4-vision-preview',
|
|
66
64
|
tokens: 128_000,
|
|
67
65
|
vision: true,
|
|
@@ -102,6 +100,23 @@ const OpenAI: ModelProviderCard = {
|
|
|
102
100
|
id: 'gpt-4-32k-0613',
|
|
103
101
|
tokens: 32_768,
|
|
104
102
|
},
|
|
103
|
+
{
|
|
104
|
+
description: 'GPT-4 Turbo ่ง่ง็',
|
|
105
|
+
displayName: 'GPT-4 Turbo Vision',
|
|
106
|
+
enabled: true,
|
|
107
|
+
functionCall: true,
|
|
108
|
+
id: 'gpt-4-turbo',
|
|
109
|
+
tokens: 128_000,
|
|
110
|
+
vision: true,
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
description: 'GPT-4 Turbo ่ง่ง็ (240409)',
|
|
114
|
+
displayName: 'GPT-4 Turbo Vision (240409)',
|
|
115
|
+
functionCall: true,
|
|
116
|
+
id: 'gpt-4-turbo-2024-04-09',
|
|
117
|
+
tokens: 128_000,
|
|
118
|
+
vision: true,
|
|
119
|
+
},
|
|
105
120
|
{
|
|
106
121
|
displayName: 'GPT-4 ALL',
|
|
107
122
|
files: true,
|
|
@@ -11,11 +11,11 @@ import { CreateTopicParams, QueryTopicParams, TopicModel } from '../topic';
|
|
|
11
11
|
|
|
12
12
|
describe('TopicModel', () => {
|
|
13
13
|
let topicData: CreateTopicParams;
|
|
14
|
-
|
|
14
|
+
const currentSessionId = 'session1';
|
|
15
15
|
beforeEach(() => {
|
|
16
16
|
// Set up topic data with the correct structure
|
|
17
17
|
topicData = {
|
|
18
|
-
sessionId:
|
|
18
|
+
sessionId: currentSessionId,
|
|
19
19
|
title: 'Test Topic',
|
|
20
20
|
favorite: false,
|
|
21
21
|
};
|
|
@@ -484,7 +484,7 @@ describe('TopicModel', () => {
|
|
|
484
484
|
});
|
|
485
485
|
|
|
486
486
|
describe('queryByKeyword', () => {
|
|
487
|
-
it('should query topics by keyword', async () => {
|
|
487
|
+
it('should query global topics by keyword', async () => {
|
|
488
488
|
// Create a topic with a unique title
|
|
489
489
|
const uniqueTitle = 'Unique Title';
|
|
490
490
|
await TopicModel.create({ ...topicData, title: uniqueTitle });
|
|
@@ -496,5 +496,28 @@ describe('TopicModel', () => {
|
|
|
496
496
|
expect(topics).toHaveLength(1);
|
|
497
497
|
expect(topics[0].title).toBe(uniqueTitle);
|
|
498
498
|
});
|
|
499
|
+
it('should query topics in current session by keyword', async () => {
|
|
500
|
+
// Create a topic with a unique title
|
|
501
|
+
const uniqueTitle = 'Unique Title';
|
|
502
|
+
await TopicModel.create({ ...topicData, title: uniqueTitle });
|
|
503
|
+
|
|
504
|
+
// Query topics by the unique title
|
|
505
|
+
const topics = await TopicModel.queryByKeyword(uniqueTitle, currentSessionId);
|
|
506
|
+
|
|
507
|
+
// Verify the correct topic is queried
|
|
508
|
+
expect(topics).toHaveLength(1);
|
|
509
|
+
expect(topics[0].title).toBe(uniqueTitle);
|
|
510
|
+
});
|
|
511
|
+
it('should not query any topic in other session by keyword', async () => {
|
|
512
|
+
// Create a topic with a unique title
|
|
513
|
+
const uniqueTitle = 'Unique Title';
|
|
514
|
+
await TopicModel.create({ ...topicData, title: uniqueTitle });
|
|
515
|
+
|
|
516
|
+
// Query topics by the unique title
|
|
517
|
+
const topics = await TopicModel.queryByKeyword(uniqueTitle, 'session-id-2');
|
|
518
|
+
|
|
519
|
+
// Verify the correct topic is queried
|
|
520
|
+
expect(topics).toHaveLength(0);
|
|
521
|
+
});
|
|
499
522
|
});
|
|
500
523
|
});
|
|
@@ -53,20 +53,25 @@ class _TopicModel extends BaseModel {
|
|
|
53
53
|
/**
|
|
54
54
|
* Query topics by keyword in title, message content, or translated content
|
|
55
55
|
* @param keyword The keyword to search for
|
|
56
|
+
* @param sessionId The currently activated session id.
|
|
56
57
|
*/
|
|
57
|
-
async queryByKeyword(keyword: string): Promise<ChatTopic[]> {
|
|
58
|
+
async queryByKeyword(keyword: string, sessionId?: string): Promise<ChatTopic[]> {
|
|
58
59
|
if (!keyword) return [];
|
|
59
60
|
|
|
60
61
|
console.time('queryTopicsByKeyword');
|
|
61
62
|
const keywordLowerCase = keyword.toLowerCase();
|
|
62
63
|
|
|
63
64
|
// Find topics with matching title
|
|
64
|
-
const
|
|
65
|
+
const queryTable = sessionId ? this.table.where('sessionId').equals(sessionId) : this.table;
|
|
66
|
+
const matchingTopicsPromise = queryTable
|
|
65
67
|
.filter((topic) => topic.title.toLowerCase().includes(keywordLowerCase))
|
|
66
68
|
.toArray();
|
|
67
69
|
|
|
68
70
|
// Find messages with matching content or translate.content
|
|
69
|
-
const
|
|
71
|
+
const queryMessages = sessionId
|
|
72
|
+
? this.db.messages.where('sessionId').equals(sessionId)
|
|
73
|
+
: this.db.messages;
|
|
74
|
+
const matchingMessagesPromise = queryMessages
|
|
70
75
|
.filter((message) => {
|
|
71
76
|
// check content
|
|
72
77
|
if (message.content.toLowerCase().includes(keywordLowerCase)) return true;
|
|
@@ -38,7 +38,6 @@ exports[`LobeOpenAI > models > should get models 1`] = `
|
|
|
38
38
|
},
|
|
39
39
|
{
|
|
40
40
|
"displayName": "GPT-4 Turbo Preview",
|
|
41
|
-
"enabled": true,
|
|
42
41
|
"functionCall": true,
|
|
43
42
|
"id": "gpt-4-turbo-preview",
|
|
44
43
|
"tokens": 128000,
|
|
@@ -72,7 +71,6 @@ exports[`LobeOpenAI > models > should get models 1`] = `
|
|
|
72
71
|
{
|
|
73
72
|
"description": "GPT-4 ่ง่ง้ข่ง็๏ผๆฏๆ่ง่งไปปๅก",
|
|
74
73
|
"displayName": "GPT-4 Turbo Vision Preview",
|
|
75
|
-
"enabled": true,
|
|
76
74
|
"id": "gpt-4-vision-preview",
|
|
77
75
|
"tokens": 128000,
|
|
78
76
|
"vision": true,
|
|
@@ -47,7 +47,7 @@ Updated by OpenAI to point to the [latest version of GPT-3.5](/models?q=openai/g
|
|
|
47
47
|
|
|
48
48
|
#multimodal",
|
|
49
49
|
"displayName": "OpenAI: GPT-4 Vision",
|
|
50
|
-
"enabled":
|
|
50
|
+
"enabled": false,
|
|
51
51
|
"functionCall": false,
|
|
52
52
|
"id": "openai/gpt-4-vision-preview",
|
|
53
53
|
"maxTokens": 4096,
|
|
@@ -204,16 +204,16 @@ describe('TopicService', () => {
|
|
|
204
204
|
});
|
|
205
205
|
|
|
206
206
|
describe('searchTopics', () => {
|
|
207
|
-
it('should return topics that match the keyword', async () => {
|
|
207
|
+
it('should return all topics that match the keyword', async () => {
|
|
208
208
|
// Setup
|
|
209
209
|
const keyword = 'search';
|
|
210
210
|
(TopicModel.queryByKeyword as Mock).mockResolvedValue(mockTopics);
|
|
211
211
|
|
|
212
212
|
// Execute
|
|
213
|
-
const result = await topicService.searchTopics(keyword);
|
|
213
|
+
const result = await topicService.searchTopics(keyword, undefined);
|
|
214
214
|
|
|
215
215
|
// Assert
|
|
216
|
-
expect(TopicModel.queryByKeyword).toHaveBeenCalledWith(keyword);
|
|
216
|
+
expect(TopicModel.queryByKeyword).toHaveBeenCalledWith(keyword, undefined);
|
|
217
217
|
expect(result).toBe(mockTopics);
|
|
218
218
|
});
|
|
219
219
|
});
|
package/src/services/topic.ts
CHANGED
|
@@ -48,8 +48,8 @@ class TopicService {
|
|
|
48
48
|
return TopicModel.queryAll();
|
|
49
49
|
}
|
|
50
50
|
|
|
51
|
-
async searchTopics(keyword: string) {
|
|
52
|
-
return TopicModel.queryByKeyword(keyword);
|
|
51
|
+
async searchTopics(keyword: string, sessionId?: string) {
|
|
52
|
+
return TopicModel.queryByKeyword(keyword, sessionId);
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
async duplicateTopic(id: string, newTitle?: string) {
|
|
@@ -43,7 +43,7 @@ export interface ChatTopicAction {
|
|
|
43
43
|
updateTopicLoading: (id?: string) => void;
|
|
44
44
|
updateTopicTitle: (id: string, title: string) => Promise<void>;
|
|
45
45
|
useFetchTopics: (sessionId: string) => SWRResponse<ChatTopic[]>;
|
|
46
|
-
useSearchTopics: (keywords?: string) => SWRResponse<ChatTopic[]>;
|
|
46
|
+
useSearchTopics: (keywords?: string, sessionId?: string) => SWRResponse<ChatTopic[]>;
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
export const chatTopic: StateCreator<
|
|
@@ -154,10 +154,11 @@ export const chatTopic: StateCreator<
|
|
|
154
154
|
},
|
|
155
155
|
},
|
|
156
156
|
),
|
|
157
|
-
useSearchTopics: (keywords) =>
|
|
157
|
+
useSearchTopics: (keywords, sessionId) =>
|
|
158
158
|
useSWR<ChatTopic[]>(
|
|
159
|
-
[SWR_USE_SEARCH_TOPIC, keywords],
|
|
160
|
-
([, keywords]: [string, string]) =>
|
|
159
|
+
[SWR_USE_SEARCH_TOPIC, keywords, sessionId],
|
|
160
|
+
([, keywords, sessionId]: [string, string, string]) =>
|
|
161
|
+
topicService.searchTopics(keywords, sessionId),
|
|
161
162
|
{
|
|
162
163
|
onSuccess: (data) => {
|
|
163
164
|
set({ searchTopics: data }, false, n('useSearchTopics(success)', { keywords }));
|
|
@@ -29,7 +29,7 @@ describe('modelProviderSelectors', () => {
|
|
|
29
29
|
const s = merge(initialSettingsState, {}) as unknown as GlobalStore;
|
|
30
30
|
|
|
31
31
|
const result = modelProviderSelectors.defaultEnabledProviderModels('openai')(s);
|
|
32
|
-
expect(result).toEqual(['gpt-3.5-turbo', 'gpt-4-turbo
|
|
32
|
+
expect(result).toEqual(['gpt-3.5-turbo', 'gpt-4-turbo']);
|
|
33
33
|
});
|
|
34
34
|
|
|
35
35
|
it('should return undefined for a non-existing provider', () => {
|