@lobehub/chat 1.44.3 → 1.45.1

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 (320) 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/next.config.ts +1 -0
  272. package/package.json +48 -41
  273. package/scripts/mdxWorkflow/index.ts +7 -0
  274. package/src/app/(main)/(mobile)/me/(home)/features/Header.tsx +2 -1
  275. package/src/app/(main)/(mobile)/me/data/features/Header.tsx +1 -1
  276. package/src/app/(main)/(mobile)/me/profile/features/Header.tsx +1 -1
  277. package/src/app/(main)/(mobile)/me/settings/features/Header.tsx +1 -1
  278. package/src/app/(main)/@nav/_layout/Mobile.tsx +2 -1
  279. package/src/app/(main)/chat/(workspace)/@topic/features/SystemRole/SystemRoleContent.tsx +2 -1
  280. package/src/app/(main)/chat/(workspace)/@topic/features/TopicListContent/ByTimeMode/GroupItem.tsx +2 -2
  281. package/src/app/(main)/chat/(workspace)/_layout/Desktop/ChatHeader/Main.tsx +2 -1
  282. package/src/app/(main)/chat/(workspace)/_layout/Desktop/ChatHeader/index.tsx +1 -1
  283. package/src/app/(main)/chat/(workspace)/_layout/Mobile/ChatHeader/ChatHeaderTitle.tsx +2 -1
  284. package/src/app/(main)/chat/(workspace)/_layout/Mobile/ChatHeader/index.tsx +1 -1
  285. package/src/app/(main)/chat/@session/_layout/Mobile/SessionHeader.tsx +2 -1
  286. package/src/app/(main)/chat/settings/_layout/Desktop/Header.tsx +1 -1
  287. package/src/app/(main)/chat/settings/_layout/Mobile/Header.tsx +1 -1
  288. package/src/app/(main)/discover/(detail)/provider/[slug]/features/InfoSidebar/SuggestionItem.tsx +8 -6
  289. package/src/app/(main)/discover/(list)/_layout/Desktop/Nav.tsx +1 -1
  290. package/src/app/(main)/discover/(list)/_layout/Mobile/Header.tsx +2 -1
  291. package/src/app/(main)/discover/_layout/Desktop/Header.tsx +1 -1
  292. package/src/app/(main)/discover/components/VirtuosoGridList/index.tsx +9 -5
  293. package/src/app/(main)/discover/search/_layout/Mobile/Header.tsx +1 -1
  294. package/src/app/(main)/files/(content)/@menu/features/KnowledgeBase/EmptyStatus.tsx +21 -13
  295. package/src/app/(main)/repos/[id]/evals/evaluation/EvaluationList/index.tsx +1 -1
  296. package/src/app/(main)/settings/sync/features/DeviceInfo/SystemIcon.tsx +2 -0
  297. package/src/components/Branding/ProductLogo/Custom.tsx +19 -20
  298. package/src/components/BrowserIcon/index.tsx +19 -30
  299. package/src/components/BubblesLoading/index.tsx +31 -23
  300. package/src/components/FunctionModal/createModalHooks.ts +6 -3
  301. package/src/components/StopLoading.tsx +10 -7
  302. package/src/features/ChatInput/Desktop/InputArea/index.tsx +2 -2
  303. package/src/features/InitClientDB/EnableModal.tsx +2 -2
  304. package/src/features/InitClientDB/{PGliteSVG.tsx → PGliteIcon.tsx} +17 -11
  305. package/src/features/ShareModal/ShareImage/index.tsx +32 -22
  306. package/src/features/ShareModal/ShareJSON/Preview.tsx +2 -2
  307. package/src/features/ShareModal/ShareJSON/index.tsx +49 -37
  308. package/src/features/ShareModal/ShareText/Preview.tsx +4 -1
  309. package/src/features/ShareModal/ShareText/index.tsx +49 -38
  310. package/src/features/ShareModal/index.tsx +1 -1
  311. package/src/features/ShareModal/style.ts +30 -0
  312. package/src/utils/colorUtils.ts +1 -1
  313. package/src/components/BrowserIcon/components/Brave.tsx +0 -56
  314. package/src/components/BrowserIcon/components/Chrome.tsx +0 -14
  315. package/src/components/BrowserIcon/components/Chromium.tsx +0 -14
  316. package/src/components/BrowserIcon/components/Edge.tsx +0 -36
  317. package/src/components/BrowserIcon/components/Firefox.tsx +0 -38
  318. package/src/components/BrowserIcon/components/Opera.tsx +0 -19
  319. package/src/components/BrowserIcon/components/Safari.tsx +0 -23
  320. package/src/components/BrowserIcon/components/Samsung.tsx +0 -21
