@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.
- package/.remarkrc.mdx.js +6 -0
- package/CHANGELOG.md +50 -0
- package/changelog/v1.json +18 -0
- package/docs/changelog/2023-09-09-plugin-system.mdx +5 -0
- package/docs/changelog/2023-09-09-plugin-system.zh-CN.mdx +5 -0
- package/docs/changelog/2023-11-14-gpt4-vision.mdx +6 -0
- package/docs/changelog/2023-11-14-gpt4-vision.zh-CN.mdx +6 -0
- package/docs/changelog/2023-11-19-tts-stt.mdx +6 -0
- package/docs/changelog/2023-11-19-tts-stt.zh-CN.mdx +7 -0
- package/docs/changelog/2023-12-22-dalle-3.mdx +6 -0
- package/docs/changelog/2023-12-22-dalle-3.zh-CN.mdx +4 -0
- package/docs/changelog/2024-02-08-sso-oauth.mdx +6 -0
- package/docs/changelog/2024-02-08-sso-oauth.zh-CN.mdx +6 -0
- package/docs/changelog/2024-02-14-ollama.mdx +6 -0
- package/docs/changelog/2024-02-14-ollama.zh-CN.mdx +5 -0
- package/docs/changelog/2024-06-19-lobe-chat-v1.mdx +6 -0
- package/docs/changelog/2024-06-19-lobe-chat-v1.zh-CN.mdx +5 -0
- package/docs/changelog/2024-07-19-gpt-4o-mini.mdx +5 -0
- package/docs/changelog/2024-07-19-gpt-4o-mini.zh-CN.mdx +4 -0
- package/docs/changelog/2024-08-02-lobe-chat-database-docker.mdx +6 -0
- package/docs/changelog/2024-08-02-lobe-chat-database-docker.zh-CN.mdx +5 -0
- package/docs/changelog/2024-08-21-file-upload-and-knowledge-base.mdx +6 -0
- package/docs/changelog/2024-08-21-file-upload-and-knowledge-base.zh-CN.mdx +5 -0
- package/docs/changelog/2024-09-13-openai-o1-models.mdx +6 -0
- package/docs/changelog/2024-09-13-openai-o1-models.zh-CN.mdx +6 -0
- package/docs/changelog/2024-09-20-artifacts.mdx +6 -0
- package/docs/changelog/2024-09-20-artifacts.zh-CN.mdx +6 -0
- package/docs/changelog/2024-10-27-pin-assistant.mdx +5 -0
- package/docs/changelog/2024-10-27-pin-assistant.zh-CN.mdx +4 -0
- package/docs/changelog/2024-11-06-share-text-json.mdx +4 -0
- package/docs/changelog/2024-11-06-share-text-json.zh-CN.mdx +4 -0
- package/docs/changelog/2024-11-25-november-providers.mdx +7 -0
- package/docs/changelog/2024-11-25-november-providers.zh-CN.mdx +7 -0
- package/docs/changelog/2024-11-27-forkable-chat.mdx +4 -0
- package/docs/changelog/2024-11-27-forkable-chat.zh-CN.mdx +5 -0
- package/docs/changelog/2025-01-03-user-profile.mdx +5 -0
- package/docs/changelog/2025-01-03-user-profile.zh-CN.mdx +4 -1
- package/docs/self-hosting/advanced/auth/clerk.mdx +25 -41
- package/docs/self-hosting/advanced/auth/clerk.zh-CN.mdx +23 -37
- package/docs/self-hosting/advanced/auth/next-auth/auth0.mdx +31 -58
- package/docs/self-hosting/advanced/auth/next-auth/auth0.zh-CN.mdx +30 -57
- package/docs/self-hosting/advanced/auth/next-auth/authelia.mdx +38 -38
- package/docs/self-hosting/advanced/auth/next-auth/authelia.zh-CN.mdx +37 -38
- package/docs/self-hosting/advanced/auth/next-auth/authentik.mdx +26 -31
- package/docs/self-hosting/advanced/auth/next-auth/authentik.zh-CN.mdx +25 -30
- package/docs/self-hosting/advanced/auth/next-auth/casdoor.mdx +74 -75
- package/docs/self-hosting/advanced/auth/next-auth/casdoor.zh-CN.mdx +72 -73
- package/docs/self-hosting/advanced/auth/next-auth/cloudflare-zero-trust.mdx +24 -25
- package/docs/self-hosting/advanced/auth/next-auth/cloudflare-zero-trust.zh-CN.mdx +23 -24
- package/docs/self-hosting/advanced/auth/next-auth/github.mdx +46 -73
- package/docs/self-hosting/advanced/auth/next-auth/github.zh-CN.mdx +43 -70
- package/docs/self-hosting/advanced/auth/next-auth/logto.mdx +28 -37
- package/docs/self-hosting/advanced/auth/next-auth/logto.zh-CN.mdx +28 -37
- package/docs/self-hosting/advanced/auth/next-auth/microsoft-entra-id.mdx +36 -49
- package/docs/self-hosting/advanced/auth/next-auth/microsoft-entra-id.zh-CN.mdx +30 -43
- package/docs/self-hosting/advanced/auth/next-auth/wechat.mdx +13 -14
- package/docs/self-hosting/advanced/auth/next-auth/wechat.zh-CN.mdx +14 -15
- package/docs/self-hosting/advanced/auth/next-auth/zitadel.mdx +35 -69
- package/docs/self-hosting/advanced/auth/next-auth/zitadel.zh-CN.mdx +34 -68
- package/docs/self-hosting/advanced/auth.mdx +14 -13
- package/docs/self-hosting/advanced/auth.zh-CN.mdx +15 -14
- package/docs/self-hosting/advanced/feature-flags.zh-CN.mdx +15 -15
- package/docs/self-hosting/advanced/knowledge-base.mdx +14 -3
- package/docs/self-hosting/advanced/knowledge-base.zh-CN.mdx +12 -3
- package/docs/self-hosting/advanced/model-list.zh-CN.mdx +5 -5
- package/docs/self-hosting/advanced/s3/cloudflare-r2.mdx +52 -81
- package/docs/self-hosting/advanced/s3/cloudflare-r2.zh-CN.mdx +51 -80
- package/docs/self-hosting/advanced/s3/tencent-cloud.mdx +20 -34
- package/docs/self-hosting/advanced/s3/tencent-cloud.zh-CN.mdx +28 -43
- package/docs/self-hosting/advanced/s3.mdx +30 -34
- package/docs/self-hosting/advanced/s3.zh-CN.mdx +28 -33
- package/docs/self-hosting/advanced/settings-url-share.mdx +6 -6
- package/docs/self-hosting/advanced/settings-url-share.zh-CN.mdx +19 -19
- package/docs/self-hosting/advanced/upstream-sync.mdx +73 -89
- package/docs/self-hosting/advanced/upstream-sync.zh-CN.mdx +71 -87
- package/docs/self-hosting/advanced/webrtc.mdx +14 -21
- package/docs/self-hosting/advanced/webrtc.zh-CN.mdx +19 -26
- package/docs/self-hosting/environment-variables/analytics.zh-CN.mdx +0 -3
- package/docs/self-hosting/environment-variables/auth.zh-CN.mdx +1 -1
- package/docs/self-hosting/environment-variables/basic.mdx +13 -13
- package/docs/self-hosting/environment-variables/basic.zh-CN.mdx +15 -15
- package/docs/self-hosting/environment-variables/model-provider.mdx +1 -1
- package/docs/self-hosting/environment-variables/model-provider.zh-CN.mdx +1 -1
- package/docs/self-hosting/environment-variables/s3.mdx +3 -4
- package/docs/self-hosting/environment-variables/s3.zh-CN.mdx +5 -7
- package/docs/self-hosting/environment-variables.mdx +8 -4
- package/docs/self-hosting/environment-variables.zh-CN.mdx +4 -0
- package/docs/self-hosting/examples/azure-openai.mdx +9 -12
- package/docs/self-hosting/examples/azure-openai.zh-CN.mdx +8 -11
- package/docs/self-hosting/examples/ollama.mdx +8 -7
- package/docs/self-hosting/examples/ollama.zh-CN.mdx +8 -7
- package/docs/self-hosting/platform/alibaba-cloud.mdx +5 -7
- package/docs/self-hosting/platform/alibaba-cloud.zh-CN.mdx +5 -7
- package/docs/self-hosting/platform/btpanel.mdx +3 -2
- package/docs/self-hosting/platform/btpanel.zh-CN.mdx +3 -3
- package/docs/self-hosting/platform/docker-compose.mdx +75 -85
- package/docs/self-hosting/platform/docker-compose.zh-CN.mdx +75 -85
- package/docs/self-hosting/platform/docker.mdx +87 -92
- package/docs/self-hosting/platform/docker.zh-CN.mdx +96 -115
- package/docs/self-hosting/platform/netlify.mdx +44 -94
- package/docs/self-hosting/platform/netlify.zh-CN.mdx +40 -90
- package/docs/self-hosting/platform/railway.mdx +6 -7
- package/docs/self-hosting/platform/railway.zh-CN.mdx +6 -7
- package/docs/self-hosting/platform/repocloud.mdx +6 -7
- package/docs/self-hosting/platform/repocloud.zh-CN.mdx +6 -7
- package/docs/self-hosting/platform/sealos.mdx +6 -7
- package/docs/self-hosting/platform/sealos.zh-CN.mdx +6 -7
- package/docs/self-hosting/platform/vercel.mdx +7 -8
- package/docs/self-hosting/platform/vercel.zh-CN.mdx +7 -8
- package/docs/self-hosting/platform/zeabur.mdx +29 -32
- package/docs/self-hosting/platform/zeabur.zh-CN.mdx +29 -32
- package/docs/self-hosting/server-database/docker-compose.mdx +44 -71
- package/docs/self-hosting/server-database/docker-compose.zh-CN.mdx +44 -71
- package/docs/self-hosting/server-database/docker.mdx +84 -88
- package/docs/self-hosting/server-database/docker.zh-CN.mdx +87 -91
- package/docs/self-hosting/server-database/dokploy.mdx +18 -1
- package/docs/self-hosting/server-database/dokploy.zh-CN.mdx +84 -68
- package/docs/self-hosting/server-database/repocloud.mdx +7 -9
- package/docs/self-hosting/server-database/repocloud.zh-CN.mdx +9 -11
- package/docs/self-hosting/server-database/vercel.mdx +158 -243
- package/docs/self-hosting/server-database/vercel.zh-CN.mdx +137 -205
- package/docs/self-hosting/server-database/zeabur.mdx +21 -23
- package/docs/self-hosting/server-database/zeabur.zh-CN.mdx +20 -22
- package/docs/self-hosting/server-database.mdx +34 -36
- package/docs/self-hosting/server-database.zh-CN.mdx +34 -37
- package/docs/self-hosting/start.mdx +1 -4
- package/docs/self-hosting/start.zh-CN.mdx +1 -1
- package/docs/usage/agents/agent-organization.mdx +5 -21
- package/docs/usage/agents/agent-organization.zh-CN.mdx +5 -21
- package/docs/usage/agents/concepts.mdx +4 -4
- package/docs/usage/agents/concepts.zh-CN.mdx +4 -4
- package/docs/usage/agents/custom-agent.mdx +2 -2
- package/docs/usage/agents/custom-agent.zh-CN.mdx +2 -2
- package/docs/usage/agents/model.mdx +4 -4
- package/docs/usage/agents/model.zh-CN.mdx +6 -6
- package/docs/usage/agents/prompt.mdx +5 -6
- package/docs/usage/agents/prompt.zh-CN.mdx +5 -6
- package/docs/usage/agents/topics.mdx +2 -2
- package/docs/usage/agents/topics.zh-CN.mdx +2 -2
- package/docs/usage/features/agent-market.mdx +2 -2
- package/docs/usage/features/agent-market.zh-CN.mdx +2 -2
- package/docs/usage/features/auth.mdx +1 -5
- package/docs/usage/features/auth.zh-CN.mdx +1 -5
- package/docs/usage/features/database.mdx +1 -5
- package/docs/usage/features/database.zh-CN.mdx +1 -5
- package/docs/usage/features/local-llm.mdx +2 -6
- package/docs/usage/features/local-llm.zh-CN.mdx +2 -6
- package/docs/usage/features/mobile.mdx +1 -5
- package/docs/usage/features/mobile.zh-CN.mdx +1 -5
- package/docs/usage/features/multi-ai-providers.mdx +3 -11
- package/docs/usage/features/multi-ai-providers.zh-CN.mdx +3 -11
- package/docs/usage/features/plugin-system.mdx +9 -10
- package/docs/usage/features/plugin-system.zh-CN.mdx +9 -10
- package/docs/usage/features/pwa.mdx +11 -25
- package/docs/usage/features/pwa.zh-CN.mdx +11 -25
- package/docs/usage/features/text-to-image.mdx +2 -2
- package/docs/usage/features/text-to-image.zh-CN.mdx +2 -2
- package/docs/usage/features/theme.mdx +1 -6
- package/docs/usage/features/theme.zh-CN.mdx +1 -6
- package/docs/usage/features/tts.mdx +3 -7
- package/docs/usage/features/tts.zh-CN.mdx +3 -7
- package/docs/usage/features/vision.mdx +2 -2
- package/docs/usage/features/vision.zh-CN.mdx +2 -2
- package/docs/usage/foundation/basic.mdx +7 -18
- package/docs/usage/foundation/basic.zh-CN.mdx +6 -16
- package/docs/usage/foundation/share.mdx +3 -13
- package/docs/usage/foundation/share.zh-CN.mdx +3 -13
- package/docs/usage/foundation/text2image.mdx +3 -12
- package/docs/usage/foundation/text2image.zh-CN.mdx +3 -12
- package/docs/usage/foundation/translate.mdx +3 -13
- package/docs/usage/foundation/translate.zh-CN.mdx +3 -13
- package/docs/usage/foundation/tts-stt.mdx +3 -12
- package/docs/usage/foundation/tts-stt.zh-CN.mdx +3 -12
- package/docs/usage/foundation/vision.mdx +4 -16
- package/docs/usage/foundation/vision.zh-CN.mdx +4 -16
- package/docs/usage/plugins/basic-usage.mdx +7 -30
- package/docs/usage/plugins/basic-usage.zh-CN.mdx +7 -30
- package/docs/usage/plugins/development.mdx +30 -78
- package/docs/usage/plugins/development.zh-CN.mdx +31 -79
- package/docs/usage/plugins/store.mdx +2 -10
- package/docs/usage/plugins/store.zh-CN.mdx +2 -10
- package/docs/usage/providers/ai21.mdx +17 -33
- package/docs/usage/providers/ai21.zh-CN.mdx +17 -33
- package/docs/usage/providers/ai360.mdx +17 -33
- package/docs/usage/providers/ai360.zh-CN.mdx +20 -36
- package/docs/usage/providers/anthropic.mdx +23 -45
- package/docs/usage/providers/anthropic.zh-CN.mdx +22 -44
- package/docs/usage/providers/azure.mdx +21 -51
- package/docs/usage/providers/azure.zh-CN.mdx +19 -48
- package/docs/usage/providers/baichuan.mdx +16 -34
- package/docs/usage/providers/baichuan.zh-CN.mdx +15 -33
- package/docs/usage/providers/bedrock.mdx +38 -87
- package/docs/usage/providers/bedrock.zh-CN.mdx +37 -86
- package/docs/usage/providers/cloudflare.mdx +25 -48
- package/docs/usage/providers/cloudflare.zh-CN.mdx +24 -45
- package/docs/usage/providers/deepseek.mdx +25 -51
- package/docs/usage/providers/deepseek.zh-CN.mdx +24 -50
- package/docs/usage/providers/fireworksai.mdx +23 -43
- package/docs/usage/providers/fireworksai.zh-CN.mdx +21 -41
- package/docs/usage/providers/gemini.mdx +20 -46
- package/docs/usage/providers/gemini.zh-CN.mdx +20 -46
- package/docs/usage/providers/giteeai.mdx +24 -45
- package/docs/usage/providers/giteeai.zh-CN.mdx +22 -43
- package/docs/usage/providers/github.mdx +19 -45
- package/docs/usage/providers/github.zh-CN.mdx +19 -44
- package/docs/usage/providers/groq.mdx +12 -29
- package/docs/usage/providers/groq.zh-CN.mdx +11 -28
- package/docs/usage/providers/hunyuan.mdx +19 -39
- package/docs/usage/providers/hunyuan.zh-CN.mdx +18 -38
- package/docs/usage/providers/internlm.mdx +21 -38
- package/docs/usage/providers/internlm.zh-CN.mdx +19 -36
- package/docs/usage/providers/minimax.mdx +24 -50
- package/docs/usage/providers/minimax.zh-CN.mdx +22 -48
- package/docs/usage/providers/mistral.mdx +21 -39
- package/docs/usage/providers/mistral.zh-CN.mdx +20 -38
- package/docs/usage/providers/moonshot.mdx +20 -38
- package/docs/usage/providers/moonshot.zh-CN.mdx +19 -37
- package/docs/usage/providers/novita.mdx +20 -43
- package/docs/usage/providers/novita.zh-CN.mdx +19 -42
- package/docs/usage/providers/ollama/gemma.mdx +12 -29
- package/docs/usage/providers/ollama/gemma.zh-CN.mdx +12 -30
- package/docs/usage/providers/ollama/qwen.mdx +17 -32
- package/docs/usage/providers/ollama/qwen.zh-CN.mdx +12 -27
- package/docs/usage/providers/ollama.mdx +67 -99
- package/docs/usage/providers/ollama.zh-CN.mdx +67 -99
- package/docs/usage/providers/openai.mdx +42 -56
- package/docs/usage/providers/openai.zh-CN.mdx +39 -52
- package/docs/usage/providers/openrouter.mdx +48 -84
- package/docs/usage/providers/openrouter.zh-CN.mdx +31 -67
- package/docs/usage/providers/perplexity.mdx +16 -34
- package/docs/usage/providers/perplexity.zh-CN.mdx +16 -34
- package/docs/usage/providers/qwen.mdx +26 -52
- package/docs/usage/providers/qwen.zh-CN.mdx +25 -51
- package/docs/usage/providers/sensenova.mdx +24 -45
- package/docs/usage/providers/sensenova.zh-CN.mdx +22 -43
- package/docs/usage/providers/siliconcloud.mdx +17 -33
- package/docs/usage/providers/siliconcloud.zh-CN.mdx +17 -33
- package/docs/usage/providers/spark.mdx +20 -40
- package/docs/usage/providers/spark.zh-CN.mdx +19 -39
- package/docs/usage/providers/stepfun.mdx +17 -35
- package/docs/usage/providers/stepfun.zh-CN.mdx +17 -35
- package/docs/usage/providers/taichu.mdx +16 -34
- package/docs/usage/providers/taichu.zh-CN.mdx +15 -33
- package/docs/usage/providers/togetherai.mdx +18 -40
- package/docs/usage/providers/togetherai.zh-CN.mdx +18 -40
- package/docs/usage/providers/upstage.mdx +18 -34
- package/docs/usage/providers/upstage.zh-CN.mdx +17 -33
- package/docs/usage/providers/wenxin.mdx +22 -42
- package/docs/usage/providers/wenxin.zh-CN.mdx +20 -40
- package/docs/usage/providers/xai.mdx +21 -38
- package/docs/usage/providers/xai.zh-CN.mdx +20 -37
- package/docs/usage/providers/zeroone.mdx +22 -48
- package/docs/usage/providers/zeroone.zh-CN.mdx +22 -48
- package/docs/usage/providers/zhipu.mdx +17 -35
- package/docs/usage/providers/zhipu.zh-CN.mdx +18 -34
- package/docs/usage/providers.mdx +1 -6
- package/docs/usage/providers.zh-CN.mdx +1 -6
- package/docs/usage/start.mdx +4 -18
- package/docs/usage/start.zh-CN.mdx +2 -19
- package/docs/usage/tools-calling/anthropic.mdx +18 -51
- package/docs/usage/tools-calling/anthropic.zh-CN.mdx +22 -55
- package/docs/usage/tools-calling/google.mdx +16 -23
- package/docs/usage/tools-calling/google.zh-CN.mdx +17 -24
- package/docs/usage/tools-calling/groq.mdx +9 -0
- package/docs/usage/tools-calling/groq.zh-CN.mdx +44 -70
- package/docs/usage/tools-calling/moonshot.mdx +9 -0
- package/docs/usage/tools-calling/openai.mdx +19 -44
- package/docs/usage/tools-calling/openai.zh-CN.mdx +20 -45
- package/docs/usage/tools-calling.mdx +9 -0
- package/docs/usage/tools-calling.zh-CN.mdx +60 -68
- package/next.config.ts +1 -0
- package/package.json +48 -41
- package/scripts/mdxWorkflow/index.ts +7 -0
- package/src/app/(main)/(mobile)/me/(home)/features/Header.tsx +2 -1
- package/src/app/(main)/(mobile)/me/data/features/Header.tsx +1 -1
- package/src/app/(main)/(mobile)/me/profile/features/Header.tsx +1 -1
- package/src/app/(main)/(mobile)/me/settings/features/Header.tsx +1 -1
- package/src/app/(main)/@nav/_layout/Mobile.tsx +2 -1
- package/src/app/(main)/chat/(workspace)/@topic/features/SystemRole/SystemRoleContent.tsx +2 -1
- package/src/app/(main)/chat/(workspace)/@topic/features/TopicListContent/ByTimeMode/GroupItem.tsx +2 -2
- package/src/app/(main)/chat/(workspace)/_layout/Desktop/ChatHeader/Main.tsx +2 -1
- package/src/app/(main)/chat/(workspace)/_layout/Desktop/ChatHeader/index.tsx +1 -1
- package/src/app/(main)/chat/(workspace)/_layout/Mobile/ChatHeader/ChatHeaderTitle.tsx +2 -1
- package/src/app/(main)/chat/(workspace)/_layout/Mobile/ChatHeader/index.tsx +1 -1
- package/src/app/(main)/chat/@session/_layout/Mobile/SessionHeader.tsx +2 -1
- package/src/app/(main)/chat/settings/_layout/Desktop/Header.tsx +1 -1
- package/src/app/(main)/chat/settings/_layout/Mobile/Header.tsx +1 -1
- package/src/app/(main)/discover/(detail)/provider/[slug]/features/InfoSidebar/SuggestionItem.tsx +8 -6
- package/src/app/(main)/discover/(list)/_layout/Desktop/Nav.tsx +1 -1
- package/src/app/(main)/discover/(list)/_layout/Mobile/Header.tsx +2 -1
- package/src/app/(main)/discover/_layout/Desktop/Header.tsx +1 -1
- package/src/app/(main)/discover/components/VirtuosoGridList/index.tsx +9 -5
- package/src/app/(main)/discover/search/_layout/Mobile/Header.tsx +1 -1
- package/src/app/(main)/files/(content)/@menu/features/KnowledgeBase/EmptyStatus.tsx +21 -13
- package/src/app/(main)/repos/[id]/evals/evaluation/EvaluationList/index.tsx +1 -1
- package/src/app/(main)/settings/sync/features/DeviceInfo/SystemIcon.tsx +2 -0
- package/src/components/Branding/ProductLogo/Custom.tsx +19 -20
- package/src/components/BrowserIcon/index.tsx +19 -30
- package/src/components/BubblesLoading/index.tsx +31 -23
- package/src/components/FunctionModal/createModalHooks.ts +6 -3
- package/src/components/StopLoading.tsx +10 -7
- package/src/features/ChatInput/Desktop/InputArea/index.tsx +2 -2
- package/src/features/InitClientDB/EnableModal.tsx +2 -2
- package/src/features/InitClientDB/{PGliteSVG.tsx → PGliteIcon.tsx} +17 -11
- package/src/features/ShareModal/ShareImage/index.tsx +32 -22
- package/src/features/ShareModal/ShareJSON/Preview.tsx +2 -2
- package/src/features/ShareModal/ShareJSON/index.tsx +49 -37
- package/src/features/ShareModal/ShareText/Preview.tsx +4 -1
- package/src/features/ShareModal/ShareText/index.tsx +49 -38
- package/src/features/ShareModal/index.tsx +1 -1
- package/src/features/ShareModal/style.ts +30 -0
- package/src/utils/colorUtils.ts +1 -1
- package/src/components/BrowserIcon/components/Brave.tsx +0 -56
- package/src/components/BrowserIcon/components/Chrome.tsx +0 -14
- package/src/components/BrowserIcon/components/Chromium.tsx +0 -14
- package/src/components/BrowserIcon/components/Edge.tsx +0 -36
- package/src/components/BrowserIcon/components/Firefox.tsx +0 -38
- package/src/components/BrowserIcon/components/Opera.tsx +0 -19
- package/src/components/BrowserIcon/components/Safari.tsx +0 -23
- 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`
|
45
|
-
| `AZURE_ENDPOINT`
|
46
|
-
| `AZURE_API_VERSION` | 必选 | Azure 的 API 版本,遵循 YYYY-MM-DD 格式
|
47
|
-
| `AZURE_MODEL_LIST`
|
48
|
-
| `ACCESS_CODE`
|
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
|
44
|
-
|
|
45
|
-
| `OLLAMA_HOST`
|
46
|
-
| `OLLAMA_ORIGINS`
|
47
|
-
| `OLLAMA_MODELS`
|
48
|
-
| `OLLAMA_KEEP_ALIVE`
|
49
|
-
| `OLLAMA_DEBUG`
|
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`
|
44
|
-
| `OLLAMA_ORIGINS`
|
45
|
-
| `OLLAMA_MODELS`
|
46
|
-
| `OLLAMA_KEEP_ALIVE` | 模型在显存中保持加载的持续时间
|
47
|
-
| `OLLAMA_DEBUG`
|
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
|
-
|
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
|
-
|
25
|
+
### One-click to deploy
|
25
26
|
|
26
|
-
|
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
|
-
|
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
|
-
|
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. 
|
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
|

