@lobehub/chat 1.44.2 → 1.45.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (324) hide show
  1. package/.remarkrc.mdx.js +6 -0
  2. package/CHANGELOG.md +50 -0
  3. package/changelog/v1.json +18 -0
  4. package/docs/changelog/2023-09-09-plugin-system.mdx +5 -0
  5. package/docs/changelog/2023-09-09-plugin-system.zh-CN.mdx +5 -0
  6. package/docs/changelog/2023-11-14-gpt4-vision.mdx +6 -0
  7. package/docs/changelog/2023-11-14-gpt4-vision.zh-CN.mdx +6 -0
  8. package/docs/changelog/2023-11-19-tts-stt.mdx +6 -0
  9. package/docs/changelog/2023-11-19-tts-stt.zh-CN.mdx +7 -0
  10. package/docs/changelog/2023-12-22-dalle-3.mdx +6 -0
  11. package/docs/changelog/2023-12-22-dalle-3.zh-CN.mdx +4 -0
  12. package/docs/changelog/2024-02-08-sso-oauth.mdx +6 -0
  13. package/docs/changelog/2024-02-08-sso-oauth.zh-CN.mdx +6 -0
  14. package/docs/changelog/2024-02-14-ollama.mdx +6 -0
  15. package/docs/changelog/2024-02-14-ollama.zh-CN.mdx +5 -0
  16. package/docs/changelog/2024-06-19-lobe-chat-v1.mdx +6 -0
  17. package/docs/changelog/2024-06-19-lobe-chat-v1.zh-CN.mdx +5 -0
  18. package/docs/changelog/2024-07-19-gpt-4o-mini.mdx +5 -0
  19. package/docs/changelog/2024-07-19-gpt-4o-mini.zh-CN.mdx +4 -0
  20. package/docs/changelog/2024-08-02-lobe-chat-database-docker.mdx +6 -0
  21. package/docs/changelog/2024-08-02-lobe-chat-database-docker.zh-CN.mdx +5 -0
  22. package/docs/changelog/2024-08-21-file-upload-and-knowledge-base.mdx +6 -0
  23. package/docs/changelog/2024-08-21-file-upload-and-knowledge-base.zh-CN.mdx +5 -0
  24. package/docs/changelog/2024-09-13-openai-o1-models.mdx +6 -0
  25. package/docs/changelog/2024-09-13-openai-o1-models.zh-CN.mdx +6 -0
  26. package/docs/changelog/2024-09-20-artifacts.mdx +6 -0
  27. package/docs/changelog/2024-09-20-artifacts.zh-CN.mdx +6 -0
  28. package/docs/changelog/2024-10-27-pin-assistant.mdx +5 -0
  29. package/docs/changelog/2024-10-27-pin-assistant.zh-CN.mdx +4 -0
  30. package/docs/changelog/2024-11-06-share-text-json.mdx +4 -0
  31. package/docs/changelog/2024-11-06-share-text-json.zh-CN.mdx +4 -0
  32. package/docs/changelog/2024-11-25-november-providers.mdx +7 -0
  33. package/docs/changelog/2024-11-25-november-providers.zh-CN.mdx +7 -0
  34. package/docs/changelog/2024-11-27-forkable-chat.mdx +4 -0
  35. package/docs/changelog/2024-11-27-forkable-chat.zh-CN.mdx +5 -0
  36. package/docs/changelog/2025-01-03-user-profile.mdx +5 -0
  37. package/docs/changelog/2025-01-03-user-profile.zh-CN.mdx +4 -1
  38. package/docs/self-hosting/advanced/auth/clerk.mdx +25 -41
  39. package/docs/self-hosting/advanced/auth/clerk.zh-CN.mdx +23 -37
  40. package/docs/self-hosting/advanced/auth/next-auth/auth0.mdx +31 -58
  41. package/docs/self-hosting/advanced/auth/next-auth/auth0.zh-CN.mdx +30 -57
  42. package/docs/self-hosting/advanced/auth/next-auth/authelia.mdx +38 -38
  43. package/docs/self-hosting/advanced/auth/next-auth/authelia.zh-CN.mdx +37 -38
  44. package/docs/self-hosting/advanced/auth/next-auth/authentik.mdx +26 -31
  45. package/docs/self-hosting/advanced/auth/next-auth/authentik.zh-CN.mdx +25 -30
  46. package/docs/self-hosting/advanced/auth/next-auth/casdoor.mdx +74 -75
  47. package/docs/self-hosting/advanced/auth/next-auth/casdoor.zh-CN.mdx +72 -73
  48. package/docs/self-hosting/advanced/auth/next-auth/cloudflare-zero-trust.mdx +24 -25
  49. package/docs/self-hosting/advanced/auth/next-auth/cloudflare-zero-trust.zh-CN.mdx +23 -24
  50. package/docs/self-hosting/advanced/auth/next-auth/github.mdx +46 -73
  51. package/docs/self-hosting/advanced/auth/next-auth/github.zh-CN.mdx +43 -70
  52. package/docs/self-hosting/advanced/auth/next-auth/logto.mdx +28 -37
  53. package/docs/self-hosting/advanced/auth/next-auth/logto.zh-CN.mdx +28 -37
  54. package/docs/self-hosting/advanced/auth/next-auth/microsoft-entra-id.mdx +36 -49
  55. package/docs/self-hosting/advanced/auth/next-auth/microsoft-entra-id.zh-CN.mdx +30 -43
  56. package/docs/self-hosting/advanced/auth/next-auth/wechat.mdx +13 -14
  57. package/docs/self-hosting/advanced/auth/next-auth/wechat.zh-CN.mdx +14 -15
  58. package/docs/self-hosting/advanced/auth/next-auth/zitadel.mdx +35 -69
  59. package/docs/self-hosting/advanced/auth/next-auth/zitadel.zh-CN.mdx +34 -68
  60. package/docs/self-hosting/advanced/auth.mdx +14 -13
  61. package/docs/self-hosting/advanced/auth.zh-CN.mdx +15 -14
  62. package/docs/self-hosting/advanced/feature-flags.zh-CN.mdx +15 -15
  63. package/docs/self-hosting/advanced/knowledge-base.mdx +14 -3
  64. package/docs/self-hosting/advanced/knowledge-base.zh-CN.mdx +12 -3
  65. package/docs/self-hosting/advanced/model-list.zh-CN.mdx +5 -5
  66. package/docs/self-hosting/advanced/s3/cloudflare-r2.mdx +52 -81
  67. package/docs/self-hosting/advanced/s3/cloudflare-r2.zh-CN.mdx +51 -80
  68. package/docs/self-hosting/advanced/s3/tencent-cloud.mdx +20 -34
  69. package/docs/self-hosting/advanced/s3/tencent-cloud.zh-CN.mdx +28 -43
  70. package/docs/self-hosting/advanced/s3.mdx +30 -34
  71. package/docs/self-hosting/advanced/s3.zh-CN.mdx +28 -33
  72. package/docs/self-hosting/advanced/settings-url-share.mdx +6 -6
  73. package/docs/self-hosting/advanced/settings-url-share.zh-CN.mdx +19 -19
  74. package/docs/self-hosting/advanced/upstream-sync.mdx +73 -89
  75. package/docs/self-hosting/advanced/upstream-sync.zh-CN.mdx +71 -87
  76. package/docs/self-hosting/advanced/webrtc.mdx +14 -21
  77. package/docs/self-hosting/advanced/webrtc.zh-CN.mdx +19 -26
  78. package/docs/self-hosting/environment-variables/analytics.zh-CN.mdx +0 -3
  79. package/docs/self-hosting/environment-variables/auth.zh-CN.mdx +1 -1
  80. package/docs/self-hosting/environment-variables/basic.mdx +13 -13
  81. package/docs/self-hosting/environment-variables/basic.zh-CN.mdx +15 -15
  82. package/docs/self-hosting/environment-variables/model-provider.mdx +1 -1
  83. package/docs/self-hosting/environment-variables/model-provider.zh-CN.mdx +1 -1
  84. package/docs/self-hosting/environment-variables/s3.mdx +3 -4
  85. package/docs/self-hosting/environment-variables/s3.zh-CN.mdx +5 -7
  86. package/docs/self-hosting/environment-variables.mdx +8 -4
  87. package/docs/self-hosting/environment-variables.zh-CN.mdx +4 -0
  88. package/docs/self-hosting/examples/azure-openai.mdx +9 -12
  89. package/docs/self-hosting/examples/azure-openai.zh-CN.mdx +8 -11
  90. package/docs/self-hosting/examples/ollama.mdx +8 -7
  91. package/docs/self-hosting/examples/ollama.zh-CN.mdx +8 -7
  92. package/docs/self-hosting/platform/alibaba-cloud.mdx +5 -7
  93. package/docs/self-hosting/platform/alibaba-cloud.zh-CN.mdx +5 -7
  94. package/docs/self-hosting/platform/btpanel.mdx +3 -2
  95. package/docs/self-hosting/platform/btpanel.zh-CN.mdx +3 -3
  96. package/docs/self-hosting/platform/docker-compose.mdx +75 -85
  97. package/docs/self-hosting/platform/docker-compose.zh-CN.mdx +75 -85
  98. package/docs/self-hosting/platform/docker.mdx +87 -92
  99. package/docs/self-hosting/platform/docker.zh-CN.mdx +96 -115
  100. package/docs/self-hosting/platform/netlify.mdx +44 -94
  101. package/docs/self-hosting/platform/netlify.zh-CN.mdx +40 -90
  102. package/docs/self-hosting/platform/railway.mdx +6 -7
  103. package/docs/self-hosting/platform/railway.zh-CN.mdx +6 -7
  104. package/docs/self-hosting/platform/repocloud.mdx +6 -7
  105. package/docs/self-hosting/platform/repocloud.zh-CN.mdx +6 -7
  106. package/docs/self-hosting/platform/sealos.mdx +6 -7
  107. package/docs/self-hosting/platform/sealos.zh-CN.mdx +6 -7
  108. package/docs/self-hosting/platform/vercel.mdx +7 -8
  109. package/docs/self-hosting/platform/vercel.zh-CN.mdx +7 -8
  110. package/docs/self-hosting/platform/zeabur.mdx +29 -32
  111. package/docs/self-hosting/platform/zeabur.zh-CN.mdx +29 -32
  112. package/docs/self-hosting/server-database/docker-compose.mdx +44 -71
  113. package/docs/self-hosting/server-database/docker-compose.zh-CN.mdx +44 -71
  114. package/docs/self-hosting/server-database/docker.mdx +84 -88
  115. package/docs/self-hosting/server-database/docker.zh-CN.mdx +87 -91
  116. package/docs/self-hosting/server-database/dokploy.mdx +18 -1
  117. package/docs/self-hosting/server-database/dokploy.zh-CN.mdx +84 -68
  118. package/docs/self-hosting/server-database/repocloud.mdx +7 -9
  119. package/docs/self-hosting/server-database/repocloud.zh-CN.mdx +9 -11
  120. package/docs/self-hosting/server-database/vercel.mdx +158 -243
  121. package/docs/self-hosting/server-database/vercel.zh-CN.mdx +137 -205
  122. package/docs/self-hosting/server-database/zeabur.mdx +21 -23
  123. package/docs/self-hosting/server-database/zeabur.zh-CN.mdx +20 -22
  124. package/docs/self-hosting/server-database.mdx +34 -36
  125. package/docs/self-hosting/server-database.zh-CN.mdx +34 -37
  126. package/docs/self-hosting/start.mdx +1 -4
  127. package/docs/self-hosting/start.zh-CN.mdx +1 -1
  128. package/docs/usage/agents/agent-organization.mdx +5 -21
  129. package/docs/usage/agents/agent-organization.zh-CN.mdx +5 -21
  130. package/docs/usage/agents/concepts.mdx +4 -4
  131. package/docs/usage/agents/concepts.zh-CN.mdx +4 -4
  132. package/docs/usage/agents/custom-agent.mdx +2 -2
  133. package/docs/usage/agents/custom-agent.zh-CN.mdx +2 -2
  134. package/docs/usage/agents/model.mdx +4 -4
  135. package/docs/usage/agents/model.zh-CN.mdx +6 -6
  136. package/docs/usage/agents/prompt.mdx +5 -6
  137. package/docs/usage/agents/prompt.zh-CN.mdx +5 -6
  138. package/docs/usage/agents/topics.mdx +2 -2
  139. package/docs/usage/agents/topics.zh-CN.mdx +2 -2
  140. package/docs/usage/features/agent-market.mdx +2 -2
  141. package/docs/usage/features/agent-market.zh-CN.mdx +2 -2
  142. package/docs/usage/features/auth.mdx +1 -5
  143. package/docs/usage/features/auth.zh-CN.mdx +1 -5
  144. package/docs/usage/features/database.mdx +1 -5
  145. package/docs/usage/features/database.zh-CN.mdx +1 -5
  146. package/docs/usage/features/local-llm.mdx +2 -6
  147. package/docs/usage/features/local-llm.zh-CN.mdx +2 -6
  148. package/docs/usage/features/mobile.mdx +1 -5
  149. package/docs/usage/features/mobile.zh-CN.mdx +1 -5
  150. package/docs/usage/features/multi-ai-providers.mdx +3 -11
  151. package/docs/usage/features/multi-ai-providers.zh-CN.mdx +3 -11
  152. package/docs/usage/features/plugin-system.mdx +9 -10
  153. package/docs/usage/features/plugin-system.zh-CN.mdx +9 -10
  154. package/docs/usage/features/pwa.mdx +11 -25
  155. package/docs/usage/features/pwa.zh-CN.mdx +11 -25
  156. package/docs/usage/features/text-to-image.mdx +2 -2
  157. package/docs/usage/features/text-to-image.zh-CN.mdx +2 -2
  158. package/docs/usage/features/theme.mdx +1 -6
  159. package/docs/usage/features/theme.zh-CN.mdx +1 -6
  160. package/docs/usage/features/tts.mdx +3 -7
  161. package/docs/usage/features/tts.zh-CN.mdx +3 -7
  162. package/docs/usage/features/vision.mdx +2 -2
  163. package/docs/usage/features/vision.zh-CN.mdx +2 -2
  164. package/docs/usage/foundation/basic.mdx +7 -18
  165. package/docs/usage/foundation/basic.zh-CN.mdx +6 -16
  166. package/docs/usage/foundation/share.mdx +3 -13
  167. package/docs/usage/foundation/share.zh-CN.mdx +3 -13
  168. package/docs/usage/foundation/text2image.mdx +3 -12
  169. package/docs/usage/foundation/text2image.zh-CN.mdx +3 -12
  170. package/docs/usage/foundation/translate.mdx +3 -13
  171. package/docs/usage/foundation/translate.zh-CN.mdx +3 -13
  172. package/docs/usage/foundation/tts-stt.mdx +3 -12
  173. package/docs/usage/foundation/tts-stt.zh-CN.mdx +3 -12
  174. package/docs/usage/foundation/vision.mdx +4 -16
  175. package/docs/usage/foundation/vision.zh-CN.mdx +4 -16
  176. package/docs/usage/plugins/basic-usage.mdx +7 -30
  177. package/docs/usage/plugins/basic-usage.zh-CN.mdx +7 -30
  178. package/docs/usage/plugins/development.mdx +30 -78
  179. package/docs/usage/plugins/development.zh-CN.mdx +31 -79
  180. package/docs/usage/plugins/store.mdx +2 -10
  181. package/docs/usage/plugins/store.zh-CN.mdx +2 -10
  182. package/docs/usage/providers/ai21.mdx +17 -33
  183. package/docs/usage/providers/ai21.zh-CN.mdx +17 -33
  184. package/docs/usage/providers/ai360.mdx +17 -33
  185. package/docs/usage/providers/ai360.zh-CN.mdx +20 -36
  186. package/docs/usage/providers/anthropic.mdx +23 -45
  187. package/docs/usage/providers/anthropic.zh-CN.mdx +22 -44
  188. package/docs/usage/providers/azure.mdx +21 -51
  189. package/docs/usage/providers/azure.zh-CN.mdx +19 -48
  190. package/docs/usage/providers/baichuan.mdx +16 -34
  191. package/docs/usage/providers/baichuan.zh-CN.mdx +15 -33
  192. package/docs/usage/providers/bedrock.mdx +38 -87
  193. package/docs/usage/providers/bedrock.zh-CN.mdx +37 -86
  194. package/docs/usage/providers/cloudflare.mdx +25 -48
  195. package/docs/usage/providers/cloudflare.zh-CN.mdx +24 -45
  196. package/docs/usage/providers/deepseek.mdx +25 -51
  197. package/docs/usage/providers/deepseek.zh-CN.mdx +24 -50
  198. package/docs/usage/providers/fireworksai.mdx +23 -43
  199. package/docs/usage/providers/fireworksai.zh-CN.mdx +21 -41
  200. package/docs/usage/providers/gemini.mdx +20 -46
  201. package/docs/usage/providers/gemini.zh-CN.mdx +20 -46
  202. package/docs/usage/providers/giteeai.mdx +24 -45
  203. package/docs/usage/providers/giteeai.zh-CN.mdx +22 -43
  204. package/docs/usage/providers/github.mdx +19 -45
  205. package/docs/usage/providers/github.zh-CN.mdx +19 -44
  206. package/docs/usage/providers/groq.mdx +12 -29
  207. package/docs/usage/providers/groq.zh-CN.mdx +11 -28
  208. package/docs/usage/providers/hunyuan.mdx +19 -39
  209. package/docs/usage/providers/hunyuan.zh-CN.mdx +18 -38
  210. package/docs/usage/providers/internlm.mdx +21 -38
  211. package/docs/usage/providers/internlm.zh-CN.mdx +19 -36
  212. package/docs/usage/providers/minimax.mdx +24 -50
  213. package/docs/usage/providers/minimax.zh-CN.mdx +22 -48
  214. package/docs/usage/providers/mistral.mdx +21 -39
  215. package/docs/usage/providers/mistral.zh-CN.mdx +20 -38
  216. package/docs/usage/providers/moonshot.mdx +20 -38
  217. package/docs/usage/providers/moonshot.zh-CN.mdx +19 -37
  218. package/docs/usage/providers/novita.mdx +20 -43
  219. package/docs/usage/providers/novita.zh-CN.mdx +19 -42
  220. package/docs/usage/providers/ollama/gemma.mdx +12 -29
  221. package/docs/usage/providers/ollama/gemma.zh-CN.mdx +12 -30
  222. package/docs/usage/providers/ollama/qwen.mdx +17 -32
  223. package/docs/usage/providers/ollama/qwen.zh-CN.mdx +12 -27
  224. package/docs/usage/providers/ollama.mdx +67 -99
  225. package/docs/usage/providers/ollama.zh-CN.mdx +67 -99
  226. package/docs/usage/providers/openai.mdx +42 -56
  227. package/docs/usage/providers/openai.zh-CN.mdx +39 -52
  228. package/docs/usage/providers/openrouter.mdx +48 -84
  229. package/docs/usage/providers/openrouter.zh-CN.mdx +31 -67
  230. package/docs/usage/providers/perplexity.mdx +16 -34
  231. package/docs/usage/providers/perplexity.zh-CN.mdx +16 -34
  232. package/docs/usage/providers/qwen.mdx +26 -52
  233. package/docs/usage/providers/qwen.zh-CN.mdx +25 -51
  234. package/docs/usage/providers/sensenova.mdx +24 -45
  235. package/docs/usage/providers/sensenova.zh-CN.mdx +22 -43
  236. package/docs/usage/providers/siliconcloud.mdx +17 -33
  237. package/docs/usage/providers/siliconcloud.zh-CN.mdx +17 -33
  238. package/docs/usage/providers/spark.mdx +20 -40
  239. package/docs/usage/providers/spark.zh-CN.mdx +19 -39
  240. package/docs/usage/providers/stepfun.mdx +17 -35
  241. package/docs/usage/providers/stepfun.zh-CN.mdx +17 -35
  242. package/docs/usage/providers/taichu.mdx +16 -34
  243. package/docs/usage/providers/taichu.zh-CN.mdx +15 -33
  244. package/docs/usage/providers/togetherai.mdx +18 -40
  245. package/docs/usage/providers/togetherai.zh-CN.mdx +18 -40
  246. package/docs/usage/providers/upstage.mdx +18 -34
  247. package/docs/usage/providers/upstage.zh-CN.mdx +17 -33
  248. package/docs/usage/providers/wenxin.mdx +22 -42
  249. package/docs/usage/providers/wenxin.zh-CN.mdx +20 -40
  250. package/docs/usage/providers/xai.mdx +21 -38
  251. package/docs/usage/providers/xai.zh-CN.mdx +20 -37
  252. package/docs/usage/providers/zeroone.mdx +22 -48
  253. package/docs/usage/providers/zeroone.zh-CN.mdx +22 -48
  254. package/docs/usage/providers/zhipu.mdx +17 -35
  255. package/docs/usage/providers/zhipu.zh-CN.mdx +18 -34
  256. package/docs/usage/providers.mdx +1 -6
  257. package/docs/usage/providers.zh-CN.mdx +1 -6
  258. package/docs/usage/start.mdx +4 -18
  259. package/docs/usage/start.zh-CN.mdx +2 -19
  260. package/docs/usage/tools-calling/anthropic.mdx +18 -51
  261. package/docs/usage/tools-calling/anthropic.zh-CN.mdx +22 -55
  262. package/docs/usage/tools-calling/google.mdx +16 -23
  263. package/docs/usage/tools-calling/google.zh-CN.mdx +17 -24
  264. package/docs/usage/tools-calling/groq.mdx +9 -0
  265. package/docs/usage/tools-calling/groq.zh-CN.mdx +44 -70
  266. package/docs/usage/tools-calling/moonshot.mdx +9 -0
  267. package/docs/usage/tools-calling/openai.mdx +19 -44
  268. package/docs/usage/tools-calling/openai.zh-CN.mdx +20 -45
  269. package/docs/usage/tools-calling.mdx +9 -0
  270. package/docs/usage/tools-calling.zh-CN.mdx +60 -68
  271. package/package.json +42 -41
  272. package/scripts/mdxWorkflow/index.ts +7 -0
  273. package/src/app/(main)/(mobile)/me/(home)/features/Header.tsx +2 -1
  274. package/src/app/(main)/(mobile)/me/data/features/Header.tsx +1 -1
  275. package/src/app/(main)/(mobile)/me/profile/features/Header.tsx +1 -1
  276. package/src/app/(main)/(mobile)/me/settings/features/Header.tsx +1 -1
  277. package/src/app/(main)/@nav/_layout/Mobile.tsx +2 -1
  278. package/src/app/(main)/chat/(workspace)/@topic/features/SystemRole/SystemRoleContent.tsx +2 -1
  279. package/src/app/(main)/chat/(workspace)/@topic/features/TopicListContent/ByTimeMode/GroupItem.tsx +2 -2
  280. package/src/app/(main)/chat/(workspace)/_layout/Desktop/ChatHeader/Main.tsx +2 -1
  281. package/src/app/(main)/chat/(workspace)/_layout/Desktop/ChatHeader/index.tsx +1 -1
  282. package/src/app/(main)/chat/(workspace)/_layout/Mobile/ChatHeader/ChatHeaderTitle.tsx +2 -1
  283. package/src/app/(main)/chat/(workspace)/_layout/Mobile/ChatHeader/index.tsx +1 -1
  284. package/src/app/(main)/chat/@session/_layout/Mobile/SessionHeader.tsx +2 -1
  285. package/src/app/(main)/chat/settings/_layout/Desktop/Header.tsx +1 -1
  286. package/src/app/(main)/chat/settings/_layout/Mobile/Header.tsx +1 -1
  287. package/src/app/(main)/discover/(detail)/provider/[slug]/features/InfoSidebar/SuggestionItem.tsx +8 -6
  288. package/src/app/(main)/discover/(list)/_layout/Desktop/Nav.tsx +1 -1
  289. package/src/app/(main)/discover/(list)/_layout/Mobile/Header.tsx +2 -1
  290. package/src/app/(main)/discover/_layout/Desktop/Header.tsx +1 -1
  291. package/src/app/(main)/discover/components/VirtuosoGridList/index.tsx +9 -5
  292. package/src/app/(main)/discover/search/_layout/Mobile/Header.tsx +1 -1
  293. package/src/app/(main)/files/(content)/@menu/features/KnowledgeBase/EmptyStatus.tsx +21 -13
  294. package/src/app/(main)/repos/[id]/evals/evaluation/EvaluationList/index.tsx +1 -1
  295. package/src/app/(main)/settings/sync/features/DeviceInfo/SystemIcon.tsx +2 -0
  296. package/src/components/Branding/ProductLogo/Custom.tsx +19 -20
  297. package/src/components/BrowserIcon/index.tsx +19 -30
  298. package/src/components/BubblesLoading/index.tsx +31 -23
  299. package/src/components/FunctionModal/createModalHooks.ts +6 -3
  300. package/src/components/StopLoading.tsx +10 -7
  301. package/src/database/repositories/aiInfra/index.ts +19 -7
  302. package/src/database/server/models/__tests__/aiModel.test.ts +4 -6
  303. package/src/database/server/models/aiModel.ts +6 -3
  304. package/src/features/ChatInput/Desktop/InputArea/index.tsx +2 -2
  305. package/src/features/InitClientDB/EnableModal.tsx +2 -2
  306. package/src/features/InitClientDB/{PGliteSVG.tsx → PGliteIcon.tsx} +17 -11
  307. package/src/features/ShareModal/ShareImage/index.tsx +32 -22
  308. package/src/features/ShareModal/ShareJSON/Preview.tsx +2 -2
  309. package/src/features/ShareModal/ShareJSON/index.tsx +49 -37
  310. package/src/features/ShareModal/ShareText/Preview.tsx +4 -1
  311. package/src/features/ShareModal/ShareText/index.tsx +49 -38
  312. package/src/features/ShareModal/index.tsx +1 -1
  313. package/src/features/ShareModal/style.ts +30 -0
  314. package/src/store/aiInfra/slices/aiProvider/action.ts +1 -1
  315. package/src/types/aiProvider.ts +1 -0
  316. package/src/utils/colorUtils.ts +1 -1
  317. package/src/components/BrowserIcon/components/Brave.tsx +0 -56
  318. package/src/components/BrowserIcon/components/Chrome.tsx +0 -14
  319. package/src/components/BrowserIcon/components/Chromium.tsx +0 -14
  320. package/src/components/BrowserIcon/components/Edge.tsx +0 -36
  321. package/src/components/BrowserIcon/components/Firefox.tsx +0 -38
  322. package/src/components/BrowserIcon/components/Opera.tsx +0 -19
  323. package/src/components/BrowserIcon/components/Safari.tsx +0 -23
  324. package/src/components/BrowserIcon/components/Samsung.tsx +0 -21