@@ -19,10 +19,7 @@ LobeChat 支持使用 [Azure OpenAI](https://learn.microsoft.com/zh-cn/azure/ai-
19
19
 
20
20
  点击左下角「操作」 -「设置」,切到 「语言模型」 Tab 后通过开启「Azure OpenAI」开关,即可开启使用 Azure OpenAI。
21
21
 
22
- <Image
23
- alt="在界面中配置"
24
- src="https://github-production-user-asset-6210df.s3.amazonaws.com/28616219/267083420-422a3714-627e-4bef-9fbc-141a2a8ca916.png"
25
- />
22
+ <Image alt="在界面中配置" src="https://github-production-user-asset-6210df.s3.amazonaws.com/28616219/267083420-422a3714-627e-4bef-9fbc-141a2a8ca916.png" />
26
23
 
27
24
  你按需填写相应的配置项:
28
25
 
@@ -39,10 +36,10 @@ LobeChat 支持使用 [Azure OpenAI](https://learn.microsoft.com/zh-cn/azure/ai-
39
36
 
40
37
  如果你希望部署的版本直接配置好 Azure OpenAI,让终端用户直接使用,那么你需要在部署时配置以下环境变量:
41
38
 
42
- | 环境变量 | 类型 | 描述 | 默认值 | 示例 |
43
- | --- | --- | --- | --- | --- |
44
- | `AZURE_API_KEY` | 必选 | 这是你在 Azure OpenAI 账户页面申请的 API 密钥 | - | `c55168be3874490ef0565d9779ecd5a6` |
45
- | `AZURE_ENDPOINT` | 必选 | Azure API 地址,从 Azure 门户检查资源时,可在 “密钥和终结点” 部分中找到此值 | - | `https://docs-test-001.openai.azure.com` |
46
- | `AZURE_API_VERSION` | 必选 | Azure 的 API 版本,遵循 YYYY-MM-DD 格式 | 2023-08-01-preview | `-`,查阅[最新版本](https://learn.microsoft.com/zh-cn/azure/ai-services/openai/reference#chat-completions) |
47
- | `AZURE_MODEL_LIST` | 必选 | 用来控制模型列表,使用 `模型名->部署名=展示名` 来自定义模型的展示名,用英文逗号隔开。支持扩展能力,其余语法规则详见 [模型列表](/zh/docs/self-hosting/advanced/model-list) | - | `gpt-35-turbo->my-deploy=GPT 3.5 Turbo` 或 `gpt-4-turbo->my-gpt4=GPT 4 Turbo<128000:vision:fc>` |
48
- | `ACCESS_CODE` | 可选 | 添加访问 LobeChat 的密码,你可以设置一个长密码以防被爆破,该值用逗号分隔时为密码数组 | - | `awCT74` 或 `e3@09!` or `code1,code2,code3` |
39
+ | 环境变量 | 类型 | 描述 | 默认值 | 示例 |
40
+ | ------------------- | -- | --------------------------------------------------------------------------------------------------------------- | ------------------ | --------------------------------------------------------------------------------------------------- |
41
+ | `AZURE_API_KEY` | 必选 | 这是你在 Azure OpenAI 账户页面申请的 API 密钥 | - | `c55168be3874490ef0565d9779ecd5a6` |
42
+ | `AZURE_ENDPOINT` | 必选 | Azure API 地址,从 Azure 门户检查资源时,可在 “密钥和终结点” 部分中找到此值 | - | `https://docs-test-001.openai.azure.com` |
43
+ | `AZURE_API_VERSION` | 必选 | Azure 的 API 版本,遵循 YYYY-MM-DD 格式 | 2023-08-01-preview | `-`,查阅[最新版本](https://learn.microsoft.com/zh-cn/azure/ai-services/openai/reference#chat-completions) |
44
+ | `AZURE_MODEL_LIST` | 必选 | 用来控制模型列表,使用 `模型名->部署名=展示名` 来自定义模型的展示名,用英文逗号隔开。支持扩展能力,其余语法规则详见 [模型列表](/zh/docs/self-hosting/advanced/model-list) | - | `gpt-35-turbo->my-deploy=GPT 3.5 Turbo` 或 `gpt-4-turbo->my-gpt4=GPT 4 Turbo<128000:vision:fc>` |
45
+ | `ACCESS_CODE` | 可选 | 添加访问 LobeChat 的密码,你可以设置一个长密码以防被爆破,该值用逗号分隔时为密码数组 | - | `awCT74` 或 `e3@09!` or `code1,code2,code3` |
@@ -40,13 +40,13 @@ When you first initiate Ollama, it is configured to allow access only from the l
40
40
 
41
41
  ### Ollama Environment Variables
42
42
 
43
- | Environment Variable | Description | Default Value | Additional Information |
44
- | --- | --- | --- | --- |
45
- | `OLLAMA_HOST` | Specifies the host and port for binding | "127.0.0.1:11434" | Use "0.0.0.0:port" to make the service accessible from any machine |
46
- | `OLLAMA_ORIGINS` | Comma-separated list of permitted cross-origin sources | Restricted to local access | Set to "\*" to avoid CORS, please set on demand |
47
- | `OLLAMA_MODELS` | Path to the directory where models are located | "~/.ollama/models" or "/usr/share/ollama/.ollama/models" | Can be customized based on requirements |
48
- | `OLLAMA_KEEP_ALIVE` | Duration that the model stays loaded in GPU memory | "5m" | Dynamically loading and unloading models can reduce GPU load but may increase disk I/O |
49
- | `OLLAMA_DEBUG` | Enable additional debugging logs by setting to 1 | Typically disabled | |
43
+ | Environment Variable | Description | Default Value | Additional Information |
44
+ | -------------------- | ------------------------------------------------------ | --------------------------------------------------------- | -------------------------------------------------------------------------------------- |
45
+ | `OLLAMA_HOST` | Specifies the host and port for binding | "127.0.0.1:11434" | Use "0.0.0.0:port" to make the service accessible from any machine |
46
+ | `OLLAMA_ORIGINS` | Comma-separated list of permitted cross-origin sources | Restricted to local access | Set to "\*" to avoid CORS, please set on demand |
47
+ | `OLLAMA_MODELS` | Path to the directory where models are located | "\~/.ollama/models" or "/usr/share/ollama/.ollama/models" | Can be customized based on requirements |
48
+ | `OLLAMA_KEEP_ALIVE` | Duration that the model stays loaded in GPU memory | "5m" | Dynamically loading and unloading models can reduce GPU load but may increase disk I/O |
49
+ | `OLLAMA_DEBUG` | Enable additional debugging logs by setting to 1 | Typically disabled | |
50
50
 
51
51
  ### Setting environment variables on Windows
52
52
 
@@ -90,6 +90,7 @@ If Ollama is run as a systemd service, environment variables should be set using
90
90
  ```
91
91
 
92
92
  3. Save and exit.
93
+
93
94
  4. Reload `systemd` and restart Ollama:
94
95
 
95
96
  ```bash
@@ -38,13 +38,13 @@ docker run -d -p 3210:3210 -e OLLAMA_PROXY_URL=http://host.docker.internal:11434
38
38
 
39
39
  ### Ollama 环境变量
40
40
 
41
- | 环境变量 | 描述 | 默认值 | 附加说明 |
42
- | --- | --- | --- | --- |
43
- | `OLLAMA_HOST` | 绑定的主机和端口 | "127.0.0.1:11434" | 设置 0.0.0.0:端口号 可以指定所有人访问特定端口 |
44
- | `OLLAMA_ORIGINS` | 允许的跨域源列表,逗号分隔 | 仅本地访问 | 设置 "\*" 可以避免 CORS 跨域错误,按需设置 |
45
- | `OLLAMA_MODELS` | 模型存放的路径 | "~/.ollama/models" 或 "/usr/share/ollama/.ollama/models" | 按需指定 |
46
- | `OLLAMA_KEEP_ALIVE` | 模型在显存中保持加载的持续时间 | "5m" | 按需加载和释放显存可以有效降低显卡压力,但会增加硬盘读写 |
47
- | `OLLAMA_DEBUG` | 设置为 1 以启用额外的调试日志 | 默认关闭 | |
41
+ | 环境变量 | 描述 | 默认值 | 附加说明 |
42
+ | ------------------- | ---------------- | -------------------------------------------------------- | ----------------------------- |
43
+ | `OLLAMA_HOST` | 绑定的主机和端口 | "127.0.0.1:11434" | 设置 0.0.0.0: 端口号 可以指定所有人访问特定端口 |
44
+ | `OLLAMA_ORIGINS` | 允许的跨域源列表,逗号分隔 | 仅本地访问 | 设置 "\*" 可以避免 CORS 跨域错误,按需设置 |
45
+ | `OLLAMA_MODELS` | 模型存放的路径 | "\~/.ollama/models" 或 "/usr/share/ollama/.ollama/models" | 按需指定 |
46
+ | `OLLAMA_KEEP_ALIVE` | 模型在显存中保持加载的持续时间 | "5m" | 按需加载和释放显存可以有效降低显卡压力,但会增加硬盘读写 |
47
+ | `OLLAMA_DEBUG` | 设置为 1 以启用额外的调试日志 | 默认关闭 | |
48
48
 
49
49
  ### 在 Windows 上设置环境变量
50
50
 
@@ -88,6 +88,7 @@ docker run -d -p 3210:3210 -e OLLAMA_PROXY_URL=http://host.docker.internal:11434
88
88
  ```
89
89
 
90
90
  3. 保存并退出。
91
+
91
92
  4. 重载`systemd`并重启 Ollama:
92
93
 
93
94
  ```bash
@@ -18,17 +18,15 @@ If you want to deploy LobeChat on Alibaba Cloud, you can follow the steps below:
18
18
  ## Alibaba Cloud Deployment Process
19
19
 
20
20
  <Steps>
21
+ ### Prepare your API Key
21
22
 
22
- ### Prepare your API Key
23
+ Go to [OpenAI API Key](https://platform.openai.com/account/api-keys) to get your OpenAI API Key. Or go to [Tongyi Qianwen API Key](https://bailian.console.aliyun.com/?apiKey=1#/api-key) to get your API Key.
23
24
 
24
- Go to [OpenAI API Key](https://platform.openai.com/account/api-keys) to get your OpenAI API Key. Or go to [Tongyi Qianwen API Key](https://bailian.console.aliyun.com/?apiKey=1#/api-key) to get your API Key.
25
+ ### One-click to deploy
25
26
 
26
- ### One-click to deploy
27
-
28
- [![][deploy-button-image]][deploy-link]
29
-
30
- ### Once deployed, you can start using it
27
+ [![][deploy-button-image]][deploy-link]
31
28
 
29
+ ### Once deployed, you can start using it
32
30
  </Steps>
33
31
 
34
32
  [deploy-button-image]: https://service-info-public.oss-cn-hangzhou.aliyuncs.com/computenest-en.svg
@@ -15,17 +15,15 @@ tags:
15
15
  ## 阿里云 部署流程
16
16
 
17
17
  <Steps>
18
+ ### 准备好你的 API Key
18
19
 
19
- ### 准备好你的 API Key
20
+ 前往 [OpenAI API Key](https://platform.openai.com/account/api-keys) 获取你的 OpenAI API Key 或 前往 [通义千问 API Key](https://bailian.console.aliyun.com/?apiKey=1#/api-key) 获取你的通义千问 API Key
20
21
 
21
- 前往 [OpenAI API Key](https://platform.openai.com/account/api-keys) 获取你的 OpenAI API Key 或 前往 [通义千问 API Key](https://bailian.console.aliyun.com/?apiKey=1#/api-key) 获取你的通义千问 API Key
22
+ ### 点击下方按钮进行部署
22
23
 
23
- ### 点击下方按钮进行部署
24
-
25
- [![][deploy-button-image]][deploy-link]
26
-
27
- ### 部署完毕后,即可开始使用
24
+ [![][deploy-button-image]][deploy-link]
28
25
 
26
+ ### 部署完毕后,即可开始使用
29
27
  </Steps>
30
28
 
31
29
  [deploy-button-image]: https://service-info-public.oss-cn-hangzhou.aliyuncs.com/computenest-en.svg
@@ -21,10 +21,11 @@ To install aaPanel, go to the [aaPanel](https://www.aapanel.com/new/download.htm
21
21
 
22
22
  2. The first time you will be prompted to install the `Docker` and `Docker Compose` services, click Install Now. If it is already installed, please ignore it. ![install2](https://github.com/user-attachments/assets/e269bd27-d323-43ba-811b-c0f5e4137903)
23
23
 
24
- 3. After the installation is complete, find `LobeChat` in `One-Click Install` and click `install`
24
+ 3. After the installation is complete, find `LobeChat` in `One-Click Install` and click `install`\
25
25
  ![install-LobeChat](https://github.com/user-attachments/assets/9f989104-bb8e-4acd-9721-6b1db1017d2b)
26
26
 
27
- 4. configure basic information such as the domain name, OpenAI API key, and port to complete the installation Note: The domain name is optional, if the domain name is filled, it can be managed through [Website]--> [Proxy Project], and you do not need to check [Allow external access] after filling in the domain name, otherwise you need to check it before you can access it through the port ![addLobeChat](https://github.com/user-attachments/assets/f0b2e72d-9eee-46a8-b094-4834b78764df)
27
+ 4. configure basic information such as the domain name, OpenAI API key, and port to complete the installation Note: The domain name is optional, if the domain name is filled, it can be managed through \[Website]--> \[Proxy Project], and you do not need to check \[Allow external access] after filling in the domain name, otherwise you need to check it before you can access it through the port ![addLobeChat](https://github.com/user-attachments/assets/f0b2e72d-9eee-46a8-b094-4834b78764df)
28
+
28
29
  5. After installation, enter the domain name or IP+ port set in the previous step in the browser to access.
29
30
 
30
31
  - Name: application name, default `LobeChat-random characters`
@@ -13,7 +13,7 @@ tags:
13
13
 
14
14
  ## 前提
15
15
 
16
- - 仅适用于宝塔面板9.2.0及以上版本
16
+ - 仅适用于宝塔面板 9.2.0 及以上版本
17
17
  - 安装宝塔面板,前往[宝塔面板](https://www.bt.cn/new/download.html)官网,选择正式版的脚本下载安装
18
18
 
19
19
  ## 部署
@@ -35,8 +35,8 @@ tags:
35
35
  - OpenAI API 密钥:请输入您的 Open API 密钥
36
36
  - OpenAI 代理 URL:默认为官方地址
37
37
  - OpenAI 模型列表:输入使用的模型
38
- - CPU 核心数限制:0为不限制,根据实际需要设置
39
- - 内存限制:0为不限制,根据实际需要设置
38
+ - CPU 核心数限制:0 为不限制,根据实际需要设置
39
+ - 内存限制:0 为不限制,根据实际需要设置
40
40
 
41
41
  5. 提交后面板会自动进行应用初始化,大概需要`1-3`分钟,初始化完成后即可访问。
42
42
 
@@ -15,124 +15,114 @@ 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
 
19
- [![][docker-release-shield]][docker-release-link]
20
-
21
- [![][docker-size-shield]][docker-size-link]
22
-
23
- [![][docker-pulls-shield]][docker-pulls-link]
20
+ [![][docker-size-shield]][docker-size-link]
24
21
 
22
+ [![][docker-pulls-shield]][docker-pulls-link]
25
23
  </div>
26
24
 
27
25
  We provide a [Docker image][docker-release-link] for deploying the LobeChat service on your private device.
28
26
 
29
27
  <Steps>
28
+ ### Install Docker Container Environment
30
29
 
31
- ### Install Docker Container Environment
32
-
33
- (Skip this step if already installed)
34
-
35
- <Tabs items={['Ubuntu', 'CentOS']}>
36
-
37
- <Tab>
38
-
39
- ```fish
40
- $ apt install docker.io
41
- ```
42
-
43
- </Tab>
44
-
45
- <Tab>
46
-
47
- ```fish
48
- $ yum install docker
49
- ```
50
-
51
- </Tab>
30
+ (Skip this step if already installed)
52
31
 
53
- </Tabs>
32
+ <Tabs items={['Ubuntu', 'CentOS']}>
33
+ <Tab>
34
+ ```fish
35
+ $ apt install docker.io
36
+ ```
37
+ </Tab>
54
38
 
55
- ### Run Docker Compose Deployment Command
39
+ <Tab>
40
+ ```fish
41
+ $ yum install docker
42
+ ```
43
+ </Tab>
44
+ </Tabs>
56
45
 
57
- When using `docker-compose`, the configuration file is as follows:
46
+ ### Run Docker Compose Deployment Command
58
47
 
59
- ```yml
60
- version: '3.8'
48
+ When using `docker-compose`, the configuration file is as follows:
61
49
 
62
- services:
63
- lobe-chat:
64
- image: lobehub/lobe-chat
65
- container_name: lobe-chat
66
- restart: always
67
- ports:
68
- - '3210:3210'
69
- environment:
70
- OPENAI_API_KEY: sk-xxxx
71
- OPENAI_PROXY_URL: https://api-proxy.com/v1
72
- ACCESS_CODE: lobe66
73
- ```
50
+ ```yml
51
+ version: '3.8'
74
52
 
75
- Run the following command to start the Lobe Chat service:
53
+ services:
54
+ lobe-chat:
55
+ image: lobehub/lobe-chat
56
+ container_name: lobe-chat
57
+ restart: always
58
+ ports:
59
+ - '3210:3210'
60
+ environment:
61
+ OPENAI_API_KEY: sk-xxxx
62
+ OPENAI_PROXY_URL: https://api-proxy.com/v1
63
+ ACCESS_CODE: lobe66
64
+ ```
76
65
 
77
- ```bash
78
- $ docker-compose up -d
79
- ```
66
+ Run the following command to start the Lobe Chat service:
80
67
 
81
- ### Crontab Automatic Update Script (Optional)
68
+ ```bash
69
+ $ docker-compose up -d
70
+ ```
82
71
 
83
- Similarly, you can use the following script to automatically update Lobe Chat. When using `Docker Compose`, no additional configuration of environment variables is required.
72
+ ### Crontab Automatic Update Script (Optional)
84
73
 
85
- ```bash
86
- #!/bin/bash
87
- # auto-update-lobe-chat.sh
74
+ Similarly, you can use the following script to automatically update Lobe Chat. When using `Docker Compose`, no additional configuration of environment variables is required.
88
75
 
89
- # Set proxy (optional)
90
- 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
76
+ ```bash
77
+ #!/bin/bash
78
+ # auto-update-lobe-chat.sh
91
79
 
92
- # Pull the latest image and store the output in a variable
93
- output=$(docker pull lobehub/lobe-chat:latest 2>&1)
80
+ # Set proxy (optional)
81
+ 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
94
82
 
95
- # Check if the pull command was executed successfully
96
- if [ $? -ne 0 ]; then
97
- exit 1
98
- fi
83
+ # Pull the latest image and store the output in a variable
84
+ output=$(docker pull lobehub/lobe-chat:latest 2>&1)
99
85
 
100
- # Check if the output contains a specific string
101
- echo "$output" | grep -q "Image is up to date for lobehub/lobe-chat:latest"
86
+ # Check if the pull command was executed successfully
87
+ if [ $? -ne 0 ]; then
88
+ exit 1
89
+ fi
102
90
 
103
- # If the image is already up to date, do nothing
104
- if [ $? -eq 0 ]; then
105
- exit 0
106
- fi
91
+ # Check if the output contains a specific string
92
+ echo "$output" | grep -q "Image is up to date for lobehub/lobe-chat:latest"
107
93
 
108
- echo "Detected Lobe-Chat update"
94
+ # If the image is already up to date, do nothing
95
+ if [ $? -eq 0 ]; then
96
+ exit 0
97
+ fi
109
98
 
110
- # Remove the old container
111
- echo "Removed: $(docker rm -f Lobe-Chat)"
99
+ echo "Detected Lobe-Chat update"
112
100
 
113
- # You may need to navigate to the directory where `docker-compose.yml` is located first
114
- # cd /path/to/docker-compose-folder
101
+ # Remove the old container
102
+ echo "Removed: $(docker rm -f Lobe-Chat)"
115
103
 
116
- # Run the new container
117
- echo "Started: $(docker-compose up)"
104
+ # You may need to navigate to the directory where `docker-compose.yml` is located first
105
+ # cd /path/to/docker-compose-folder
118
106
 
119
- # Print the update time and version
120
- echo "Update time: $(date)"
121
- echo "Version: $(docker inspect lobehub/lobe-chat:latest | grep 'org.opencontainers.image.version' | awk -F'"' '{print $4}')"
107
+ # Run the new container
108
+ echo "Started: $(docker-compose up)"
122
109
 
123
- # Clean up unused images
124
- 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
125
- echo "Removed old images."
126
- ```
110
+ # Print the update time and version
111
+ echo "Update time: $(date)"
112
+ echo "Version: $(docker inspect lobehub/lobe-chat:latest | grep 'org.opencontainers.image.version' | awk -F'"' '{print $4}')"
127
113
 
128
- 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.
114
+ # Clean up unused images
115
+ 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
116
+ echo "Removed old images."
117
+ ```
129
118
 
130
- Configure Crontab to execute the script every 5 minutes:
119
+ 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.
131
120
 
132
- ```bash
133
- */5 * * * * /path/to/auto-update-lobe-chat.sh >> /path/to/auto-update-lobe-chat.log 2>&1
134
- ```
121
+ Configure Crontab to execute the script every 5 minutes:
135
122
 
123
+ ```bash
124
+ */5 * * * * /path/to/auto-update-lobe-chat.sh >> /path/to/auto-update-lobe-chat.log 2>&1
125
+ ```
136
126
  </Steps>
137
127
 
138
128
  [docker-pulls-link]: https://hub.docker.com/r/lobehub/lobe-chat
@@ -12,122 +12,112 @@ tags:
12
12
  # Docker Compose 部署指引
13
13
 
14
14
  <div style={{display:"flex", gap: 4}}>
15
+ [![](https://img.shields.io/docker/v/lobehub/lobe-chat?color=369eff\&label=docker\&labelColor=black\&logo=docker\&logoColor=white\&style=flat-square)](https://hub.docker.com/r/lobehub/lobe-chat)
15
16
 
16
- [![](https://img.shields.io/docker/v/lobehub/lobe-chat?color=369eff&label=docker&labelColor=black&logo=docker&logoColor=white&style=flat-square)](https://hub.docker.com/r/lobehub/lobe-chat)
17
-
18
- [![](https://img.shields.io/docker/image-size/lobehub/lobe-chat?color=369eff&labelColor=black&style=flat-square)](https://img.shields.io/docker/image-size/lobehub/lobe-chat?color=369eff&labelColor=black&style=flat-square)
19
-
20
- [![](https://img.shields.io/docker/pulls/lobehub/lobe-chat?color=45cc11&labelColor=black&style=flat-square)](https://img.shields.io/docker/pulls/lobehub/lobe-chat?color=45cc11&labelColor=black&style=flat-square)
17
+ [![](https://img.shields.io/docker/image-size/lobehub/lobe-chat?color=369eff\&labelColor=black\&style=flat-square)](https://img.shields.io/docker/image-size/lobehub/lobe-chat?color=369eff\&labelColor=black\&style=flat-square)
21
18
 
19
+ [![](https://img.shields.io/docker/pulls/lobehub/lobe-chat?color=45cc11\&labelColor=black\&style=flat-square)](https://img.shields.io/docker/pulls/lobehub/lobe-chat?color=45cc11\&labelColor=black\&style=flat-square)
22
20
  </div>
23
21
 
24
22
  我们提供了 [Docker 镜像](https://hub.docker.com/r/lobehub/lobe-chat) ,供你在自己的私有设备上部署 LobeChat 服务。
25
23
 
26
24
  <Steps>
25
+ ### 安装 Docker 容器环境
27
26
 
28
- ### 安装 Docker 容器环境
29
-
30
- (如果已安装,请跳过此步)
31
-
32
- <Tabs items={['Ubuntu', 'CentOS']}>
33
-
34
- <Tab>
35
-
36
- ```fish
37
- $ apt install docker.io
38
- ```
39
-
40
- </Tab>
41
-
42
- <Tab>
43
-
44
- ```fish
45
- $ yum install docker
46
- ```
47
-
48
- </Tab>
27
+ (如果已安装,请跳过此步)
49
28
 
50
- </Tabs>
29
+ <Tabs items={['Ubuntu', 'CentOS']}>
30
+ <Tab>
31
+ ```fish
32
+ $ apt install docker.io
33
+ ```
34
+ </Tab>
51
35
 
52
- ### 运行 Docker Compose 部署指令
36
+ <Tab>
37
+ ```fish
38
+ $ yum install docker
39
+ ```
40
+ </Tab>
41
+ </Tabs>
53
42
 
54
- 使用 `docker-compose` 时配置文件如下:
43
+ ### 运行 Docker Compose 部署指令
55
44
 
56
- ```yml
57
- version: '3.8'
45
+ 使用 `docker-compose` 时配置文件如下:
58
46
 
59
- services:
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
70
- ```
47
+ ```yml
48
+ version: '3.8'
71
49
 
72
- 运行以下命令启动 Lobe Chat 服务:
50
+ services:
51
+ lobe-chat:
52
+ image: lobehub/lobe-chat
53
+ container_name: lobe-chat
54
+ restart: always
55
+ ports:
56
+ - '3210:3210'
57
+ environment:
58
+ OPENAI_API_KEY: sk-xxxx
59
+ OPENAI_PROXY_URL: https://api-proxy.com/v1
60
+ ACCESS_CODE: lobe66
61
+ ```
73
62
 
74
- ```bash
75
- $ docker-compose up -d
76
- ```
63
+ 运行以下命令启动 Lobe Chat 服务:
77
64
 
78
- ### Crontab 自动更新脚本(可选)
65
+ ```bash
66
+ $ docker-compose up -d
67
+ ```
79
68
 
80
- 类似地,你可以使用以下脚本来自动更新 Lobe Chat,使用 `Docker Compose` 时,环境变量无需额外配置。
69
+ ### Crontab 自动更新脚本(可选)
81
70
 
82
- ```bash
83
- #!/bin/bash
84
- # auto-update-lobe-chat.sh
71
+ 类似地,你可以使用以下脚本来自动更新 Lobe Chat,使用 `Docker Compose` 时,环境变量无需额外配置。
85
72
 
86
- # Set proxy (optional)
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
73
+ ```bash
74
+ #!/bin/bash
75
+ # auto-update-lobe-chat.sh
88
76
 
89
- # Pull the latest image and store the output in a variable
90
- output=$(docker pull lobehub/lobe-chat:latest 2>&1)
77
+ # Set proxy (optional)
78
+ 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
91
79
 
92
- # Check if the pull command was executed successfully
93
- if [ $? -ne 0 ]; then
94
- exit 1
95
- fi
80
+ # Pull the latest image and store the output in a variable
81
+ output=$(docker pull lobehub/lobe-chat:latest 2>&1)
96
82
 
97
- # Check if the output contains a specific string
98
- echo "$output" | grep -q "Image is up to date for lobehub/lobe-chat:latest"
83
+ # Check if the pull command was executed successfully
84
+ if [ $? -ne 0 ]; then
85
+ exit 1
86
+ fi
99
87
 
100
- # If the image is already up to date, do nothing
101
- if [ $? -eq 0 ]; then
102
- exit 0
103
- fi
88
+ # Check if the output contains a specific string
89
+ echo "$output" | grep -q "Image is up to date for lobehub/lobe-chat:latest"
104
90
 
105
- echo "Detected Lobe-Chat update"
91
+ # If the image is already up to date, do nothing
92
+ if [ $? -eq 0 ]; then
93
+ exit 0
94
+ fi
106
95
 
107
- # Remove the old container
108
- echo "Removed: $(docker rm -f Lobe-Chat)"
96
+ echo "Detected Lobe-Chat update"
109
97
 
110
- # You may need to navigate to the directory where `docker-compose.yml` is located first
111
- # cd /path/to/docker-compose-folder
98
+ # Remove the old container
99
+ echo "Removed: $(docker rm -f Lobe-Chat)"
112
100
 
113
- # Run the new container
114
- echo "Started: $(docker-compose up)"
101
+ # You may need to navigate to the directory where `docker-compose.yml` is located first
102
+ # cd /path/to/docker-compose-folder
115
103
 
116
- # Print the update time and version
117
- echo "Update time: $(date)"
118
- echo "Version: $(docker inspect lobehub/lobe-chat:latest | grep 'org.opencontainers.image.version' | awk -F'"' '{print $4}')"
104
+ # Run the new container
105
+ echo "Started: $(docker-compose up)"
119
106
 
120
- # Clean up unused images
121
- 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
122
- echo "Removed old images."
123
- ```
107
+ # Print the update time and version
108
+ echo "Update time: $(date)"
109
+ echo "Version: $(docker inspect lobehub/lobe-chat:latest | grep 'org.opencontainers.image.version' | awk -F'"' '{print $4}')"
124
110
 
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.
111
+ # Clean up unused images
112
+ 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
113
+ echo "Removed old images."
114
+ ```
126
115
 
127
- Configure Crontab to execute the script every 5 minutes:
116
+ 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.
128
117
 
129
- ```bash
130
- */5 * * * * /path/to/auto-update-lobe-chat.sh >> /path/to/auto-update-lobe-chat.log 2>&1
131
- ```
118
+ Configure Crontab to execute the script every 5 minutes:
132
119
 
120
+ ```bash
121
+ */5 * * * * /path/to/auto-update-lobe-chat.sh >> /path/to/auto-update-lobe-chat.log 2>&1
122
+ ```
133
123
  </Steps>