@lobehub/chat 0.152.5 → 0.152.7

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 (189) 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/settings-url-share.mdx +100 -0
  5. package/docs/self-hosting/advanced/settings-url-share.zh-CN.mdx +100 -0
  6. package/locales/ar/common.json +1 -0
  7. package/locales/ar/setting.json +4 -1
  8. package/locales/bg-BG/common.json +1 -0
  9. package/locales/bg-BG/setting.json +4 -1
  10. package/locales/de-DE/common.json +1 -0
  11. package/locales/de-DE/setting.json +4 -1
  12. package/locales/en-US/common.json +1 -0
  13. package/locales/en-US/setting.json +4 -1
  14. package/locales/es-ES/common.json +1 -0
  15. package/locales/es-ES/setting.json +4 -1
  16. package/locales/fr-FR/common.json +1 -0
  17. package/locales/fr-FR/setting.json +4 -1
  18. package/locales/it-IT/common.json +1 -0
  19. package/locales/it-IT/setting.json +4 -1
  20. package/locales/ja-JP/common.json +1 -0
  21. package/locales/ja-JP/setting.json +4 -1
  22. package/locales/ko-KR/common.json +1 -0
  23. package/locales/ko-KR/setting.json +4 -1
  24. package/locales/nl-NL/common.json +1 -0
  25. package/locales/nl-NL/setting.json +4 -1
  26. package/locales/pl-PL/common.json +1 -0
  27. package/locales/pl-PL/setting.json +4 -1
  28. package/locales/pt-BR/common.json +1 -0
  29. package/locales/pt-BR/setting.json +4 -1
  30. package/locales/ru-RU/common.json +1 -0
  31. package/locales/ru-RU/setting.json +4 -1
  32. package/locales/tr-TR/common.json +1 -0
  33. package/locales/tr-TR/setting.json +4 -1
  34. package/locales/vi-VN/common.json +1 -0
  35. package/locales/vi-VN/setting.json +4 -1
  36. package/locales/zh-CN/common.json +1 -0
  37. package/locales/zh-CN/setting.json +4 -1
  38. package/locales/zh-TW/common.json +1 -0
  39. package/locales/zh-TW/setting.json +4 -1
  40. package/package.json +1 -1
  41. package/src/app/(main)/(mobile)/me/features/AvatarBanner.tsx +52 -0
  42. package/src/app/(main)/(mobile)/me/features/Cate.tsx +35 -0
  43. package/src/app/(main)/(mobile)/me/features/ExtraCate.tsx +26 -0
  44. package/src/app/(main)/(mobile)/me/features/useExtraCate.tsx +62 -0
  45. package/src/app/(main)/(mobile)/me/layout.tsx +11 -0
  46. package/src/app/(main)/(mobile)/me/loading.tsx +17 -0
  47. package/src/app/(main)/(mobile)/me/page.tsx +31 -0
  48. package/src/app/(main)/@nav/_layout/Desktop/index.tsx +1 -1
  49. package/src/app/(main)/@nav/_layout/Mobile.tsx +3 -3
  50. package/src/app/(main)/chat/(mobile)/features/SessionHeader.tsx +1 -1
  51. package/src/app/(main)/chat/_layout/Desktop/index.tsx +6 -8
  52. package/src/app/(main)/chat/_layout/Mobile/index.tsx +5 -3
  53. package/src/app/(main)/chat/_layout/type.ts +5 -0
  54. package/src/app/(main)/chat/features/SettingButton.tsx +3 -4
  55. package/src/app/(main)/chat/layout.ts +5 -2
  56. package/src/app/(main)/chat/settings/{(desktop) → _layout/Desktop}/Header.tsx +2 -0
  57. package/src/app/(main)/chat/settings/_layout/Desktop/index.tsx +28 -0
  58. package/src/app/(main)/chat/settings/{(mobile) → _layout/Mobile}/Header.tsx +3 -2
  59. package/src/app/(main)/chat/settings/_layout/Mobile/index.tsx +15 -0
  60. package/src/app/(main)/chat/settings/error.tsx +5 -0
  61. package/src/app/(main)/chat/settings/features/HeaderContent.tsx +15 -9
  62. package/src/app/(main)/chat/settings/features/SubmitAgentButton/SubmitAgentModal.tsx +2 -0
  63. package/src/app/(main)/chat/settings/features/SubmitAgentButton/index.tsx +16 -8
  64. package/src/app/(main)/chat/settings/layout.tsx +9 -2
  65. package/src/app/(main)/chat/settings/loading.tsx +3 -0
  66. package/src/app/(main)/chat/settings/not-found.tsx +3 -0
  67. package/src/app/(main)/chat/settings/page.tsx +2 -9
  68. package/src/app/(main)/market/@detail/default.tsx +1 -10
  69. package/src/app/(main)/market/{@detail/_layout/Desktop.tsx → _layout/Desktop/DetailSidebar.tsx} +2 -2
  70. package/src/app/(main)/market/_layout/Desktop/index.tsx +2 -1
  71. package/src/app/(main)/market/{@detail/_layout/Mobile.tsx → _layout/Mobile/DetailModal.tsx} +2 -2
  72. package/src/app/(main)/market/_layout/Mobile/index.tsx +3 -1
  73. package/src/app/(main)/settings/@category/default.tsx +16 -0
  74. package/src/app/(main)/settings/@category/features/CategoryContent.tsx +33 -0
  75. package/src/app/(main)/settings/@category/features/UpgradeAlert.tsx +38 -0
  76. package/src/app/(main)/settings/_layout/Desktop/Header.tsx +78 -23
  77. package/src/app/(main)/settings/_layout/Desktop/SideBar.tsx +39 -27
  78. package/src/app/(main)/settings/_layout/Desktop/index.tsx +41 -17
  79. package/src/app/(main)/settings/_layout/Mobile/{SubSettingHeader.tsx → Header.tsx} +3 -1
  80. package/src/app/(main)/settings/_layout/Mobile/index.tsx +7 -18
  81. package/src/app/(main)/settings/_layout/type.ts +6 -0
  82. package/src/app/(main)/settings/about/features/AboutList.tsx +134 -0
  83. package/src/app/(main)/settings/about/features/Analytics.tsx +42 -0
  84. package/src/app/(main)/settings/about/index.tsx +46 -0
  85. package/src/app/(main)/settings/about/page.tsx +13 -33
  86. package/src/app/(main)/settings/agent/{Agent.tsx → index.tsx} +8 -4
  87. package/src/app/(main)/settings/agent/page.tsx +8 -16
  88. package/src/app/(main)/settings/common/{Common.tsx → features/Common.tsx} +6 -4
  89. package/src/app/(main)/settings/common/{Theme.tsx → features/Theme/index.tsx} +8 -6
  90. package/src/app/(main)/settings/common/index.tsx +11 -16
  91. package/src/app/(main)/settings/common/page.tsx +8 -7
  92. package/src/app/(main)/settings/error.tsx +5 -0
  93. package/src/app/(main)/settings/features/Footer.tsx +2 -0
  94. package/src/app/(main)/settings/features/UpgradeAlert.tsx +21 -13
  95. package/src/app/(main)/settings/hooks/useCategory.tsx +54 -0
  96. package/src/app/(main)/settings/hooks/useSyncSettings.ts +2 -2
  97. package/src/app/(main)/settings/layout.ts +4 -1
  98. package/src/app/(main)/settings/llm/Anthropic/index.tsx +4 -8
  99. package/src/app/(main)/settings/llm/Azure/index.tsx +3 -1
  100. package/src/app/(main)/settings/llm/Bedrock/index.tsx +3 -1
  101. package/src/app/(main)/settings/llm/Google/index.tsx +4 -2
  102. package/src/app/(main)/settings/llm/Groq/index.tsx +3 -1
  103. package/src/app/(main)/settings/llm/Minimax/index.tsx +3 -9
  104. package/src/app/(main)/settings/llm/Mistral/index.tsx +3 -9
  105. package/src/app/(main)/settings/llm/Moonshot/index.tsx +3 -1
  106. package/src/app/(main)/settings/llm/Ollama/index.tsx +3 -1
  107. package/src/app/(main)/settings/llm/OpenAI/index.tsx +2 -0
  108. package/src/app/(main)/settings/llm/OpenRouter/index.tsx +3 -9
  109. package/src/app/(main)/settings/llm/Perplexity/index.tsx +3 -9
  110. package/src/app/(main)/settings/llm/TogetherAI/index.tsx +3 -9
  111. package/src/app/(main)/settings/llm/ZeroOne/index.tsx +3 -9
  112. package/src/app/(main)/settings/llm/Zhipu/index.tsx +3 -10
  113. package/src/app/(main)/settings/llm/components/Checker.tsx +2 -0
  114. package/src/app/(main)/settings/llm/components/Footer.tsx +26 -0
  115. package/src/app/(main)/settings/llm/components/ProviderConfig/index.tsx +29 -3
  116. package/src/app/(main)/settings/llm/index.tsx +11 -23
  117. package/src/app/(main)/settings/llm/page.tsx +15 -0
  118. package/src/app/(main)/settings/loading.tsx +9 -0
  119. package/src/app/(main)/settings/not-found.tsx +3 -0
  120. package/src/app/(main)/settings/page.tsx +2 -14
  121. package/src/app/(main)/settings/sync/{DeviceInfo → features/DeviceInfo}/Card.tsx +6 -5
  122. package/src/app/(main)/settings/sync/features/DeviceInfo/DeviceName.tsx +63 -0
  123. package/src/app/(main)/settings/sync/{components → features/DeviceInfo}/SystemIcon.tsx +6 -14
  124. package/src/app/(main)/settings/sync/{DeviceInfo → features/DeviceInfo}/index.tsx +22 -36
  125. package/src/app/(main)/settings/sync/{WebRTC → features/WebRTC}/ChannelNameInput.tsx +3 -3
  126. package/src/app/(main)/settings/sync/{WebRTC → features/WebRTC}/index.tsx +10 -9
  127. package/src/app/(main)/settings/sync/index.tsx +17 -0
  128. package/src/app/(main)/settings/sync/page.tsx +11 -15
  129. package/src/app/(main)/settings/tts/features/OpenAI.tsx +54 -0
  130. package/src/app/(main)/settings/tts/{TTS/index.tsx → features/STT.tsx} +11 -27
  131. package/src/app/(main)/settings/tts/index.tsx +15 -0
  132. package/src/app/(main)/settings/tts/page.tsx +8 -16
  133. package/src/app/layout.tsx +6 -2
  134. package/src/components/BrandWatermark/index.tsx +39 -0
  135. package/src/components/Cell/Divider.tsx +19 -0
  136. package/src/components/Cell/index.tsx +38 -0
  137. package/src/components/Menu/index.tsx +97 -0
  138. package/src/components/SkeletonLoading/index.tsx +21 -0
  139. package/src/const/url.ts +2 -0
  140. package/src/features/AgentSetting/AgentChat/index.tsx +135 -0
  141. package/src/features/AgentSetting/AgentMeta/index.tsx +4 -3
  142. package/src/features/AgentSetting/AgentModal/index.tsx +95 -0
  143. package/src/features/AgentSetting/AgentPlugin/index.tsx +65 -66
  144. package/src/features/AgentSetting/AgentPrompt/index.tsx +101 -47
  145. package/src/features/AgentSetting/AgentTTS/index.tsx +4 -0
  146. package/src/features/AgentSetting/StoreUpdater.tsx +2 -0
  147. package/src/features/AgentSetting/index.tsx +6 -6
  148. package/src/features/AgentSetting/store/index.ts +2 -0
  149. package/src/features/AvatarWithUpload/index.tsx +2 -0
  150. package/src/features/Conversation/components/ChatItem/HistoryDivider.tsx +1 -1
  151. package/src/hooks/useQuery.test.ts +20 -0
  152. package/src/hooks/useQuery.ts +7 -0
  153. package/src/hooks/useQueryRoute.test.ts +86 -0
  154. package/src/hooks/useQueryRoute.ts +46 -0
  155. package/src/locales/default/common.ts +1 -0
  156. package/src/locales/default/setting.ts +3 -0
  157. package/src/store/global/initialState.ts +1 -0
  158. package/src/store/user/slices/common/action.test.ts +1 -1
  159. package/src/app/(main)/chat/settings/(desktop)/index.tsx +0 -23
  160. package/src/app/(main)/chat/settings/(mobile)/index.tsx +0 -16
  161. package/src/app/(main)/settings/(desktop)/index.tsx +0 -23
  162. package/src/app/(main)/settings/(mobile)/features/AvatarBanner.tsx +0 -68
  163. package/src/app/(main)/settings/(mobile)/features/ExtraList.tsx +0 -65
  164. package/src/app/(main)/settings/(mobile)/index.tsx +0 -53
  165. package/src/app/(main)/settings/about/AboutList.tsx +0 -53
  166. package/src/app/(main)/settings/about/Analytics.tsx +0 -40
  167. package/src/app/(main)/settings/about/style.ts +0 -22
  168. package/src/app/(main)/settings/agent/loading.tsx +0 -3
  169. package/src/app/(main)/settings/common/loading.tsx +0 -3
  170. package/src/app/(main)/settings/features/SettingList/index.tsx +0 -47
  171. package/src/app/(main)/settings/llm/layout.tsx +0 -11
  172. package/src/app/(main)/settings/llm/loading.tsx +0 -3
  173. package/src/app/(main)/settings/sync/DeviceInfo/DeviceName.tsx +0 -66
  174. package/src/app/(main)/settings/sync/PageTitle.tsx +0 -11
  175. package/src/app/(main)/settings/sync/layout.tsx +0 -12
  176. package/src/app/(main)/settings/sync/loading.tsx +0 -3
  177. package/src/app/(main)/settings/tts/loading.tsx +0 -3
  178. package/src/features/AgentSetting/AgentConfig/index.tsx +0 -202
  179. package/src/features/AgentSetting/AgentConfig/useSyncConfig.ts +0 -23
  180. /package/src/app/(main)/settings/{features/SettingList → about/features}/Item.tsx +0 -0
  181. /package/src/app/(main)/settings/{features → common/features/Theme}/ThemeSwatches/ThemeSwatchesNeutral.tsx +0 -0
  182. /package/src/app/(main)/settings/{features → common/features/Theme}/ThemeSwatches/ThemeSwatchesPrimary.tsx +0 -0
  183. /package/src/app/(main)/settings/{features → common/features/Theme}/ThemeSwatches/index.ts +0 -0
  184. /package/src/app/(main)/settings/sync/{Alert.tsx → features/Alert.tsx} +0 -0
  185. /package/src/app/(main)/settings/sync/{components → features/WebRTC}/SyncSwitch/index.css +0 -0
  186. /package/src/app/(main)/settings/sync/{components → features/WebRTC}/SyncSwitch/index.tsx +0 -0
  187. /package/src/app/(main)/settings/sync/{util.ts → features/WebRTC/generateRandomRoomName.ts} +0 -0
  188. /package/src/app/(main)/settings/tts/{TTS/options.ts → features/const.ts} +0 -0
  189. /package/src/features/AgentSetting/{AgentConfig → AgentModal}/ModelSelect.tsx +0 -0