@@ -25,27 +25,15 @@ tags:
25
25
 
26
26
  当你 Fork 了项目后,由于 Github 的限制,你需要手动在你 Fork 的项目的 Actions 页面启用 Workflows,并启动 Upstream Sync Action。启用后,你可以设置每小时进行一次自动更新。
27
27
 
28
- <Image
29
- alt="启动自动更新 S1"
30
- src="https://github-production-user-asset-6210df.s3.amazonaws.com/17870709/266985117-4d48fe7b-0412-4667-8129-b25ebcf2c9de.png"
31
- />
28
+ <Image alt="启动自动更新 S1" src="https://github-production-user-asset-6210df.s3.amazonaws.com/17870709/266985117-4d48fe7b-0412-4667-8129-b25ebcf2c9de.png" />
32
29
 
33
- <Image
34
- alt="启动自动更新 S2"
35
- src="https://github-production-user-asset-6210df.s3.amazonaws.com/17870709/266985177-7677b4ce-c348-4145-9f60-829d448d5be6.png"
36
- />
30
+ <Image alt="启动自动更新 S2" src="https://github-production-user-asset-6210df.s3.amazonaws.com/17870709/266985177-7677b4ce-c348-4145-9f60-829d448d5be6.png" />
37
31
 
38
32
  如果你遇到了同步失败的情况,你需要手动重新点一次 「Update Branch」。
