@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.
Files changed (52) hide show
  1. package/CHANGELOG.md +50 -0
  2. package/README.md +8 -8
  3. package/README.zh-CN.md +8 -8
  4. package/docs/self-hosting/advanced/authentication.mdx +5 -5
  5. package/docs/self-hosting/advanced/authentication.zh-CN.mdx +5 -5
  6. package/docs/self-hosting/advanced/sso-providers/auth0.mdx +1 -1
  7. package/docs/self-hosting/advanced/sso-providers/auth0.zh-CN.mdx +1 -1
  8. package/docs/self-hosting/advanced/sso-providers/authentik.mdx +2 -2
  9. package/docs/self-hosting/advanced/sso-providers/authentik.zh-CN.mdx +1 -1
  10. package/docs/self-hosting/advanced/sso-providers/github.mdx +1 -1
  11. package/docs/self-hosting/advanced/sso-providers/github.zh-CN.mdx +1 -1
  12. package/docs/self-hosting/advanced/sso-providers/microsoft-entra-id.mdx +1 -1
  13. package/docs/self-hosting/advanced/sso-providers/microsoft-entra-id.zh-CN.mdx +1 -1
  14. package/docs/self-hosting/advanced/sso-providers/zitadel.mdx +1 -1
  15. package/docs/self-hosting/advanced/sso-providers/zitadel.zh-CN.mdx +1 -1
  16. package/docs/self-hosting/examples/ollama.mdx +3 -3
  17. package/docs/self-hosting/examples/ollama.zh-CN.mdx +4 -4
  18. package/docs/self-hosting/platform/docker-compose.mdx +12 -11
  19. package/docs/self-hosting/platform/docker-compose.zh-CN.mdx +28 -26
  20. package/docs/self-hosting/platform/docker.mdx +1 -1
  21. package/docs/self-hosting/platform/docker.zh-CN.mdx +1 -1
  22. package/docs/self-hosting/platform/netlify.mdx +1 -1
  23. package/docs/self-hosting/platform/netlify.zh-CN.mdx +1 -1
  24. package/docs/self-hosting/platform/vercel.mdx +1 -1
  25. package/docs/self-hosting/platform/vercel.zh-CN.mdx +1 -1
  26. package/docs/usage/agents/custom-agent.mdx +2 -2
  27. package/docs/usage/agents/custom-agent.zh-CN.mdx +2 -2
  28. package/docs/usage/features/multi-ai-providers.mdx +1 -1
  29. package/docs/usage/features/multi-ai-providers.zh-CN.mdx +1 -1
  30. package/docs/usage/features/plugin-system.mdx +1 -1
  31. package/docs/usage/features/plugin-system.zh-CN.mdx +2 -2
  32. package/docs/usage/plugins/custom-plugin.mdx +1 -1
  33. package/docs/usage/plugins/custom-plugin.zh-CN.mdx +1 -1
  34. package/docs/usage/providers/ollama/gemma.mdx +2 -2
  35. package/docs/usage/providers/ollama/gemma.zh-CN.mdx +2 -2
  36. package/docs/usage/providers/ollama/qwen.mdx +2 -2
  37. package/docs/usage/providers/ollama/qwen.zh-CN.mdx +2 -2
  38. package/docs/usage/providers/ollama.mdx +1 -1
  39. package/docs/usage/providers/ollama.zh-CN.mdx +1 -1
  40. package/package.json +1 -1
  41. package/src/app/chat/features/TopicListContent/TopicSearchBar/index.tsx +6 -4
  42. package/src/config/modelProviders/mistral.ts +12 -6
  43. package/src/config/modelProviders/openai.ts +18 -3
  44. package/src/database/models/__tests__/topic.test.ts +26 -3
  45. package/src/database/models/topic.ts +8 -3
  46. package/src/libs/agent-runtime/openai/__snapshots__/index.test.ts.snap +0 -2
  47. package/src/libs/agent-runtime/openrouter/__snapshots__/index.test.ts.snap +1 -1
  48. package/src/libs/agent-runtime/utils/openaiCompatibleFactory/index.ts +1 -1
  49. package/src/services/__tests__/topic.test.ts +3 -3
  50. package/src/services/topic.ts +2 -2
  51. package/src/store/chat/slices/topic/action.ts +5 -4
  52. 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
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#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
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#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 | Description |
264
- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
265
- | [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` |
266
- | [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` |
267
- | [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` |
268
- | [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` |
269
-
270
- > ๐Ÿ“Š Total agents: [<kbd>**234**</kbd> ](https://github.com/lobehub/lobe-chat-agents)
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
- | [่„่ฏๅญฆไน ๅŠฉๆ‰‹](https://chat-preview.lobehub.com/market?agent=profanity-assistant)<br/><sup>By **[cokice](https://github.com/cokice)** on **2024-04-10**</sup> | ๆˆ‘ๅชไผš้ช‚ไบบ ๅˆซ็š„้ƒฝไธไผš<br/>`ๅ›ž็ญ”` `่„่ฏ` |
254
- | [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` |
255
- | [ๅ•็‰‡ๆœบๅทฅ็จ‹ๅธˆ](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ไปฃ็ ` `ๆ•™่‚ฒ` `่งฃ้‡Š` `ๅตŒๅ…ฅๅผ็ณป็ปŸ` |
256
- | [่ฎพ่ฎก็†ๅฟตๅˆ†ๆž](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` |
257
-
258
- > ๐Ÿ“Š Total agents: [<kbd>**234**</kbd> ](https://github.com/lobehub/lobe-chat-agents)
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](/en/docs/self-hosting/advanced/sso-providers/auth0)
28
- - [Microsoft Entra ID](/en/docs/self-hosting/advanced/sso-providers/microsoft-entra-id)
29
- - [Authentik](/en/docs/self-hosting/advanced/sso-providers/authentik)
30
- - [Github](/en/docs/self-hosting/advanced/sso-providers/github)
31
- - [ZITADEL](/en/docs/self-hosting/advanced/sso-providers/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](/zh/docs/self-hosting/advanced/sso-providers/auth0)
24
- - [Microsoft Entra ID](/zh/docs/self-hosting/advanced/sso-providers/microsoft-entra-id)
25
- - [Authentik](/zh/docs/self-hosting/advanced/sso-providers/authentik)
26
- - [Github](/zh/docs/self-hosting/advanced/sso-providers/github)
27
- - [ZITADEL](/zh/docs/self-hosting/advanced/sso-providers/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](/en/docs/self-hosting/environment-variable#auth0).
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
- ๅ‰ๅพ€ [๐Ÿ“˜ ็Žฏๅขƒๅ˜้‡](/zh/docs/self-hosting/environment-variable#auth0) ๅฏๆŸฅ้˜…็›ธๅ…ณๅ˜้‡่ฏฆๆƒ…ใ€‚
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](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: /en/docs/self-hosting/environment-variable#Authentik for details about the 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
- ๅ‰ๅพ€ [๐Ÿ“˜ ็Žฏๅขƒๅ˜้‡](/zh/docs/self-hosting/environment-variable#Authentik) ๅฏๆŸฅ้˜…็›ธๅ…ณๅ˜้‡่ฏฆๆƒ…ใ€‚
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](/en/docs/self-hosting/environment-variable#Github) for detailed
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
- ๅ‰ๅพ€ [๐Ÿ“˜ ็Žฏๅขƒๅ˜้‡](/zh/docs/self-hosting/environment-variable#Github) ๅฏๆŸฅ้˜…็›ธๅ…ณๅ˜้‡่ฏฆๆƒ…ใ€‚
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](/en/docs/self-hosting/environment-variable#microsoft-entra-id) for details on related
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
- ๅ‰ๅพ€ [๐Ÿ“˜ ็Žฏๅขƒๅ˜้‡](/zh/docs/self-hosting/environment-variable#microsoft-entra-id) ๅฏๆŸฅ้˜…็›ธๅ…ณๅ˜้‡่ฏฆๆƒ…ใ€‚
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](/en/docs/self-hosting/environment-variables/auth#zitadel).
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
- ๆ‚จๅฏไปฅๅœจ [๐Ÿ“˜ ็Žฏๅขƒๅ˜้‡](/zh/docs/self-hosting/environment-variables/auth#zitadel) ไธญๆŸฅ็œ‹็›ธๅ…ณๅ˜้‡็š„่ฏฆ็ป†ไฟกๆฏใ€‚
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=0.0.0.0:11434
44
+ set OLLAMA_HOST=:11434
45
45
  ```
46
- For further guidance on configuration, consult the [Ollama Official Documentation](https://ollama.com/docs/configuration).
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 ไฝฟ็”จ](/zh/docs/usage/providers/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=0.0.0.0:11434
40
+ set OLLAMA_HOST=:11434
41
41
  ```
42
- ่ฏฆ็ป†้…็ฝฎๆ–นๆณ•ๅฏไปฅๅ‚่€ƒ [Ollama ๅฎ˜ๆ–นๆ–‡ๆกฃ](https://ollama.com/docs/configuration)ใ€‚
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
- [![][docker-release-shield]][docker-release-link]
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
- ```fish
39
- $ apt install docker.io
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
- [![][docker-release-shield]][docker-release-link]
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
- ### ๅฎ‰่ฃ… Docker ๅฎนๅ™จ็Žฏๅขƒ
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
- lobe-chat:
59
- image: lobehub/lobe-chat
60
- container_name: lobe-chat
61
- restart: always
62
- ports:
63
- - '3210:3210'
64
- environment:
65
- OPENAI_API_KEY: sk-xxxx
66
- OPENAI_PROXY_URL: https://api-proxy.com/v1
67
- ACCESS_CODE: lobe66
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
- exit 1
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
- exit 0
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
- # ไนŸ่ฎธ้œ€่ฆๅ…ˆ่ฟ›ๅ…ฅ `docker-compose.yml` ๆ‰€ๅœจ็š„็›ฎๅฝ•
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
- ๆญค่„šๆœฌไบฆๅฏไปฅๅœจ Crontab ไธญไฝฟ็”จ๏ผŒไฝ†่ฏท็กฎ่ฎคไฝ ็š„ Crontab ๅฏไปฅๆ‰พๅˆฐๆญฃ็กฎ็š„ Docker ๅ‘ฝไปคใ€‚ๅปบ่ฎฎไฝฟ็”จ็ปๅฏน่ทฏๅพ„ใ€‚
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
- ้…็ฝฎ Crontab๏ผŒๆฏ 5 ๅˆ†้’Ÿๆ‰ง่กŒไธ€ๆฌก่„šๆœฌ๏ผš
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](/zh/docs/self-hosting/environment-ariable) section.
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 ๆ”ฏๆŒ็š„ๅฎŒๆ•ด็Žฏๅขƒๅ˜้‡ๅˆ—่กจ่ฏทๅ‚่€ƒ [๐Ÿ“˜ ็Žฏๅขƒๅ˜้‡](/zh/docs/self-hosting/environment-variables) ้ƒจๅˆ†
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](/en/docs/self-hosting/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 ๆ”ฏๆŒ็š„ๅฎŒๆ•ด็Žฏๅขƒๅ˜้‡ๅˆ—่กจ่ฏทๅ‚่€ƒ [๐Ÿ“˜ ็Žฏๅขƒๅ˜้‡](/zh/docs/self-hosting/environment-variables) ้ƒจๅˆ†
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](/zh/docs/self-hosting/upstream-sync) steps to
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 ่‡ช้ƒจ็ฝฒไฟๆŒๆ›ดๆ–ฐ](/zh/docs/self-hosting/advanced/upstream-sync) ๆญฅ้ชค้‡ๆ–ฐ้ƒจ็ฝฒใ€‚
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={'/en/docs/usage/agents/prompt'} title={'Prompt User Guide'} />
55
+ <Card href={'/docs/usage/agents/prompt'} title={'Prompt User Guide'} />
56
56
 
57
- <Card href={'/en/docs/usage/agents/model'} title={'Large Language Model User Guide'} />
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={'/zh/docs/usage/agents/prompt'} title={'Prompt ไฝฟ็”จๆŒ‡ๅ—'} />
50
+ <Card href={'/docs/usage/agents/prompt'} title={'Prompt ไฝฟ็”จๆŒ‡ๅ—'} />
51
51
 
52
- <Card href={'/zh/docs/usage/agents/model'} title={'ๅคง่ฏญ่จ€ๆจกๅž‹ไฝฟ็”จๆŒ‡ๅ—'} />
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](/en/docs/usage/features/local-llm).
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) ๆ”ฏๆŒไบ†ๆœฌๅœฐๆจกๅž‹็š„ไฝฟ็”จ๏ผŒ่ฎฉ็”จๆˆท่ƒฝๅคŸๆ›ด็ตๆดปๅœฐไฝฟ็”จ่‡ชๅทฑ็š„ๆˆ–็ฌฌไธ‰ๆ–น็š„ๆจกๅž‹๏ผŒ่ฏฆ่ง [ๆœฌๅœฐๆจกๅž‹ๆ”ฏๆŒ](/zh/docs/usage/features/local-llm)ใ€‚
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](/en/docs/usage/plugins/development) in the Wiki.
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
- ้€š่ฟ‡ๆŸฅ็œ‹ [ๆ’ไปถไฝฟ็”จ](/zh/docs/usage/plugins/basic) ไบ†่งฃๆ›ดๅคšใ€‚
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 ไธญๆŸฅ้˜…ๆˆ‘ไปฌ็š„ [๐Ÿ“˜ ๆ’ไปถๅผ€ๅ‘ๆŒ‡ๅ—](/zh/docs/usage/plugins/development)ใ€‚
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](/en/docs/usage/plugins/development) to expand the possibilities of your AI assistant!
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 ็š„ๆ’ไปถ๏ผŒๆฌข่ฟŽๆŸฅ้˜… [ๆ’ไปถๅผ€ๅ‘ๆŒ‡ๅ—](/zh/docs/usage/plugins/development) ไปฅๆ‰ฉๅฑ•ไฝ ็š„ AI ๆ™บ่ƒฝๅŠฉๆ‰‹็š„ๅฏ่ƒฝๆ€ง่พน็•Œ๏ผ
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](/en/docs/usage/providers/ollama).
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](/en/docs/self-hosting/examples/ollama) to learn how to enable the Ollama provider in
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 ไฝฟ็”จๆ–‡ไปถ](/zh/docs/usage/providers/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
- ้›†ๆˆ](/zh/docs/self-hosting/examples/ollama) ไบ†่งฃๅฆ‚ไฝ•ๅœจ LobeChat ไธญๅผ€ๅฏ Ollama ๆœๅŠกๅ•†ใ€‚
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](/en/docs/usage/providers/ollama).
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](/en/docs/self-hosting/examples/ollama) to learn how to enable the Ollama provider in LobeChat.
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 ไฝฟ็”จๆ–‡ไปถ](/zh/docs/usage/providers/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
- ้›†ๆˆ](/zh/docs/self-hosting/examples/ollama) ไบ†่งฃๅฆ‚ไฝ•ๅœจ LobeChat ไธญๅผ€ๅฏ Ollama ๆœๅŠกๅ•†ใ€‚
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](/en/docs/self-hosting/examples/ollama) to learn how to deploy
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 ้›†ๆˆ](/zh/docs/self-hosting/examples/ollama) ไบ†่งฃๅฆ‚ไฝ•้ƒจ็ฝฒ LobeChat ๏ผŒไปฅๆปก่ถณไธŽ 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.4",
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
- const useSearchTopics = useChatStore((s) => s.useSearchTopics);
15
-
16
- useSearchTopics(keywords);
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 (2402)',
19
+ displayName: 'Mistral Small',
19
20
  enabled: true,