package/CHANGELOG.md CHANGED
@@ -2,6 +2,56 @@
2
2
 
3
3
  # Changelog
4
4
 
5
+ ### [Version 0.152.7](https://github.com/lobehub/lobe-chat/compare/v0.152.6...v0.152.7)
6
+
7
+ <sup>Released on **2024-05-02**</sup>
8
+
9
+ #### 💄 Styles
10
+
11
+ - **misc**: Refactor setting layout and improve setting design.
12
+
13
+ <br/>
14
+
15
+ <details>
16
+ <summary><kbd>Improvements and Fixes</kbd></summary>
17
+
18
+ #### Styles
19
+
20
+ - **misc**: Refactor setting layout and improve setting design, closes [#2344](https://github.com/lobehub/lobe-chat/issues/2344) ([fa16721](https://github.com/lobehub/lobe-chat/commit/fa16721))
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.152.6](https://github.com/lobehub/lobe-chat/compare/v0.152.5...v0.152.6)
31
+
32
+ <sup>Released on **2024-05-02**</sup>
33
+
34
+ #### 💄 Styles
35
+
36
+ - **misc**: AutoScroll to the fully end.
37
+
38
+ <br/>
39
+
40
+ <details>
41
+ <summary><kbd>Improvements and Fixes</kbd></summary>
42
+
43
+ #### Styles
44
+
45
+ - **misc**: AutoScroll to the fully end, closes [#2345](https://github.com/lobehub/lobe-chat/issues/2345) ([5458e98](https://github.com/lobehub/lobe-chat/commit/5458e98))
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.152.5](https://github.com/lobehub/lobe-chat/compare/v0.152.4...v0.152.5)
6
56
 
7
57
  <sup>Released on **2024-05-02**</sup>
package/README.md CHANGED
@@ -222,14 +222,14 @@ In addition, these plugins are not limited to news aggregation, but can also ext
222
222
 
223
223
  <!-- PLUGIN LIST -->
224
224
 
225
- | Recent Submits | Description |
226
- | ------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
227
- | [Search Google via Serper](https://chat-preview.lobehub.com/settings/agent)<br/><sup>By **Barry** on **2024-04-30**</sup> | Google search engine via Serper.dev free API (2500x🆓/month)<br/>`web` `search` |
228
- | [Speak](https://chat-preview.lobehub.com/settings/agent)<br/><sup>By **speak** on **2024-04-30**</sup> | Learn how to say anything in another language with Speak, your AI-powered language tutor.<br/>`education` `language` |
229
- | [NFT Guru](https://chat-preview.lobehub.com/settings/agent)<br/><sup>By **swap** on **2024-04-03**</sup> | Discover current prices of NFTs across major platforms and keep track of the rapidly changing marketplace with real-time<br/>`crypto` `nft` |
230
- | [Calendar Assistant](https://chat-preview.lobehub.com/settings/agent)<br/><sup>By **cc** on **2024-03-13**</sup> | A plugin to manage your calendar events # will auto generate i18n in workflow<br/>`calendar` `schedule` `will-auto-generate-i-18-n-in-workflow` |
231
-
232
- > 📊 Total plugins: [<kbd>**56**</kbd>](https://github.com/lobehub/lobe-chat-plugins)
225
+ | Recent Submits | Description |
226
+ | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
227
+ | [Social Search](https://chat-preview.lobehub.com/settings/agent)<br/><sup>By **say-apps** on **2024-05-02**</sup> | The Social Search provides access to tweets, users, followers, images, media and more.<br/>`social` `twitter` `x` `search` |
228
+ | [Search Google via Serper](https://chat-preview.lobehub.com/settings/agent)<br/><sup>By **Barry** on **2024-04-30**</sup> | Google search engine via Serper.dev free API (2500x🆓/month)<br/>`web` `search` |
229
+ | [Speak](https://chat-preview.lobehub.com/settings/agent)<br/><sup>By **speak** on **2024-04-30**</sup> | Learn how to say anything in another language with Speak, your AI-powered language tutor.<br/>`education` `language` |
230
+ | [NFT Guru](https://chat-preview.lobehub.com/settings/agent)<br/><sup>By **swap** on **2024-04-03**</sup> | Discover current prices of NFTs across major platforms and keep track of the rapidly changing marketplace with real-time<br/>`crypto` `nft` |
231
+
232
+ > 📊 Total plugins: [<kbd>**57**</kbd>](https://github.com/lobehub/lobe-chat-plugins)
233
233
 
234
234
  <!-- PLUGIN LIST -->
235
235
 
package/README.zh-CN.md CHANGED
@@ -214,14 +214,14 @@ LobeChat 的插件生态系统是其核心功能的重要扩展,它极大地
214
214
 
215
215
  <!-- PLUGIN LIST -->
216
216
 
217
- | 最近新增 | 插件描述 |
218
- | ------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------- |
219
- | [通过 Serper 搜索 Google](https://chat-preview.lobehub.com/settings/agent)<br/><sup>By **Barry** on **2024-04-30**</sup> | 通过 Serper.dev 免费 API 进行 Google 搜索引擎(每月 2500 次🆓)<br/>`网络` `搜索` |
220
- | [Speak](https://chat-preview.lobehub.com/settings/agent)<br/><sup>By **speak** on **2024-04-30**</sup> | 使用 Speak,您的 AI 语言导师,学习如何用另一种语言说任何事情。<br/>`教育` `语言` |
221
- | [NFT Guru](https://chat-preview.lobehub.com/settings/agent)<br/><sup>By **swap** on **2024-04-03**</sup> | 发现主要平台上 NFT 的当前价格,并通过实时跟踪快速变化的市场了解情况<br/>`加密货币` `nft` |
222
- | [日历助手](https://chat-preview.lobehub.com/settings/agent)<br/><sup>By **cc** on **2024-03-13**</sup> | 一个用于管理日历事件的插件 # 将自动生成工作流程中的 i18n<br/>`日历` `日程安排` `将自动生成工作流程中的-i-18-n` |
223
-
224
- > 📊 Total plugins: [<kbd>**56**</kbd>](https://github.com/lobehub/lobe-chat-plugins)
217
+ | 最近新增 | 插件描述 |
218
+ | ------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------- |
219
+ | [社交搜索](https://chat-preview.lobehub.com/settings/agent)<br/><sup>By **say-apps** on **2024-05-02**</sup> | 社交搜索提供访问推文、用户、关注者、图片、媒体等功能。<br/>`社交` `推特` `x` `搜索` |
220
+ | [通过 Serper 搜索 Google](https://chat-preview.lobehub.com/settings/agent)<br/><sup>By **Barry** on **2024-04-30**</sup> | 通过 Serper.dev 免费 API 进行 Google 搜索引擎(每月 2500 次🆓)<br/>`网络` `搜索` |
221
+ | [Speak](https://chat-preview.lobehub.com/settings/agent)<br/><sup>By **speak** on **2024-04-30**</sup> | 使用 Speak,您的 AI 语言导师,学习如何用另一种语言说任何事情。<br/>`教育` `语言` |
222
+ | [NFT Guru](https://chat-preview.lobehub.com/settings/agent)<br/><sup>By **swap** on **2024-04-03**</sup> | 发现主要平台上 NFT 的当前价格,并通过实时跟踪快速变化的市场了解情况<br/>`加密货币` `nft` |
223
+
224
+ > 📊 Total plugins: [<kbd>**57**</kbd>](https://github.com/lobehub/lobe-chat-plugins)
225
225
 
226
226
  <!-- PLUGIN LIST -->
227
227
 
@@ -0,0 +1,100 @@
1
+ # Share settings via URL
2
+
3
+ LobeChat support import settings from external URL to quickly set up LobeChat configuration.
4
+
5
+ The currently supported settings are:
6
+
7
+ - `languageModel`: Language model settings
8
+
9
+ ## Import from URL
10
+
11
+ Use the following URL format to import settings parameters from an external URL:
12
+
13
+ ```plaintext
14
+ https://lobehub.com/?settings=<settings object in JSON format>
15
+ https://lobehub.com/?settings={"languageModel":{"openai":{"apiKey":"user-key","endpoint":"https://lobehub.com/v1"}}}
16
+ ```
17
+
18
+ Example of settings in JSON format:
19
+
20
+ ```json
21
+ {
22
+ "languageModel": {
23
+ "openai": {
24
+ "apiKey": "user-key"
25
+ }
26
+ }
27
+ }
28
+ ```
29
+
30
+ ## Export settings to URL
31
+
32
+ ```ts
33
+ // Generate settings to export to URL
34
+ const settings = {
35
+ languageModel: {
36
+ openai: {
37
+ apiKey: 'user-key',
38
+ endpoint: 'https://lobehub.com/v1'
39
+ },
40
+ }};
41
+ // Convert settings to a JSON formatted string
42
+ const url = `/?settings=${JSON.stringify(settings)}`;
43
+ console.log(url);
44
+ // /?settings={"languageModel":{"openai":{"apiKey":"user-key","endpoint":"https://lobehub.com/v1"}}}
45
+ ```
46
+
47
+ <Callout type={'warning'}>
48
+ LobeChat does not verify the correctness of the settings parameters in the URL, nor provide encryption or decryption methods. Please use with caution.
49
+ </Callout>
50
+
51
+ ## Parameter schema
52
+
53
+ ### languageModel
54
+
55
+ - Property name and type
56
+
57
+ | Property name | Type |
58
+ |---------------|--------------------------------|
59
+ | anthropic | GeneralModelProviderConfig |
60
+ | azure | AzureOpenAIConfig |
61
+ | bedrock | AWSBedrockConfig |
62
+ | google | GeneralModelProviderConfig |
63
+ | groq | GeneralModelProviderConfig |
64
+ | minimax | GeneralModelProviderConfig |
65
+ | mistral | GeneralModelProviderConfig |
66
+ | moonshot | GeneralModelProviderConfig |
67
+ | ollama | GeneralModelProviderConfig |
68
+ | openai | GeneralModelProviderConfig |
69
+ | openrouter | GeneralModelProviderConfig |
70
+ | perplexity | GeneralModelProviderConfig |
71
+ | togetherai | GeneralModelProviderConfig |
72
+ | zeroone | GeneralModelProviderConfig |
73
+ | zhipu | GeneralModelProviderConfig |
74
+
75
+ - Type `GeneralModelProviderConfig`
76
+
77
+ | Property name | Type | Description |
78
+ |-----------------------|--------------------------|-----------------------------------------------------------------------------|
79
+ | apiKey | string | The API key for the model provider. |
80
+ | autoFetchModelLists | boolean | Whether to automatically fetch model lists. |
81
+ | enabled | boolean | Whether the model provider is enabled. |
82
+ | enabledModels | string[] | null | The IDs of the enabled models. |
83
+ | endpoint | string | The endpoint for the model provider. |
84
+ | fetchOnClient | boolean | Whether to fetch on the client. |
85
+
86
+ - Type `AzureOpenAIConfig`
87
+ > Inherits the fields from `GeneralModelProviderConfig`
88
+
89
+ | Property name | Type | Description |
90
+ |-----------------------|--------------------------|-----------------------------------------------------------------------------|
91
+ | apiVersion | string | The API version for Azure OpenAI. |
92
+
93
+ - Type `AWSBedrockConfig`
94
+ > Inherits all fields from `GeneralModelProviderConfig` except `apiKey, endpoint`
95
+
96
+ | Property name | Type | Description |
97
+ | accessKeyId | string | The access key ID for AWS Bedrock. |
98
+ | region | string | The region for AWS Bedrock. |
99
+ | secretAccessKey | string | The secret access key for AWS Bedrock. |
100
+
@@ -0,0 +1,100 @@
1
+ # URL 分享设置参数
2
+
3
+ LobeChat 支持从外部 URL 导入设置参数,以便于快速设置 LobeChat 的配置。
4
+
5
+ 目前支持的设置项有:
6
+
7
+ - `languageModel`:语言模型设置
8
+
9
+ ## 从 URL 中导入
10
+
11
+ 使用以下 URL 格式,可以从外部 URL 导入设置参数:
12
+
13
+ ```plaintext
14
+ https://lobehub.com/?settings=<JSON格式的设置对象>
15
+ https://lobehub.com/?settings={"languageModel":{"openai":{"apiKey":"user-key","endpoint":"https://lobehub.com/v1"}}}
16
+ ```
17
+
18
+ JSON格式的设置示例:
19
+
20
+ ```json
21
+ {
22
+ "languageModel": {
23
+ "openai": {
24
+ "apiKey": "user-key"
25
+ }
26
+ }
27
+ }
28
+ ```
29
+
30
+ ## 将设置导出到 URL
31
+
32
+ ```ts
33
+ // 生成要导出到 URL 的设置
34
+ const settings = {
35
+ languageModel: {
36
+ openai: {
37
+ apiKey: 'user-key',
38
+ endpoint: 'https://lobehub.com/v1'
39
+ },
40
+ }};
41
+ // 将设置转为 JSON 格式的字符串
42
+ const url = `/?settings=${JSON.stringify(settings)}`;
43
+ console.log(url);
44
+ // /?settings={"languageModel":{"openai":{"apiKey":"user-key","endpoint":"https://lobehub.com/v1"}}}
45
+ ```
46
+
47
+ <Callout type={'warning'}>
48
+ LobeChat 不对 URL 中的设置参数进行正确性校验,也不提供加密、解密方法,请谨慎使用。
49
+ </Callout>
50
+
51
+ ## 参数格式
52
+
53
+ ### languageModel
54
+
55
+ - 参数及其类型
56
+
57
+ | 参数名称 | 类型 |
58
+ |---------------|--------------------------------|
59
+ | anthropic | GeneralModelProviderConfig |
60
+ | azure | AzureOpenAIConfig |
61
+ | bedrock | AWSBedrockConfig |
62
+ | google | GeneralModelProviderConfig |
63
+ | groq | GeneralModelProviderConfig |
64
+ | minimax | GeneralModelProviderConfig |
65
+ | mistral | GeneralModelProviderConfig |
66
+ | moonshot | GeneralModelProviderConfig |
67
+ | ollama | GeneralModelProviderConfig |
68
+ | openai | GeneralModelProviderConfig |
69
+ | openrouter | GeneralModelProviderConfig |
70
+ | perplexity | GeneralModelProviderConfig |
71
+ | togetherai | GeneralModelProviderConfig |
72
+ | zeroone | GeneralModelProviderConfig |
73
+ | zhipu | GeneralModelProviderConfig |
74
+
75
+ - 类型 `GeneralModelProviderConfig`
76
+
77
+ | 参数 | TS 类型 | 描述 |
78
+ |-----------------------|--------------------------|-----------------------------------------------------------------------------|
79
+ | apiKey | string | 模型的 API 密钥。 |
80
+ | autoFetchModelLists | boolean | 是否自动获取模型列表。 |
81
+ | enabled | boolean | 是否启用该模型。 |
82
+ | enabledModels | string[] | 启用的模型的 ID。 |
83
+ | endpoint | string | 模型API端点。 |
84
+ | fetchOnClient | boolean | 是否在客户端发起请求,默认在服务端发起请求。 |
85
+
86
+ - 类型 `AzureOpenAIConfig`
87
+ > 继承 `GeneralModelProviderConfig` 中的字段
88
+
89
+ | 参数 | TS 类型 | 描述 |
90
+ |-----------------------|--------------------------|-----------------------------------------------------------------------------|
91
+ | apiVersion | string | Azure OpenAI 的 API 版本。 |
92
+
93
+ - 类型 `AWSBedrockConfig`
94
+ > 继承 `GeneralModelProviderConfig` 中除 `apiKey, endpoint` 外的所有字段
95
+
96
+ | 参数 | TS 类型 | 描述 |
97
+ |-----------------------|--------------------------|-----------------------------------------------------------------------------|
98
+ | accessKeyId | string | AWS Bedrock 的访问密钥 ID。 |
99
+ | region | string | AWS Bedrock 的区域。 |
100
+ | secretAccessKey | string | AWS Bedrock 的访问密钥。 |
@@ -140,6 +140,7 @@
140
140
  "tab": {
141
141
  "chat": "الدردشة",
142
142
  "market": "الاكتشاف",
143
+ "me": "أنا",
143
144
  "setting": "الإعدادات"
144
145
  },
145
146
  "telemetry": {
@@ -27,9 +27,12 @@
27
27
  }
28
28
  },
29
29
  "header": {
30
+ "desc": "إعدادات التفضيلات والنماذج.",
30
31
  "global": "إعدادات عامة",
31
32
  "session": "إعدادات الجلسة",
32
- "sessionWithName": "إعدادات الجلسة · {{name}}"
33
+ "sessionDesc": "إعداد الشخصية وتفضيلات الجلسة.",
34
+ "sessionWithName": "إعدادات الجلسة · {{name}}",
35
+ "title": "إعدادات"
33
36
  },
34
37
  "llm": {
35
38
  "checker": {
@@ -140,6 +140,7 @@
140
140
  "tab": {
141
141
  "chat": "Чат",
142
142
  "market": "Открий",
143
+ "me": "аз",
143
144
  "setting": "Настройки"
144
145
  },
145
146
  "telemetry": {
@@ -27,9 +27,12 @@
27
27
  }
28
28
  },
29
29
  "header": {
30
+ "desc": "Предпочитания и настройки на модела.",
30
31
  "global": "Глобални настройки",
31
32
  "session": "Настройки на сесията",
32
- "sessionWithName": "Настройки на сесията · {{name}}"
33
+ "sessionDesc": "Задаване на роля и предпочитания за сесия.",
34
+ "sessionWithName": "Настройки на сесията · {{name}}",
35
+ "title": "Настройки"
33
36
  },
34
37
  "llm": {
35
38
  "checker": {
@@ -140,6 +140,7 @@
140
140
  "tab": {
141
141
  "chat": "Chat",
142
142
  "market": "Entdecken",
143
+ "me": "Ich",
143
144
  "setting": "Einstellung"
144
145
  },
145
146
  "telemetry": {
@@ -27,9 +27,12 @@
27
27
  }
28
28
  },
29
29
  "header": {
30
+ "desc": "Präferenzen und Modellkonfigurationen.",
30
31
  "global": "Global Einstellungen",
31
32
  "session": "Sitzungseinstellungen",
32
- "sessionWithName": "Sitzungseinstellungen · {{name}}"
33
+ "sessionDesc": "Rollenkonfiguration und Sitzungspräferenzen.",
34
+ "sessionWithName": "Sitzungseinstellungen · {{name}}",
35
+ "title": "Einstellungen"
33
36
  },
34
37
  "llm": {
35
38
  "checker": {
@@ -140,6 +140,7 @@
140
140
  "tab": {
141
141
  "chat": "Chat",
142
142
  "market": "Discover",
143
+ "me": "Me",
143
144
  "setting": "Settings"
144
145
  },
145
146
  "telemetry": {
@@ -27,9 +27,12 @@
27
27
  }
28
28
  },
29
29
  "header": {
30
+ "desc": "Preferences and model settings.",
30
31
  "global": "Global Settings",
31
32
  "session": "Session Settings",
32
- "sessionWithName": "Session Settings · {{name}}"
33
+ "sessionDesc": "Role settings and session preferences.",
34
+ "sessionWithName": "Session Settings · {{name}}",
35
+ "title": "Settings"
33
36
  },
34
37
  "llm": {
35
38
  "checker": {
@@ -140,6 +140,7 @@
140
140
  "tab": {
141
141
  "chat": "Chat",
142
142
  "market": "Descubrir",
143
+ "me": "Yo",
143
144
  "setting": "Configuración"
144
145
  },
145
146
  "telemetry": {
@@ -27,9 +27,12 @@
27
27
  }
28
28
  },
29
29
  "header": {
30
+ "desc": "Preferencias y configuración del modelo.",
30
31
  "global": "Configuración global",
31
32
  "session": "Configuración de la sesión",
32
- "sessionWithName": "Configuración de la sesión · {{name}}"
33
+ "sessionDesc": "Configuración de roles y preferencias de sesión.",
34
+ "sessionWithName": "Configuración de la sesión · {{name}}",
35
+ "title": "Configuración"
33
36
  },
34
37
  "llm": {
35
38
  "checker": {
@@ -140,6 +140,7 @@
140
140
  "tab": {
141
141
  "chat": "Conversation",
142
142
  "market": "Découvrir",
143
+ "me": "moi",
143
144
  "setting": "Paramètre"
144
145
  },
145
146
  "telemetry": {
@@ -27,9 +27,12 @@
27
27
  }
28
28
  },
29
29
  "header": {
30
+ "desc": "Préférences et paramètres du modèle.",
30
31
  "global": "Paramètres globaux",
31
32
  "session": "Paramètres de session",
32
- "sessionWithName": "Paramètres de session · {{name}}"
33
+ "sessionDesc": "Paramètres de personnage et préférences de session.",
34
+ "sessionWithName": "Paramètres de session · {{name}}",
35
+ "title": "Paramètres"
33
36
  },
34
37
  "llm": {
35
38
  "checker": {
@@ -140,6 +140,7 @@
140
140
  "tab": {
141
141
  "chat": "Chat",
142
142
  "market": "Scopri",
143
+ "me": "io",
143
144
  "setting": "Impostazioni"
144
145
  },
145
146
  "telemetry": {
@@ -27,9 +27,12 @@
27
27
  }
28
28
  },
29
29
  "header": {
30
+ "desc": "Preferenze e impostazioni del modello.",
30
31
  "global": "Impostazioni globali",
31
32
  "session": "Impostazioni della sessione",
32
- "sessionWithName": "Impostazioni della sessione · {{name}}"
33
+ "sessionDesc": "Impostazioni del personaggio e preferenze di sessione.",
34
+ "sessionWithName": "Impostazioni della sessione · {{name}}",
35
+ "title": "Impostazioni"
33
36
  },
34
37
  "llm": {
35
38
  "checker": {
@@ -140,6 +140,7 @@
140
140
  "tab": {
141
141
  "chat": "チャット",
142
142
  "market": "探す",
143
+ "me": "私",
143
144
  "setting": "設定"
144
145
  },
145
146
  "telemetry": {
@@ -27,9 +27,12 @@
27
27
  }
28
28
  },
29
29
  "header": {
30
+ "desc": "設定優先順位和模型設置。",
30
31
  "global": "グローバル設定",
31
32
  "session": "セッション設定",
32
- "sessionWithName": "セッション設定 · {{name}}"
33
+ "sessionDesc": "キャラクター設定とセッションの好み。",
34
+ "sessionWithName": "セッション設定 · {{name}}",
35
+ "title": "設定"
33
36
  },
34
37
  "llm": {
35
38
  "checker": {
@@ -140,6 +140,7 @@
140
140
  "tab": {
141
141
  "chat": "채팅",
142
142
  "market": "발견",
143
+ "me": "나",
143
144
  "setting": "설정"
144
145
  },
145
146
  "telemetry": {
@@ -27,9 +27,12 @@
27
27
  }
28
28
  },
29
29
  "header": {
30
+ "desc": "설정 및 모델 설정.",
30
31
  "global": "전역 설정",
31
32
  "session": "세션 설정",
32
- "sessionWithName": "세션 설정 · {{name}}"
33
+ "sessionDesc": "캐릭터 설정 세션 환경 설정.",
34
+ "sessionWithName": "세션 설정 · {{name}}",
35
+ "title": "설정"
33
36
  },
34
37
  "llm": {
35
38
  "checker": {
@@ -140,6 +140,7 @@
140
140
  "tab": {
141
141
  "chat": "会话",
142
142
  "market": "发现",
143
+ "me": "我",
143
144
  "setting": "设置"
144
145
  },
145
146
  "telemetry": {
@@ -27,9 +27,12 @@
27
27
  }
28
28
  },
29
29
  "header": {
30
+ "desc": "Voorkeuren en modelinstellingen.",
30
31
  "global": "Algemene instellingen",
31
32
  "session": "Sessie-instellingen",
32
- "sessionWithName": "Sessie-instellingen · {{name}}"
33
+ "sessionDesc": "Rolinstellingen en sessievoorkeuren.",
34
+ "sessionWithName": "Sessie-instellingen · {{name}}",
35
+ "title": "Instellingen"
33
36
  },
34
37
  "llm": {
35
38
  "checker": {
@@ -140,6 +140,7 @@
140
140
  "tab": {
141
141
  "chat": "Czat",
142
142
  "market": "Odkrywaj",
143
+ "me": "ja",
143
144
  "setting": "Ustawienia"
144
145
  },
145
146
  "telemetry": {
@@ -27,9 +27,12 @@
27
27
  }
28
28
  },
29
29
  "header": {
30
+ "desc": "Preferencje i ustawienia modelu.",
30
31
  "global": "Ustawienia globalne",
31
32
  "session": "Ustawienia sesji",
32
- "sessionWithName": "Ustawienia sesji · {{name}}"
33
+ "sessionDesc": "Ustawienia postaci i preferencje sesji.",
34
+ "sessionWithName": "Ustawienia sesji · {{name}}",
35
+ "title": "Ustawienia"
33
36
  },
34
37
  "llm": {
35
38
  "checker": {
@@ -140,6 +140,7 @@
140
140
  "tab": {
141
141
  "chat": "Chat",
142
142
  "market": "Descobrir",
143
+ "me": "eu",
143
144
  "setting": "Configuração"
144
145
  },
145
146
  "telemetry": {
@@ -27,9 +27,12 @@
27
27
  }
28
28
  },
29
29
  "header": {
30
+ "desc": "Preferências e configurações do modelo.",
30
31
  "global": "Configurações Globais",
31
32
  "session": "Configurações de Sessão",
32
- "sessionWithName": "Configurações de Sessão · {{name}}"
33
+ "sessionDesc": "Configurações de personagem e preferências de sessão.",
34
+ "sessionWithName": "Configurações de Sessão · {{name}}",
35
+ "title": "Configurações"
33
36
  },
34
37
  "llm": {
35
38
  "checker": {
@@ -140,6 +140,7 @@
140
140
  "tab": {
141
141
  "chat": "Чат",
142
142
  "market": "Обзор",
143
+ "me": "я",
143
144
  "setting": "Настройки"
144
145
  },
145
146
  "telemetry": {
@@ -27,9 +27,12 @@
27
27
  }
28
28
  },
29
29
  "header": {
30
+ "desc": "Настройки предпочтений и моделей.",
30
31
  "global": "Глобальные настройки",
31
32
  "session": "Настройки сеанса",
32
- "sessionWithName": "Настройки сеанса · {{name}}"
33
+ "sessionDesc": "Настройки персонажа и предпочтения сессии.",
34
+ "sessionWithName": "Настройки сеанса · {{name}}",
35
+ "title": "Настройки"
33
36
  },
34
37
  "llm": {
35
38
  "checker": {
@@ -140,6 +140,7 @@
140
140
  "tab": {
141
141
  "chat": "Chat",
142
142
  "market": "Keşfet",
143
+ "me": "ben",
143
144
  "setting": "Ayarlar"
144
145
  },
145
146
  "telemetry": {