39
33
 
40
- <Image
41
- alt="GitHub Action 同步失败"
42
- src="https://github.com/user-attachments/assets/9baacac6-5af4-460b-862d-682b76c18459"
43
- />
34
+ <Image alt="GitHub Action 同步失败" src="https://github.com/user-attachments/assets/9baacac6-5af4-460b-862d-682b76c18459" />
44
35
 
45
- <Image
46
- alt="手动同步 「Update Branch」"
47
- src="https://github.com/user-attachments/assets/d524c20d-306a-45bc-971b-96920b87fab4"
48
- />
36
+ <Image alt="手动同步 「Update Branch」" src="https://github.com/user-attachments/assets/d524c20d-306a-45bc-971b-96920b87fab4" />
49
37
 
50
38
  ## `B` Docker 部署
51
39
 
@@ -54,34 +42,33 @@ Docker 部署版本的升级非常简单,只需要重新部署 LobeChat 的最
54
42
  <Steps>
55
43
  ### 停止并删除当前运行的 LobeChat 容器
56
44
 
57
- 假设 LobeChat 容器的名称是 `lobe-chat`,使用以下指令停止并删除当前运行的 LobeChat 容器:
45
+ 假设 LobeChat 容器的名称是 `lobe-chat`,使用以下指令停止并删除当前运行的 LobeChat 容器:
58
46
 