20
- id: 'mistral-small-2402',
21
+ id: 'mistral-small-latest',
21
22
  tokens: 32_768,
22
23
  },
23
24
  {
24
- displayName: 'Mistral Medium (2312)',
25
+ displayName: 'Mistral Medium',
25
26
  enabled: true,
26
- id: 'mistral-medium-2312',
27
+ id: 'mistral-medium-latest',
27
28
  tokens: 32_768,
28
29
  },
29
30
  {
30
- displayName: 'Mistral Large (2402)',
31
+ displayName: 'Mistral Large',
31
32
  enabled: true,
32
- id: 'mistral-large-2402',
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-turbo
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: 'session1',
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 matchingTopicsPromise = this.table
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 matchingMessagesPromise = this.db.messages
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": true,
50
+ "enabled": false,
51
51
  "functionCall": false,
52
52
  "id": "openai/gpt-4-vision-preview",
53
53
  "maxTokens": 4096,
@@ -16,7 +16,7 @@ import { handleOpenAIError } from '../handleOpenAIError';
16
16
  const CHAT_MODELS_BLOCK_LIST = [
17
17
  'embedding',
18
18
  'davinci',
19
- 'cuire',
19
+ 'curie',
20
20
  'moderation',
21
21
  'ada',
22
22
  'babbage',
@@ -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
  });
@@ -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]) => topicService.searchTopics(keywords),
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-preview', 'gpt-4-vision-preview']);
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', () => {