|
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 
|
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 
|
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-
|
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
|
-
|
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
|
-
|
32
|
+
<Tabs items={['Ubuntu', 'CentOS']}>
|
33
|
+
<Tab>
|
34
|
+
```fish
|
35
|
+
$ apt install docker.io
|
36
|
+
```
|
37
|
+
</Tab>
|
54
38
|
|
55
|
-
|
39
|
+
<Tab>
|
40
|
+
```fish
|
41
|
+
$ yum install docker
|
42
|
+
```
|
43
|
+
</Tab>
|
44
|
+
</Tabs>
|
56
45
|
|
57
|
-
|
46
|
+
### Run Docker Compose Deployment Command
|
58
47
|
|
59
|
-
|
60
|
-
version: '3.8'
|
48
|
+
When using `docker-compose`, the configuration file is as follows:
|
61
49
|
|
62
|
-
|
63
|
-
|
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
|
-
|
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
|
-
|
78
|
-
$ docker-compose up -d
|
79
|
-
```
|
66
|
+
Run the following command to start the Lobe Chat service:
|
80
67
|
|
81
|
-
|
68
|
+
```bash
|
69
|
+
$ docker-compose up -d
|
70
|
+
```
|
82
71
|
|
83
|
-
|
72
|
+
### Crontab Automatic Update Script (Optional)
|
84
73
|
|
85
|
-
|
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
|
-
|
90
|
-
|
76
|
+
```bash
|
77
|
+
#!/bin/bash
|
78
|
+
# auto-update-lobe-chat.sh
|
91
79
|
|
92
|
-
#
|
93
|
-
|
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
|
-
#
|
96
|
-
|
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
|
101
|
-
|
86
|
+
# Check if the pull command was executed successfully
|
87
|
+
if [ $? -ne 0 ]; then
|
88
|
+
exit 1
|
89
|
+
fi
|
102
90
|
|
103
|
-
#
|
104
|
-
|
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
|
-
|
94
|
+
# If the image is already up to date, do nothing
|
95
|
+
if [ $? -eq 0 ]; then
|
96
|
+
exit 0
|
97
|
+
fi
|
109
98
|
|
110
|
-
|
111
|
-
echo "Removed: $(docker rm -f Lobe-Chat)"
|
99
|
+
echo "Detected Lobe-Chat update"
|
112
100
|
|
113
|
-
#
|
114
|
-
|
101
|
+
# Remove the old container
|
102
|
+
echo "Removed: $(docker rm -f Lobe-Chat)"
|
115
103
|
|
116
|
-
#
|
117
|
-
|
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
|
-
#
|
120
|
-
echo "
|
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
|
-
#
|
124
|
-
|
125
|
-
echo "
|
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
|
-
|
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
|
-
|
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
|
-
|
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://hub.docker.com/r/lobehub/lobe-chat)
|
15
16
|
|
16
|
-
[](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)
|
17
|
+
[](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)
|
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
|
-
|
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
|
-
|
29
|
+
<Tabs items={['Ubuntu', 'CentOS']}>
|
30
|
+
<Tab>
|
31
|
+
```fish
|
32
|
+
$ apt install docker.io
|
33
|
+
```
|
34
|
+
</Tab>
|
51
35
|
|
52
|
-
|
36
|
+
<Tab>
|
37
|
+
```fish
|
38
|
+
$ yum install docker
|
39
|
+
```
|
40
|
+
</Tab>
|
41
|
+
</Tabs>
|
53
42
|
|
54
|
-
|
43
|
+
### 运行 Docker Compose 部署指令
|
55
44
|
|
56
|
-
|
57
|
-
version: '3.8'
|
45
|
+
使用 `docker-compose` 时配置文件如下:
|
58
46
|
|
59
|
-
|
60
|
-
|
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
|
-
|
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
|
-
|
75
|
-
$ docker-compose up -d
|
76
|
-
```
|
63
|
+
运行以下命令启动 Lobe Chat 服务:
|
77
64
|
|
78
|
-
|
65
|
+
```bash
|
66
|
+
$ docker-compose up -d
|
67
|
+
```
|
79
68
|
|
80
|
-
|
69
|
+
### Crontab 自动更新脚本(可选)
|
81
70
|
|
82
|
-
|
83
|
-
#!/bin/bash
|
84
|
-
# auto-update-lobe-chat.sh
|
71
|
+
类似地,你可以使用以下脚本来自动更新 Lobe Chat,使用 `Docker Compose` 时,环境变量无需额外配置。
|
85
72
|
|
86
|
-
|
87
|
-
|
73
|
+
```bash
|
74
|
+
#!/bin/bash
|
75
|
+
# auto-update-lobe-chat.sh
|
88
76
|
|
89
|
-
#
|
90
|
-
|
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
|
-
#
|
93
|
-
|
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
|
98
|
-
|
83
|
+
# Check if the pull command was executed successfully
|
84
|
+
if [ $? -ne 0 ]; then
|
85
|
+
exit 1
|
86
|
+
fi
|
99
87
|
|
100
|
-
#
|
101
|
-
|
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
|
-
|
91
|
+
# If the image is already up to date, do nothing
|
92
|
+
if [ $? -eq 0 ]; then
|
93
|
+
exit 0
|
94
|
+
fi
|
106
95
|
|
107
|
-
|
108
|
-
echo "Removed: $(docker rm -f Lobe-Chat)"
|
96
|
+
echo "Detected Lobe-Chat update"
|
109
97
|
|
110
|
-
#
|
111
|
-
|
98
|
+
# Remove the old container
|
99
|
+
echo "Removed: $(docker rm -f Lobe-Chat)"
|
112
100
|
|
113
|
-
#
|
114
|
-
|
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
|
-
#
|
117
|
-
echo "
|
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
|
-
#
|
121
|
-
|
122
|
-
echo "
|
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
|
-
|
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
|
-
|
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
|
-
|
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>
|