59
- ```fish
60
- docker stop lobe-chat
61
- docker rm lobe-chat
62
- ```
47
+ ```fish
48
+ docker stop lobe-chat
49
+ docker rm lobe-chat
50
+ ```
63
51
 
64
- ### 拉取最新的 LobeChat 镜像
52
+ ### 拉取最新的 LobeChat 镜像
65
53
 
66
- 使用以下命令拉取 LobeChat 的最新 Docker 镜像:
54
+ 使用以下命令拉取 LobeChat 的最新 Docker 镜像:
67
55
 
68
- ```fish
69
- docker pull lobehub/lobe-chat
70
- ```
56
+ ```fish
57
+ docker pull lobehub/lobe-chat
58
+ ```
71
59
 
72
- ### 重新启动 Docker 容器
60
+ ### 重新启动 Docker 容器
73
61
 
74
- 使用新拉取的镜像重新部署 LobeChat 容器:
75
-
76
- ```fish
77
- docker run -d -p 3210:3210 \
78
- -e OPENAI_API_KEY=sk-xxxx \
79
- -e OPENAI_PROXY_URL=https://api-proxy.com/v1 \
80
- -e ACCESS_CODE=lobe66 \
81
- --name lobe-chat \
82
- lobehub/lobe-chat
83
- ```
62
+ 使用新拉取的镜像重新部署 LobeChat 容器:
84
63
 
64
+ ```fish
65
+ docker run -d -p 3210:3210 \
66
+ -e OPENAI_API_KEY=sk-xxxx \
67
+ -e OPENAI_PROXY_URL=https://api-proxy.com/v1 \
68
+ -e ACCESS_CODE=lobe66 \
69
+ --name lobe-chat \
70
+ lobehub/lobe-chat
71
+ ```
85
72
  </Steps>
86
73
 
87
74
  确保在执行这些命令之前,您有足够的权限来停止和删除容器,并且 Docker 有足够的权限来拉取新的镜像。
@@ -89,77 +76,74 @@ docker run -d -p 3210:3210 \
89
76
  <Callout type={'tip'}>
90
77
  **重新部署的话,我本地的聊天记录会丢失吗?**
91
78
 
92
- 放心,不会的。LobeChat 的聊天记录全部都存储在你的本地浏览器中。因此使用 Docker 重新部署 LobeChat 时,你的聊天记录并不会丢失。
93
-
79
+ 放心,不会的。LobeChat 的聊天记录全部都存储在你的本地浏览器中。因此使用 Docker 重新部署 LobeChat 时,你的聊天记录并不会丢失。
94
80
  </Callout>
95
81
 
96
82
  如果你希望自动化执行以上步骤,你可以参照下面的方法,利用 Crontab 定时来完成。具体步骤如下。
97
83
 
98
84
  <Steps>
85
+ ### 撰写自动更新脚本、配置文件
99
86
 
100
- ### 撰写自动更新脚本、配置文件
101
-
102
- 首先,新建一个 `lobe.env` 配置文件,内容为各种环境变量,例如:
87
+ 首先,新建一个 `lobe.env` 配置文件,内容为各种环境变量,例如:
103
88
 
104
- ```env
105
- OPENAI_API_KEY=sk-xxxx
106
- OPENAI_PROXY_URL=https://api-proxy.com/v1
107
- ACCESS_CODE=arthals2333
108
- OPENAI_MODEL_LIST=-gpt-4,-gpt-4-32k,-gpt-3.5-turbo-16k,gpt-3.5-turbo-1106=gpt-3.5-turbo-16k,gpt-4-0125-preview=gpt-4-turbo,gpt-4-vision-preview=gpt-4-vision
109
- ```
89
+ ```env
90
+ OPENAI_API_KEY=sk-xxxx
91
+ OPENAI_PROXY_URL=https://api-proxy.com/v1
92
+ ACCESS_CODE=arthals2333
93
+ OPENAI_MODEL_LIST=-gpt-4,-gpt-4-32k,-gpt-3.5-turbo-16k,gpt-3.5-turbo-1106=gpt-3.5-turbo-16k,gpt-4-0125-preview=gpt-4-turbo,gpt-4-vision-preview=gpt-4-vision
94
+ ```
110
95
 
111
- 然后,你可以使用以下脚本来自动更新:
96
+ 然后,你可以使用以下脚本来自动更新:
112
97
 
113
- ```bash
114
- #!/bin/bash
115
- # auto-update-lobe-chat.sh
98
+ ```bash
99
+ #!/bin/bash
100
+ # auto-update-lobe-chat.sh
116
101
 
117
- # 设置代理(可选)
118
- # 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
102
+ # 设置代理(可选)
103
+ # 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
119
104
 
120
- # 拉取最新的镜像并将输出存储在变量中
121
- output=$(docker pull lobehub/lobe-chat:latest 2>&1)
105
+ # 拉取最新的镜像并将输出存储在变量中
106
+ output=$(docker pull lobehub/lobe-chat:latest 2>&1)
122
107
 
123
- # 检查拉取命令是否成功执行
124
- if [ $? -ne 0 ]; then
125
- exit 1
126
- fi
108
+ # 检查拉取命令是否成功执行
109
+ if [ $? -ne 0 ]; then
110
+ exit 1
111
+ fi
127
112
 
128
- # 检查输出中是否包含特定的字符串
129
- echo "$output" | grep -q "Image is up to date for lobehub/lobe-chat:latest"
113
+ # 检查输出中是否包含特定的字符串
114
+ echo "$output" | grep -q "Image is up to date for lobehub/lobe-chat:latest"
130
115
 
131
- # 如果镜像已经是最新的,则不执行任何操作
132
- if [ $? -eq 0 ]; then
133
- exit 0
134
- fi
116
+ # 如果镜像已经是最新的,则不执行任何操作
117
+ if [ $? -eq 0 ]; then
118
+ exit 0
119
+ fi
135
120
 
136
- echo "Detected lobe-chat update"
121
+ echo "Detected lobe-chat update"
137
122
 
138
- # 删除旧的容器
139
- echo "Removed: $(docker rm -f lobe-chat)"
123
+ # 删除旧的容器
124
+ echo "Removed: $(docker rm -f lobe-chat)"
140
125
 
141
- # 运行新的容器(请将env配置文件地址改为你的实际地址)
142
- echo "Started: $(docker run -d --network=host --env-file path/to/lobe.env --name=lobe-chat --restart=always lobehub/lobe-chat)"
126
+ # 运行新的容器(请将env配置文件地址改为你的实际地址)
127
+ echo "Started: $(docker run -d --network=host --env-file path/to/lobe.env --name=lobe-chat --restart=always lobehub/lobe-chat)"
143
128
 
144
- # 打印更新的时间和版本
145
- echo "Update time: $(date)"
146
- echo "Version: $(docker inspect lobehub/lobe-chat:latest | grep 'org.opencontainers.image.version' | awk -F'"' '{print $4}')"
129
+ # 打印更新的时间和版本
130
+ echo "Update time: $(date)"
131
+ echo "Version: $(docker inspect lobehub/lobe-chat:latest | grep 'org.opencontainers.image.version' | awk -F'"' '{print $4}')"
147
132
 
148
- # 清理不再使用的镜像
149
- docker images | grep 'lobehub/lobe-chat' | grep -v 'lobehub/lobe-chat-database' | grep -v 'latest' | awk '{print $3}' | xargs -r docker rmi > /dev/null 2>&1
150
- echo "Removed old images."
151
- ```
152
-
153
- <Callout type={'warning'}>
154
- 此脚本可以在 Crontab 中使用,但请确认你的 Crontab 可以找到正确的 Docker 命令。建议使用绝对路径。
155
- </Callout>
133
+ # 清理不再使用的镜像
134
+ docker images | grep 'lobehub/lobe-chat' | grep -v 'lobehub/lobe-chat-database' | grep -v 'latest' | awk '{print $3}' | xargs -r docker rmi > /dev/null 2>&1
135
+ echo "Removed old images."
136
+ ```
156
137
 
157
- ### 配置 Crontab 自动执行脚本
138
+ <Callout type={'warning'}>
139
+ 此脚本可以在 Crontab 中使用,但请确认你的 Crontab 可以找到正确的 Docker 命令。建议使用绝对路径。
140
+ </Callout>
158
141
 
159
- 以下命令可以配置 Crontab 每 5 分钟执行一次脚本,你也可以根据需要调整执行频率:
142
+ ### 配置 Crontab 自动执行脚本
160
143
 
161
- ```bash
162
- */5 * * * * /path/to/auto-update-lobe-chat.sh >> /path/to/auto-update-lobe-chat.log 2>&1
163
- ```
144
+ 以下命令可以配置 Crontab 每 5 分钟执行一次脚本,你也可以根据需要调整执行频率:
164
145
 
146
+ ```bash
147
+ */5 * * * * /path/to/auto-update-lobe-chat.sh >> /path/to/auto-update-lobe-chat.log 2>&1
148
+ ```
165
149
  </Steps>
@@ -22,38 +22,31 @@ WebRTC (Web Real-Time Communication) is a technology that enables peer-to-peer c
22
22
  To use the WebRTC synchronization feature in LobeChat, you need to complete the following steps:
23
23
 
24
24
  <Steps>
25
+ ### Deploy Signaling Server
25
26
 
26
- ### Deploy Signaling Server
27
+ Deploy a WebRTC signaling server with one click using the Zeabur platform:
27
28
 
28
- Deploy a WebRTC signaling server with one click using the Zeabur platform:
29
+ [![Deploy on Zeabur](https://zeabur.com/button.svg)](https://zeabur.com/templates/MY0JZG?referralCode=arvinxx)
29
30
 
30
- [![Deploy on Zeabur](https://zeabur.com/button.svg)](https://zeabur.com/templates/MY0JZG?referralCode=arvinxx)
31
+ Alternatively, you can view the [source code](https://github.com/lobehub/y-webrtc-signaling) and deploy it on your own.
31
32
 
32
- Alternatively, you can view the [source code](https://github.com/lobehub/y-webrtc-signaling) and deploy it on your own.
33
+ After deployment, you will receive a URL, for example: `https://my-signaling-server.zeabur.app`.
33
34
 
34
- After deployment, you will receive a URL, for example: `https://my-signaling-server.zeabur.app`.
35
+ ### Enable WebRTC Sync in the Deployment Instance
35
36
 
36
- ### Enable WebRTC Sync in the Deployment Instance
37
+ The WebRTC sync feature in LobeChat is hidden by default and needs to be enabled by adding the environment variable `FEATURE_FLAGS=+webrtc_sync`.
37
38
 
38
- The WebRTC sync feature in LobeChat is hidden by default and needs to be enabled by adding the environment variable `FEATURE_FLAGS=+webrtc_sync`.
39
+ ### Configure WebRTC Sync Settings in LobeChat
39
40
 
40
- ### Configure WebRTC Sync Settings in LobeChat
41
+ 1. Open LobeChat settings -> Data Sync
42
+ 2. Enter the signaling server address in the WebRTC sync section;
43
+ 3. Set the sync channel name and password
41
44
 
42
- 1. Open LobeChat settings -> Data Sync
43
- 2. Enter the signaling server address in the WebRTC sync section;
44
- 3. Set the sync channel name and password
45
+ <Image alt={'LobeChat Data Sync Settings Page'} height={356} inStep src={'https://github.com/lobehub/lobe-chat/assets/28616219/bf86bf1e-87fb-4015-8587-15ff28bb9c24'} />
45
46
 
46
- <Image
47
- alt={'LobeChat Data Sync Settings Page'}
48
- height={356}
49
- inStep
50
- src={'https://github.com/lobehub/lobe-chat/assets/28616219/bf86bf1e-87fb-4015-8587-15ff28bb9c24'}
51
- />
52
-
53
- ### Repeat the Above Configuration on Devices that Need to Sync
54
-
55
- Ensure all devices use the same signaling server, channel name, and password. Once configured, the devices should automatically start syncing data.
47
+ ### Repeat the Above Configuration on Devices that Need to Sync
56
48
 
49
+ Ensure all devices use the same signaling server, channel name, and password. Once configured, the devices should automatically start syncing data.
57
50
  </Steps>
58
51
 
59
52
  ## Limitations and Known Issues
@@ -10,45 +10,38 @@ tags:
10
10
 
11
11
  ## WebRTC 简介
12
12
 
13
- WebRTC (Web Real-Time Communication) 是一项实现浏览器之间点对点通信的技术。在 LobeChat 中,我们实验性地基于 WebRTC 和 YJS 实现了设备间的实时数据同步,无需依赖传统的服务器数据库。这种方案具有高度隐私性、零冲突性,并能提供实时会话同步体验。
13
+ WebRTC (Web Real-Time Communication) 是一项实现浏览器之间点对点通信的技术。在 LobeChat 中,我们实验性地基于 WebRTC 和 YJS 实现了设备间的实时数据同步,无需依赖传统的服务器数据库。这种方案具有高度隐私性、零冲突性,并能提供实时会话同步体验。
14
14
 
15
15
  ## 配置 WebRTC 并实现同步
16
16
 
17
- 要使用 LobeChat 的 WebRTC 同步功能,需要完成以下步骤:
17
+ 要使用 LobeChat 的 WebRTC 同步功能,需要完成以下步骤:
18
18
 
19
19
  <Steps>
20
+ ### 部署信令服务器
20
21
 
21
- ### 部署信令服务器
22
+ 使用 Zeabur 平台一键部署 WebRTC 信令服务器:
22
23
 
23
- 使用 Zeabur 平台一键部署 WebRTC 信令服务器:
24
+ [![Deploy on Zeabur](https://zeabur.com/button.svg)](https://zeabur.com/templates/MY0JZG?referralCode=arvinxx)
24
25
 
25
- [![Deploy on Zeabur](https://zeabur.com/button.svg)](https://zeabur.com/templates/MY0JZG?referralCode=arvinxx)
26
+ 或者查看 [源码](https://github.com/lobehub/y-webrtc-signaling) 自行部署。
26
27
 
27
- 或者查看 [源码](https://github.com/lobehub/y-webrtc-signaling) 自行部署。
28
+ 部署完成后,可以得到一个 URL,例如:`https://my-signaling-server.zeabur.app`。
28
29
 
29
- 部署完成后,可以得到一个 URL,例如:`https://my-signaling-server.zeabur.app`。
30
+ ### 在部署实例中开启 WebRTC 同步
30
31
 
31
- ### 在部署实例中开启 WebRTC 同步
32
+ LobeChat 默认隐藏了 WebRTC 同步功能,需要通过添加环境变量 `FEATURE_FLAGS=+webrtc_sync` 来开启 WebRTC 同步特性。
32
33
 
33
- LobeChat 默认隐藏了 WebRTC 同步功能,需要通过添加环境变量 `FEATURE_FLAGS=+webrtc_sync` 来开启 WebRTC 同步特性。
34
+ ### 配置 LobeChat WebRTC 同步设置
34
35
 
35
- ### 配置 LobeChat WebRTC 同步设置
36
+ 1. 打开 LobeChat 设置 -> 数据同步
37
+ 2. 在 WebRTC 同步中填写信令服务器地址;
38
+ 3. 设置同步频道名称和密码
36
39
 
37
- 1. 打开 LobeChat 设置 -> 数据同步
38
- 2. 在 WebRTC 同步中填写信令服务器地址;
39
- 3. 设置同步频道名称和密码
40
+ <Image alt={'LobeChat 数据同步设置页'} height={356} inStep src={'https://github.com/lobehub/lobe-chat/assets/28616219/bf86bf1e-87fb-4015-8587-15ff28bb9c24'} />
40
41
 
41
- <Image
42
- alt={'LobeChat 数据同步设置页'}
43
- height={356}
44
- inStep
45
- src={'https://github.com/lobehub/lobe-chat/assets/28616219/bf86bf1e-87fb-4015-8587-15ff28bb9c24'}
46
- />
47
-
48
- ### 在需要同步的设备上重复以上配置
49
-
50
- 确保所有设备使用相同的信令服务器、频道名称和密码,完成配置后,设备间应该可以开始自动同步数据。
42
+ ### 在需要同步的设备上重复以上配置
51
43
 
44
+ 确保所有设备使用相同的信令服务器、频道名称和密码,完成配置后,设备间应该可以开始自动同步数据。
52
45
  </Steps>
53
46
 
54
47
  ## 使用局限性和已知问题
@@ -67,17 +60,17 @@ WebRTC 要求设备同时在线才能进行同步,这意味着无法在一台
67
60
 
68
61
  由于 WebRTC 的实现机制,其点对点通信对于网络要求非常苛刻,我们的很多用户反馈:
69
62
 
70
- - 在 PC 上可以互相同步、 手机 sim 卡无法和 PC 同步、但是换成和PC一样的WIFI可以和 PC 同步;
63
+ - 在 PC 上可以互相同步、 手机 sim 卡无法和 PC 同步、但是换成和 PC 一样的 WIFI 可以和 PC 同步;
71
64
  - 任何切换网络都无法同步;
72
65
 
73
66
  ### 稳定性与性能问题
74
67
 
75
68
  - 部分用户报告在 Firefox 浏览器上遇到 ICE 连接失败的问题:[WebRTC Data Sync Feedback](https://github.com/lobehub/lobe-chat/issues/1683#issuecomment-2094745907)
76
- - 对于超长文本或大量对话记录,同步过程可能变慢或不稳定:[当模型输出超长对话时,对话末尾会出现同步相关的内容标签,导致同步失败](https://github.com/lobehub/lobe-chat/issues/1962)
69
+ - 对于超长文本或大量对话记录,同步过程可能变慢或不稳定:[当模型输出超长对话时,对话末尾会出现同步相关的内容标签,导致同步失败](https://github.com/lobehub/lobe-chat/issues/1962)
77
70
 
78
71
  ## 我们的建议
79
72
 
80
- 鉴于以上原因,我们建议用户将 WebRTC 同步功能视为实验性功能,并定期备份重要数据。
73
+ 鉴于以上原因,我们建议用户将 WebRTC 同步功能视为实验性功能,并定期备份重要数据。
81
74
 
82
75
  目前我们已经发布了更稳定、更用户友好的服务端数据库同步方案([部署指南](/zh/docs/self-hosting/advanced/server-database)),我们建议用户优先考虑使用服务端数据库同步方案。
83
76
 
@@ -77,6 +77,3 @@ tags:
77
77
  - 描述:Umami 脚本的网址,默认为 Umami Cloud 提供的脚本网址
78
78
  - 默认值:`https://analytics.umami.is/script.js`
79
79
  - 示例:`https://umami.your-site.com/script.js`
80
-
81
- [posthog-analytics-url]: https://posthog.com
82
- [umami-analytics-url]: https://umami.is
@@ -47,7 +47,7 @@ LobeChat 在部署时提供了完善的身份验证服务能力,以下是相
47
47
  - 默认值: `-`
48
48
  - 示例: `evCnOJP1UX8FMnXR9Xkj5t0NyFn5p70P`
49
49
 
50
- #### \`AUTH_AUTH_SECRET
50
+ #### `AUTH_AUTH_SECRET`
51
51
 
52
52
  - 类型:必选
53
53
  - 描述: Auth0 应用程序的 Client Secret
@@ -54,22 +54,22 @@ When using the `turn` mode, the API Keys will be retrieved in a polling manner a
54
54
 
55
55
  The `DEFAULT_AGENT_CONFIG` is used to configure the default settings for the LobeChat default agent. It supports various data types and structures, including key-value pairs, nested fields, array values, and more. The table below provides detailed information on the configuration options, examples, and corresponding explanations for the `DEFAULT_AGENT_CONFIG` environment variable:
56
56
 
57
- | Configuration Type | Example | Explanation |
58
- | --- | --- | --- |
59
- | Basic Key-Value Pair | `model=gpt-4` | Set the model to `gpt-4`. |
60
- | Nested Field | `tts.sttLocale=en-US` | Set the language locale for the text-to-speech service to `en-US`. |
61
- | Array | `plugins=search-engine,lobe-image-designer` | Enable the `search-engine` and `lobe-image-designer` plugins. |
62
- | Chinese Comma | `plugins=search-engine,lobe-image-designer` | Same as above, demonstrating support for Chinese comma separation. |
63
- | Multiple Configurations | `model=glm-4;provider=zhipu` | Set the model to `glm-4` and the model provider to `zhipu`. |
64
- | Numeric Value | `params.max_tokens=300`, `chatConfig.historyCount=5` | Set the maximum tokens to `300`, Set the number of historical messages to 5. |
65
- | Boolean Value | `chatConfig.enableAutoCreateTopic=true`, `chatConfig.enableCompressThreshold=true`, `chatConfig.enableHistoryCount=true` | Enable automatic topic creation, History length compression threshold, number of historical records. |
66
- | Special Characters | `inputTemplate="Hello; I am a bot;"` | Set the input template to `Hello; I am a bot;`. |
67
- | Error Handling | `model=gpt-4;maxToken` | Ignore invalid entry `maxToken` and only parse `model=gpt-4`. |
68
- | Value Override | `model=gpt-4;model=gpt-4-1106-preview` | If a key is repeated, use the value that appears last; in this case, the value of `model` is `gpt-4-1106-preview`. |
57
+ | Configuration Type | Example | Explanation |
58
+ | ----------------------- | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ |
59
+ | Basic Key-Value Pair | `model=gpt-4` | Set the model to `gpt-4`. |
60
+ | Nested Field | `tts.sttLocale=en-US` | Set the language locale for the text-to-speech service to `en-US`. |
61
+ | Array | `plugins=search-engine,lobe-image-designer` | Enable the `search-engine` and `lobe-image-designer` plugins. |
62
+ | Chinese Comma | `plugins=search-engine,lobe-image-designer` | Same as above, demonstrating support for Chinese comma separation. |
63
+ | Multiple Configurations | `model=glm-4;provider=zhipu` | Set the model to `glm-4` and the model provider to `zhipu`. |
64
+ | Numeric Value | `params.max_tokens=300`, `chatConfig.historyCount=5` | Set the maximum tokens to `300`, Set the number of historical messages to 5. |
65
+ | Boolean Value | `chatConfig.enableAutoCreateTopic=true`, `chatConfig.enableCompressThreshold=true`, `chatConfig.enableHistoryCount=true` | Enable automatic topic creation, History length compression threshold, number of historical records. |
66
+ | Special Characters | `inputTemplate="Hello; I am a bot;"` | Set the input template to `Hello; I am a bot;`. |
67
+ | Error Handling | `model=gpt-4;maxToken` | Ignore invalid entry `maxToken` and only parse `model=gpt-4`. |
68
+ | Value Override | `model=gpt-4;model=gpt-4-1106-preview` | If a key is repeated, use the value that appears last; in this case, the value of `model` is `gpt-4-1106-preview`. |
69
69
 
70
70
  Further reading:
71
71
 
72
- - [[RFC] 022 - Default Assistant Parameters Configuration via Environment Variables](https://github.com/lobehub/lobe-chat/discussions/913)
72
+ - [\[RFC\] 022 - Default Assistant Parameters Configuration via Environment Variables](https://github.com/lobehub/lobe-chat/discussions/913)
73
73
 
74
74
  ### `FEATURE_FLAGS`
75
75
 
@@ -50,22 +50,22 @@ LobeChat 在部署时提供了一些额外的配置项,你可以使用环境
50
50
 
51
51
  `DEFAULT_AGENT_CONFIG` 用于配置 LobeChat 默认助理的默认配置。它支持多种数据类型和结构,包括键值对、嵌套字段、数组值等。下表详细说明了 `DEFAULT_AGENT_CONFIG` 环境变量的配置项、示例以及相应解释:
52
52
 
53
- | 配置项类型 | 示例 | 解释 |
54
- | --- | --- | --- |
55
- | 基本键值对 | `model=gpt-4` | 设置模型为 `gpt-4`。 |
56
- | 嵌套字段 | `tts.sttLocale=en-US` | 设置文本到语音服务的语言区域为 `en-US`。 |
57
- | 数组 | `plugins=search-engine,lobe-image-designer` | 启用 `search-engine` 和 `lobe-image-designer` 插件。 |
58
- | 中文逗号 | `plugins=search-engine,lobe-image-designer` | 同上,演示支持中文逗号分隔。 |
59
- | 多个配置项 | `model=glm-4;provider=zhipu` | 设置模型为 `glm-4` 且模型服务商为 `zhipu`。 |
60
- | 数字值 | `params.max_tokens=300`, `chatConfig.historyCount=5` | 设置最大令牌数为 `300`,设置历史消息条数为5。 |
61
- | 布尔值 | `chatConfig.enableAutoCreateTopic=true`,`chatConfig.enableCompressThreshold=true`, `chatConfig.enableHistoryCount=true` | 启用自动创建主题,历史长度压缩阈值,历史记录条数。 |
62
- | 特殊字符 | `inputTemplate="Hello; I am a bot;"` | 设置输入模板为 `Hello; I am a bot;`。 |
63
- | 错误处理 | `model=gpt-4;maxToken` | 忽略无效条目 `maxToken`,仅解析出 `model=gpt-4`。 |
64
- | 值覆盖 | `model=gpt-4;model=gpt-4-1106-preview` | 如果键重复,使用最后一次出现的值,此处 `model` 的值为 `gpt-4-1106-preview`。 |
53
+ | 配置项类型 | 示例 | 解释 |
54
+ | ----- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------- |
55
+ | 基本键值对 | `model=gpt-4` | 设置模型为 `gpt-4`。 |
56
+ | 嵌套字段 | `tts.sttLocale=en-US` | 设置文本到语音服务的语言区域为 `en-US`。 |
57
+ | 数组 | `plugins=search-engine,lobe-image-designer` | 启用 `search-engine` 和 `lobe-image-designer` 插件。 |
58
+ | 中文逗号 | `plugins=search-engine,lobe-image-designer` | 同上,演示支持中文逗号分隔。 |
59
+ | 多个配置项 | `model=glm-4;provider=zhipu` | 设置模型为 `glm-4` 且模型服务商为 `zhipu`。 |
60
+ | 数字值 | `params.max_tokens=300`, `chatConfig.historyCount=5` | 设置最大令牌数为 `300`,设置历史消息条数为 5。 |
61
+ | 布尔值 | `chatConfig.enableAutoCreateTopic=true`,`chatConfig.enableCompressThreshold=true`, `chatConfig.enableHistoryCount=true` | 启用自动创建主题,历史长度压缩阈值,历史记录条数。 |
62
+ | 特殊字符 | `inputTemplate="Hello; I am a bot;"` | 设置输入模板为 `Hello; I am a bot;`。 |
63
+ | 错误处理 | `model=gpt-4;maxToken` | 忽略无效条目 `maxToken`,仅解析出 `model=gpt-4`。 |
64
+ | 值覆盖 | `model=gpt-4;model=gpt-4-1106-preview` | 如果键重复,使用最后一次出现的值,此处 `model` 的值为 `gpt-4-1106-preview`。 |
65
65
 
66
66
  相关阅读:
67
67
 
68
- - [[RFC] 022 - 环境变量配置默认助手参数](https://github.com/lobehub/lobe-chat/discussions/913)
68
+ - [\[RFC\] 022 - 环境变量配置默认助手参数](https://github.com/lobehub/lobe-chat/discussions/913)
69
69
 
70
70
  ### `FEATURE_FLAGS`
71
71
 
@@ -91,14 +91,14 @@ LobeChat 在部署时提供了一些额外的配置项,你可以使用环境
91
91
  ### `SSRF_ALLOW_PRIVATE_IP_ADDRESS`
92
92
 
93
93
  - 类型:可选
94
- - 描述:是否允许连接私有IP地址。在可信环境中可以设置为true来关闭SSRF防护。
94
+ - 描述:是否允许连接私有 IP 地址。在可信环境中可以设置为 true 来关闭 SSRF 防护。
95
95
  - 默认值:`0`
96
96
  - 示例:`1` or `0`
97
97
 
98
98
  ### `SSRF_ALLOW_IP_ADDRESS_LIST`
99
99
 
100
100
  - 类型:可选
101
- - 描述:允许连接的私有IP地址列表,多个IP地址时使用逗号分隔。当 `SSRF_ALLOW_PRIVATE_IP_ADDRESS` 为 `0` 时才会生效。
101
+ - 描述:允许连接的私有 IP 地址列表,多个 IP 地址时使用逗号分隔。当 `SSRF_ALLOW_PRIVATE_IP_ADDRESS` 为 `0` 时才会生效。
102
102
  - 默认值:-
103
103
  - 示例:`198.18.1.62,224.0.0.3`
104
104
 
@@ -482,7 +482,7 @@ If you need to use Azure OpenAI to provide model services, you can refer to the
482
482
  ### `AI21_API_KEY`
483
483
 
484
484
  - Type: Required
485
- - Description: This is the API key you applied from AI21_API_KEY service
485
+ - Description: This is the API key you applied from `AI21_API_KEY` service
486
486
  - Default: -
487
487
  - Example: `xxxxxx...xxxxxx`
488
488
 
@@ -430,7 +430,7 @@ LobeChat 在部署时提供了丰富的模型服务商相关的环境变量,
430
430
  ### `AI360_API_KEY`
431
431
 
432
432
  - 类型:必选
433
- - 描述:这是你在 360智脑 服务平台申请的 API 密钥
433
+ - 描述:这是你在 360 智脑 服务平台申请的 API 密钥
434
434
  - 默认值:-
435
435
  - 示例:`xxxxxx...xxxxxx`
436
436
 
@@ -75,11 +75,10 @@ LobeChat supports multimodal AI sessions, including the ability to upload unstru
75
75
  <Callout type={'info'}>
76
76
  `path-style` and `virtual-host` are different methods of accessing buckets and objects in S3, with differences in URL structure and domain name resolution.
77
77
 
78
- Assuming the S3 service provider's domain is s3.example.net, the bucket is mybucket, and the object is config.env, the specific differences are:
79
-
80
- - path-style: `s3.example.net/mybucket/config.env`
81
- - virtual-host: `mybucket.s3.example.net/config.env`
78
+ Assuming the S3 service provider's domain is s3.example.net, the bucket is mybucket, and the object is config.env, the specific differences are:
82
79
 
80
+ - path-style: `s3.example.net/mybucket/config.env`
81
+ - virtual-host: `mybucket.s3.example.net/config.env`
83
82
  </Callout>
84
83
 
85
84
  ### `LLM_VISION_IMAGE_USE_BASE64`
@@ -10,7 +10,7 @@ tags:
10
10
 
11
11
  # 配置 S3 存储服务
12
12
 
13
- LobeChat 支持多模态的 AI 会话,包括将图片、文件等非结构化数据上传给大模型的功能。为了优化存储和性能,我们使用 S3 兼容的文件存储服务来存储图片文件和支持文件上传/知识库功能。
13
+ LobeChat 支持多模态的 AI 会话,包括将图片、文件等非结构化数据上传给大模型的功能。为了优化存储和性能,我们使用 S3 兼容的文件存储服务来存储图片文件和支持文件上传 / 知识库功能。
14
14
 
15
15
  ## 核心环境变量
16
16
 
@@ -71,14 +71,12 @@ LobeChat 支持多模态的 AI 会话,包括将图片、文件等非结构化
71
71
  - 示例:`1`
72
72
 
73
73
  <Callout type={'info'}>
74
+ `path-style` 和 `virtual-host` 在 S3 中是访问 bucket 和 object 的不同方式,URL 的结构和域名解析不太一样
74
75
 
75
- `path-style` `virtual-host` S3 中是访问 bucket object 的不同方式,URL 的结构和域名解析不太一样
76
-
77
- 假设 S3 服务商的域名是 s3.example.net ,bucket为mybucket,object为config.env,具体区别如下:
78
-
79
- - path-style : `s3.example.net/mybucket/config.env`
80
- - virtual-host : `mybucket.s3.example.net/config.env`
76
+ 假设 S3 服务商的域名是 s3.example.net bucket mybucket,object config.env,具体区别如下:
81
77
 
78
+ - path-style : `s3.example.net/mybucket/config.env`
79
+ - virtual-host : `mybucket.s3.example.net/config.env`
82
80
  </Callout>
83
81
 
84
82
  ### `LLM_VISION_IMAGE_USE_BASE64`
@@ -16,15 +16,19 @@ LobeChat provides some additional configuration options when deployed, which can
16
16
 
17
17
  <Cards>
18
18
  <Card href={'environment-variables/basic'} title={'Basic Environment Variables'} />
19
+
19
20
  <Card href={'environment-variables/model-provider'} title={'Model Service Providers'} />
21
+
20
22
  <Cards href={'environment-variables/auth'} title={'Authentication'} />
23
+
21
24
  <Cards href={'environment-variables/s3'} title={'S3 Storage Service'} />
25
+
22
26
  <Cards href={'environment-variables/analytics'} title={'Data Analytics'} />
23
27
  </Cards>
24
28
 
25
- ## Building a Custom Image with Overridden NEXT_PUBLIC Variables
29
+ ## Building a Custom Image with Overridden `NEXT_PUBLIC` Variables
26
30
 
27
- If you need to override NEXT_PUBLIC environment variables, you can build a custom Docker image using GitHub Actions without forking the entire LobeChat repository. Here's a guide on how to do this:
31
+ If you need to override `NEXT_PUBLIC` environment variables, you can build a custom Docker image using GitHub Actions without forking the entire LobeChat repository. Here's a guide on how to do this:
28
32
 
29
33
  1. Create a new GitHub repository for your custom build.
30
34
 
@@ -82,10 +86,10 @@ jobs:
82
86
  NEXT_PUBLIC_SERVICE_MODE=${{ secrets.NEXT_PUBLIC_SERVICE_MODE }}
83
87
  ```
84
88
 
85
- 4. In your GitHub Repository settings > Secrets and variables > Actions > Repository secrets, add any NEXT_PUBLIC variables you want to override
89
+ 4. In your GitHub Repository settings > Secrets and variables > Actions > Repository secrets, add any `NEXT_PUBLIC` variables you want to override
86
90
 
87
91
  5. Set "Read and write" permissions for workflows in Repository settings > Actions > General > Workflow permissions.
88
92
 
89
93
  6. To build your custom image, go to the "Actions" tab in your GitHub repository and manually trigger the "Build Custom LobeChat Image" workflow.
90
94
 
91
- This approach allows you to create a custom build with your desired NEXT_PUBLIC variables without maintaining a full fork of the LobeChat repository. You can trigger a new build whenever you need to update your custom image.
95
+ This approach allows you to create a custom build with your desired `NEXT_PUBLIC` variables without maintaining a full fork of the LobeChat repository. You can trigger a new build whenever you need to update your custom image.
@@ -14,8 +14,12 @@ LobeChat 在部署时提供了一些额外的配置项,你可以使用环境
14
14
 
15
15
  <Cards>
16
16
  <Cards href={'environment-variables/basic'} title={'基础环境变量'} />
17
+
17
18
  <Cards href={'environment-variables/model-provider'} title={'模型服务商'} />
19
+
18
20
  <Cards href={'environment-variables/auth'} title={'身份验证'} />
21
+
19
22
  <Cards href={'environment-variables/s3'} title={'S3 存储服务'} />
23
+
20
24
  <Cards href={'environment-variables/analytics'} title={'数据统计'} />
21
25
  </Cards>
@@ -19,17 +19,14 @@ LobeChat supports using [Azure OpenAI](https://learn.microsoft.com/zh-cn/azure/a
19
19
 
20
20
  Click in the bottom left corner "Actions" - "Settings", then switch to the "Language Model" tab and enable the "Azure OpenAI" switch to start using Azure OpenAI.
21
21
 
22
- <Image
23
- alt="Configuring in the Interface"
24
- src="https://github-production-user-asset-6210df.s3.amazonaws.com/28616219/267083420-422a3714-627e-4bef-9fbc-141a2a8ca916.png"
25
- />
22
+ <Image alt="Configuring in the Interface" src="https://github-production-user-asset-6210df.s3.amazonaws.com/28616219/267083420-422a3714-627e-4bef-9fbc-141a2a8ca916.png" />
26
23
 
27
24
  You can fill in the corresponding configuration items as needed:
28
25
 
29
26
  - **API Key**: The API key you applied for on the Azure OpenAI account page, which can be found in the "Keys and Endpoints" section.
30
27
  - **API Address**: Azure API address, which can be found in the "Keys and Endpoints" section when checking resources in the Azure portal.
31
28
  - **Azure API Version**: The API version of Azure, following the format YYYY-MM-DD. Refer to the [latest version](https://learn.microsoft.com/zh-cn/azure/ai-services/openai/reference#chat-completions).
32
- - ** Model List**: set your model list
29
+ - \*\* Model List\*\*: set your model list
33
30
 
34
31
  After completing the configuration of the above fields, click "Check". If it prompts "Check passed", it means the configuration was successful.
35
32
 
@@ -37,10 +34,10 @@ After completing the configuration of the above fields, click "Check". If it pro
37
34
 
38
35
  If you want the deployed version to be pre-configured with Azure OpenAI for end users to use directly, you need to configure the following environment variables during deployment:
39
36
 
40
- | Environment Variable | Type | Description | Default Value | Example |
41
- | --- | --- | --- | --- | --- |
42
- | `AZURE_API_KEY` | Required | This is the API key you obtained from the Azure OpenAI account page | - | `c55168be3874490ef0565d9779ecd5a6` |
43
- | `AZURE_ENDPOINT` | Required | Azure API address, can be found in the "Keys and Endpoints" section when checking resources in the Azure portal | - | `https://docs-test-001.openai.azure.com` |
44
- | `AZURE_API_VERSION` | Required | Azure API version, following the format YYYY-MM-DD | 2023-08-01-preview | `-`, see [latest version](https://learn.microsoft.com/en-us/azure/ai-services/openai/reference#chat-completions) |
45
- | `AZURE_MODEL_LIST` | Required | Used to control the model list, use `+` to add a model, use `-` to hide a model, use `id->deplymentName=displayName` to customize the display name of a model, separated by commas. Definition syntax rules see [Model List](/docs/self-hosting/advanced/model-list) | - | `gpt-35-turbo->my-deploy=GPT 3.5 Turbo` or `gpt-4-turbo->my-gpt4=GPT 4 Turbo<128000:vision:fc>` |
46
- | `ACCESS_CODE` | Optional | Add a password to access LobeChat. You can set a long password to prevent brute force attacks. When this value is separated by commas, it becomes an array of passwords | - | `awCT74` or `e3@09!` or `code1,code2,code3` |
37
+ | Environment Variable | Type | Description | Default Value | Example |
38
+ | -------------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------ | ---------------------------------------------------------------------------------------------------------------- |
39
+ | `AZURE_API_KEY` | Required | This is the API key you obtained from the Azure OpenAI account page | - | `c55168be3874490ef0565d9779ecd5a6` |
40
+ | `AZURE_ENDPOINT` | Required | Azure API address, can be found in the "Keys and Endpoints" section when checking resources in the Azure portal | - | `https://docs-test-001.openai.azure.com` |
41
+ | `AZURE_API_VERSION` | Required | Azure API version, following the format YYYY-MM-DD | 2023-08-01-preview | `-`, see [latest version](https://learn.microsoft.com/en-us/azure/ai-services/openai/reference#chat-completions) |
42
+ | `AZURE_MODEL_LIST` | Required | Used to control the model list, use `+` to add a model, use `-` to hide a model, use `id->deplymentName=displayName` to customize the display name of a model, separated by commas. Definition syntax rules see [Model List](/docs/self-hosting/advanced/model-list) | - | `gpt-35-turbo->my-deploy=GPT 3.5 Turbo` or `gpt-4-turbo->my-gpt4=GPT 4 Turbo<128000:vision:fc>` |
43
+ | `ACCESS_CODE` | Optional | Add a password to access LobeChat. You can set a long password to prevent brute force attacks. When this value is separated by commas, it becomes an array of passwords | - | `awCT74` or `e3@09!` or `code1,code2,code3` |