@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.
- 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/package.json +42 -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/database/repositories/aiInfra/index.ts +19 -7
- package/src/database/server/models/__tests__/aiModel.test.ts +4 -6
- package/src/database/server/models/aiModel.ts +6 -3
- 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/store/aiInfra/slices/aiProvider/action.ts +1 -1
- package/src/types/aiProvider.ts +1 -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
@@ -26,60 +26,55 @@ The best practice in this area is to use a file storage service (S3) to store im
|
|
26
26
|
<Steps>
|
27
27
|
### `S3_ACCESS_KEY_ID` and `S3_SECRET_ACCESS_KEY`
|
28
28
|
|
29
|
-
These are the two keys required by all S3 compatible storage services to access the S3 storage service, not detailed here.
|
29
|
+
These are the two keys required by all S3 compatible storage services to access the S3 storage service, not detailed here.
|
30
30
|
|
31
|
-
### `S3_ENDPOINT`
|
31
|
+
### `S3_ENDPOINT`
|
32
32
|
|
33
|
-
The request endpoint of the storage bucket. Note that this link should not contain the name of the storage bucket.
|
33
|
+
The request endpoint of the storage bucket. Note that this link should not contain the name of the storage bucket.
|
34
34
|
|
35
|
-
<Callout type={'warning'}>
|
36
|
-
|
37
|
-
</Callout>
|
35
|
+
<Callout type={'warning'}>
|
36
|
+
`S3_ENDPOINT` must remove the suffix path, otherwise the uploaded files will not be accessible
|
37
|
+
</Callout>
|
38
38
|
|
39
|
-
For example, for Cloudflare:
|
39
|
+
For example, for Cloudflare:
|
40
40
|
|
41
|
-
```shell
|
42
|
-
S3_ENDPOINT=https://0b33a03b5c993fd2f453379dc36558e5.r2.cloudflarestorage.com
|
43
|
-
```
|
41
|
+
```shell
|
42
|
+
S3_ENDPOINT=https://0b33a03b5c993fd2f453379dc36558e5.r2.cloudflarestorage.com
|
43
|
+
```
|
44
44
|
|
45
|
-
### `S3_BUCKET` and `S3_REGION`
|
45
|
+
### `S3_BUCKET` and `S3_REGION`
|
46
46
|
|
47
|
-
The name and region of the storage bucket. `S3_BUCKET` is required to specify the name of the storage bucket. `S3_REGION` is optional and is used to specify the region of the storage bucket. Generally, it does not need to be added, but some service providers may require configuration.
|
47
|
+
The name and region of the storage bucket. `S3_BUCKET` is required to specify the name of the storage bucket. `S3_REGION` is optional and is used to specify the region of the storage bucket. Generally, it does not need to be added, but some service providers may require configuration.
|
48
48
|
|
49
|
-
### `S3_SET_ACL`
|
49
|
+
### `S3_SET_ACL`
|
50
50
|
|
51
|
-
Whether to set the ACL to `public-read` when uploading files. This option is enabled by default. If the service provider does not support setting individual ACLs for files (i.e., all files inherit the ACL of the storage bucket), enabling this option may cause request errors. Set `S3_SET_ACL` to `0` to disable it.
|
51
|
+
Whether to set the ACL to `public-read` when uploading files. This option is enabled by default. If the service provider does not support setting individual ACLs for files (i.e., all files inherit the ACL of the storage bucket), enabling this option may cause request errors. Set `S3_SET_ACL` to `0` to disable it.
|
52
52
|
|
53
|
-
### `S3_PUBLIC_DOMAIN`
|
53
|
+
### `S3_PUBLIC_DOMAIN`
|
54
54
|
|
55
|
-
The public access domain of the storage bucket, used to access files in the storage bucket. This address needs to be **publicly readable**. The reason is that when OpenAI's gpt-4o and other vision models recognize images, OpenAI will try to download this image link on their servers. Therefore, this link must be publicly accessible. If it is a private link, OpenAI will not be able to access the image and thus will not be able to recognize the image content properly.
|
55
|
+
The public access domain of the storage bucket, used to access files in the storage bucket. This address needs to be **publicly readable**. The reason is that when OpenAI's gpt-4o and other vision models recognize images, OpenAI will try to download this image link on their servers. Therefore, this link must be publicly accessible. If it is a private link, OpenAI will not be able to access the image and thus will not be able to recognize the image content properly.
|
56
56
|
|
57
|
-
<Callout type={'warning'}>
|
58
|
-
|
59
|
-
|
60
|
-
</Callout>
|
57
|
+
<Callout type={'warning'}>
|
58
|
+
Additionally, since this access domain is often a separate URL, it needs to be configured to allow
|
59
|
+
cross-origin access to the site. Otherwise, cross-origin issues will occur in the browser.
|
60
|
+
</Callout>
|
61
61
|
|
62
|
-
### `S3_ENABLE_PATH_STYLE`
|
62
|
+
### `S3_ENABLE_PATH_STYLE`
|
63
63
|
|
64
|
-
Whether to enable the `path-style` access mode of S3. This option is disabled by default. If your S3 service provider uses `path-style`, set `S3_ENABLE_PATH_STYLE` to `1` to enable it.
|
64
|
+
Whether to enable the `path-style` access mode of S3. This option is disabled by default. If your S3 service provider uses `path-style`, set `S3_ENABLE_PATH_STYLE` to `1` to enable it.
|
65
65
|
|
66
66
|
<Callout type={'info'}>
|
67
|
+
`path-style` and `virtual-host` are different ways to access buckets and objects in S3, with different URL structures and domain name resolutions.
|
67
68
|
|
68
|
-
|
69
|
-
|
70
|
-
Assuming the domain name of the S3 service provider is s3.example.net, the bucket is mybucket, and the object is config.env, the specific differences are as follows:
|
69
|
+
Assuming the domain name of the S3 service provider is s3.example.net, the bucket is mybucket, and the object is config.env, the specific differences are as follows:
|
71
70
|
|
72
|
-
- path-style: `s3.example.net/mybucket/config.env`
|
73
|
-
- virtual-host: `mybucket.s3.example.net/config.env`
|
74
|
-
|
75
|
-
</Callout>
|
71
|
+
- path-style: `s3.example.net/mybucket/config.env`
|
72
|
+
- virtual-host: `mybucket.s3.example.net/config.env`
|
73
|
+
</Callout>
|
76
74
|
|
77
75
|
<Callout type={'tip'}>
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
</Callout>
|
82
|
-
|
76
|
+
Common S3 cloud service providers often default to the `virtual-host` mode, while self-deployed services like Minio default to using `path-style`. Therefore, if you use Minio as the S3 service, you need to set `S3_ENABLE_PATH_STYLE=1`.
|
77
|
+
</Callout>
|
83
78
|
</Steps>
|
84
79
|
|
85
80
|
## S3 Configuration Guide
|
@@ -88,6 +83,7 @@ Currently, the S3 configuration tutorials included in the documentation are:
|
|
88
83
|
|
89
84
|
<Cards>
|
90
85
|
<Card href={'/docs/self-hosting/advanced/s3/cloudflare-r2'} title={'Cloudflare R2'} />
|
86
|
+
|
91
87
|
<Card href={'/docs/self-hosting/advanced/s3/tencent-cloud'} title={'Tencent Cloud COS'} />
|
92
88
|
</Cards>
|
93
89
|
|
@@ -12,7 +12,7 @@ tags:
|
|
12
12
|
|
13
13
|
LobeChat 在 [很早以前](https://x.com/lobehub/status/1724289575672291782) 就支持了多模态的 AI 会话,其中涉及到图片上传给大模型的功能。在客户端数据库方案中,图片文件直接以二进制数据存储在浏览器 IndexedDB 数据库,但在服务端数据库中这个方案并不可行。因为在 Postgres 中直接存储文件类二进制数据会大大浪费宝贵的数据库存储空间,并拖慢计算性能。
|
14
14
|
|
15
|
-
这块最佳实践是使用文件存储服务(S3)来存储图片文件,同时 S3
|
15
|
+
这块最佳实践是使用文件存储服务(S3)来存储图片文件,同时 S3 也是文件上传 / 知识库功能所依赖的大容量静态文件存储方案。
|
16
16
|
|
17
17
|
<Callout type={'info'}>
|
18
18
|
在本文档库中,S3 所指代的是指兼容 S3 存储方案,即支持 Amazon S3 API 的对象存储系统,常见例如
|
@@ -24,58 +24,52 @@ LobeChat 在 [很早以前](https://x.com/lobehub/status/1724289575672291782)
|
|
24
24
|
<Steps>
|
25
25
|
### `S3_ACCESS_KEY_ID` 与 `S3_SECRET_ACCESS_KEY`
|
26
26
|
|
27
|
-
所有 S3 兼容存储服务都需要的两个密钥,用于访问 S3 存储服务,不详细展开。
|
27
|
+
所有 S3 兼容存储服务都需要的两个密钥,用于访问 S3 存储服务,不详细展开。
|
28
28
|
|
29
|
-
### `S3_ENDPOINT`
|
29
|
+
### `S3_ENDPOINT`
|
30
30
|
|
31
|
-
存储桶的请求端点, 注意此处链接不应该包含存储桶的名称。
|
31
|
+
存储桶的请求端点, 注意此处链接不应该包含存储桶的名称。
|
32
32
|
|
33
|
-
<Callout type={'warning'}>`S3_ENDPOINT`必须删除后缀路径,否则会无法访问所上传文件</Callout>
|
33
|
+
<Callout type={'warning'}>`S3_ENDPOINT`必须删除后缀路径,否则会无法访问所上传文件</Callout>
|
34
34
|
|
35
|
-
例如 Cloudflare 为:
|
35
|
+
例如 Cloudflare 为:
|
36
36
|
|
37
|
-
```shell
|
38
|
-
S3_ENDPOINT=https://0b33a03b5c993fd2f453379dc36558e5.r2.cloudflarestorage.com
|
39
|
-
```
|
37
|
+
```shell
|
38
|
+
S3_ENDPOINT=https://0b33a03b5c993fd2f453379dc36558e5.r2.cloudflarestorage.com
|
39
|
+
```
|
40
40
|
|
41
|
-
### `S3_BUCKET` 和 `S3_REGION`
|
41
|
+
### `S3_BUCKET` 和 `S3_REGION`
|
42
42
|
|
43
|
-
存储桶的名称和区域,`S3_BUCKET` 是必须的,用于指定存储桶的名称。 `S3_REGION` 是可选的,用于指定存储桶的区域,一般来说不需要添加,但某些服务商则需要配置。
|
43
|
+
存储桶的名称和区域,`S3_BUCKET` 是必须的,用于指定存储桶的名称。 `S3_REGION` 是可选的,用于指定存储桶的区域,一般来说不需要添加,但某些服务商则需要配置。
|
44
44
|
|
45
|
-
### `S3_SET_ACL`
|
45
|
+
### `S3_SET_ACL`
|
46
46
|
|
47
|
-
是否在上传文件时设置 ACL 为 `public-read`。该选项默认启用。如果服务商不支持为文件设置单独的 ACL(即所有文件继承存储桶的 ACL),启用此选项可能会导致请求错误,将 `S3_SET_ACL` 设置为 `0` 即可关闭。
|
47
|
+
是否在上传文件时设置 ACL 为 `public-read`。该选项默认启用。如果服务商不支持为文件设置单独的 ACL(即所有文件继承存储桶的 ACL),启用此选项可能会导致请求错误,将 `S3_SET_ACL` 设置为 `0` 即可关闭。
|
48
48
|
|
49
|
-
### `S3_PUBLIC_DOMAIN`
|
49
|
+
### `S3_PUBLIC_DOMAIN`
|
50
50
|
|
51
|
-
存储桶对外的访问域名,用于访问存储桶中的文件,这个地址需要**允许互联网可读**。 原因是 OpenAI 的 gpt-4o 等视觉模型识别图片时,OpenAI 会尝试在他们的服务器中下载这个图片链接,因此这个链接必须是公开可访问的,如果是私有的链接,OpenAI 将无法访问到这个图片,进而无法正常识别到图片内容。
|
51
|
+
存储桶对外的访问域名,用于访问存储桶中的文件,这个地址需要**允许互联网可读**。 原因是 OpenAI 的 gpt-4o 等视觉模型识别图片时,OpenAI 会尝试在他们的服务器中下载这个图片链接,因此这个链接必须是公开可访问的,如果是私有的链接,OpenAI 将无法访问到这个图片,进而无法正常识别到图片内容。
|
52
52
|
|
53
53
|
<Callout type={'warning'}>
|
54
54
|
此外,由于该访问域名往往是一个独立的网址,因此需要配置允许站点的跨域访问,否则会在浏览器中出现跨域问题。
|
55
|
+
</Callout>
|
55
56
|
|
56
|
-
|
57
|
-
|
58
|
-
### `S3_ENABLE_PATH_STYLE`
|
59
|
-
|
60
|
-
是否启用 S3 的 `path-style` 访问模式。此选项默认禁用。如果您的 S3 服务提供商使用 `path-style`,请将 `S3_ENABLE_PATH_STYLE` 设置为 `1` 以启用它。
|
57
|
+
### `S3_ENABLE_PATH_STYLE`
|
61
58
|
|
62
|
-
|
63
|
-
|
64
|
-
`path-style` 和 `virtual-host` 在 S3 中是访问 bucket 和 object 的不同方式,URL 的结构和域名解析不太一样
|
59
|
+
是否启用 S3 的 `path-style` 访问模式。此选项默认禁用。如果您的 S3 服务提供商使用 `path-style`,请将 `S3_ENABLE_PATH_STYLE` 设置为 `1` 以启用它。
|
65
60
|
|
66
|
-
|
61
|
+
<Callout type={'info'}>
|
62
|
+
`path-style` 和 `virtual-host` 在 S3 中是访问 bucket 和 object 的不同方式,URL 的结构和域名解析不太一样
|
67
63
|
|
68
|
-
|
69
|
-
- virtual-host : `mybucket.s3.example.net/config.env`
|
64
|
+
假设 S3 服务商的域名是 s3.example.net ,bucket 为 mybucket,object 为 config.env,具体区别如下:
|
70
65
|
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
常见的 S3 Cloud 服务商往往默认采用 `virtual-host` 模式,而自部署服务 minio 则默认使用的是 `path-style`。 因此如果你使用了 minio 作为 S3 服务,你需要设置 `S3_ENABLE_PATH_STYLE=1` 。
|
76
|
-
|
77
|
-
</Callout>
|
66
|
+
- path-style : `s3.example.net/mybucket/config.env`
|
67
|
+
- virtual-host : `mybucket.s3.example.net/config.env`
|
68
|
+
</Callout>
|
78
69
|
|
70
|
+
<Callout type={'tip'}>
|
71
|
+
常见的 S3 Cloud 服务商往往默认采用 `virtual-host` 模式,而自部署服务 minio 则默认使用的是 `path-style`。 因此如果你使用了 minio 作为 S3 服务,你需要设置 `S3_ENABLE_PATH_STYLE=1` 。
|
72
|
+
</Callout>
|
79
73
|
</Steps>
|
80
74
|
|
81
75
|
## S3 配置指南
|
@@ -84,6 +78,7 @@ S3_ENDPOINT=https://0b33a03b5c993fd2f453379dc36558e5.r2.cloudflarestorage.com
|
|
84
78
|
|
85
79
|
<Cards>
|
86
80
|
<Card href={'/zh/docs/self-hosting/advanced/s3/cloudflare-r2'} title={'Cloudflare R2'} />
|
81
|
+
|
87
82
|
<Card href={'/zh/docs/self-hosting/advanced/s3/tencent-cloud'} title={'腾讯云 COS'} />
|
88
83
|
</Cards>
|
89
84
|
|
@@ -139,9 +139,9 @@ export type UserModelProviderConfig = Record<string, ProviderConfig>;
|
|
139
139
|
|
140
140
|
- Type `ProviderConfig`
|
141
141
|
|
142
|
-
| Property name | Type
|
143
|
-
| ------------------- |
|
144
|
-
| autoFetchModelLists | boolean
|
145
|
-
| enabled | boolean
|
146
|
-
| enabledModels | string[] | null | The IDs of the enabled models. |
|
147
|
-
| fetchOnClient | boolean
|
142
|
+
| Property name | Type | Description | |
|
143
|
+
| ------------------- | --------- | ------------------------------------------- | ------------------------------ |
|
144
|
+
| autoFetchModelLists | boolean | Whether to automatically fetch model lists. | |
|
145
|
+
| enabled | boolean | Whether the model provider is enabled. | |
|
146
|
+
| enabledModels | string\[] | null | The IDs of the enabled models. |
|
147
|
+
| fetchOnClient | boolean | Whether to fetch on the client. | |
|
@@ -30,7 +30,7 @@ https://lobehub.com/?settings=<JSON格式的设置对象>
|
|
30
30
|
https://lobehub.com/?settings={"keyVaults":{"openai":{"apiKey":"user-key","baseURL":"https://your-proxy.com/v1"}}}
|
31
31
|
```
|
32
32
|
|
33
|
-
JSON格式的设置示例:
|
33
|
+
JSON 格式的设置示例:
|
34
34
|
|
35
35
|
```json
|
36
36
|
{
|
@@ -70,7 +70,7 @@ console.log(url);
|
|
70
70
|
|
71
71
|
- 参数及其类型
|
72
72
|
|
73
|
-
| 参数名称
|
73
|
+
| 参数名称 | 类型 |
|
74
74
|
| ---------- | -------------------------- |
|
75
75
|
| anthropic | `OpenAICompatibleKeyVault` |
|
76
76
|
| azure | `AzureOpenAIKeyVault` |
|
@@ -90,25 +90,25 @@ console.log(url);
|
|
90
90
|
|
91
91
|
- Type `OpenAICompatibleKeyVault`
|
92
92
|
|
93
|
-
| 参数
|
94
|
-
| ------- | ------ |
|
93
|
+
| 参数 | 类型 | 描述 |
|
94
|
+
| ------- | ------ | ----------- |
|
95
95
|
| apiKey | string | 模型的 API 密钥。 |
|
96
|
-
| baseURL | string | 模型API端点。
|
96
|
+
| baseURL | string | 模型 API 端点。 |
|
97
97
|
|
98
98
|
- Type `AzureOpenAIKeyVault`
|
99
99
|
|
100
|
-
| 参数
|
101
|
-
| ---------- | ------ |
|
100
|
+
| 参数 | 类型 | 描述 |
|
101
|
+
| ---------- | ------ | ---------------------- |
|
102
102
|
| apiVersion | string | Azure OpenAI 的 API 版本。 |
|
103
|
-
| apiKey | string | 模型的 API 密钥。
|
104
|
-
| baseURL | string | 模型API端点。
|
103
|
+
| apiKey | string | 模型的 API 密钥。 |
|
104
|
+
| baseURL | string | 模型 API 端点。 |
|
105
105
|
|
106
106
|
- Type `AWSBedrockKeyVault`
|
107
107
|
|
108
|
-
| 参数
|
109
|
-
| --------------- | ------ |
|
108
|
+
| 参数 | 类型 | 描述 |
|
109
|
+
| --------------- | ------ | --------------------- |
|
110
110
|
| accessKeyId | string | AWS Bedrock 的访问密钥 ID。 |
|
111
|
-
| region | string | AWS Bedrock 的区域。
|
111
|
+
| region | string | AWS Bedrock 的区域。 |
|
112
112
|
| secretAccessKey | string | AWS Bedrock 的访问密钥。 |
|
113
113
|
|
114
114
|
### languageModel
|
@@ -117,7 +117,7 @@ console.log(url);
|
|
117
117
|
export type UserModelProviderConfig = Record<string, ProviderConfig>;
|
118
118
|
```
|
119
119
|
|
120
|
-
| 参数名称
|
120
|
+
| 参数名称 | 类型 |
|
121
121
|
| ---------- | ---------------- |
|
122
122
|
| anthropic | `ProviderConfig` |
|
123
123
|
| azure | `ProviderConfig` |
|
@@ -137,9 +137,9 @@ export type UserModelProviderConfig = Record<string, ProviderConfig>;
|
|
137
137
|
|
138
138
|
- 类型 `ProviderConfig`
|
139
139
|
|
140
|
-
| 参数
|
141
|
-
| ------------------- |
|
142
|
-
| autoFetchModelLists | boolean
|
143
|
-
| enabled | boolean
|
144
|
-
| enabledModels | string[] | 启用的模型的 ID。
|
145
|
-
| fetchOnClient | boolean
|
140
|
+
| 参数 | TS 类型 | 描述 |
|
141
|
+
| ------------------- | --------- | ---------------------- |
|
142
|
+
| autoFetchModelLists | boolean | 是否自动获取模型列表。 |
|
143
|
+
| enabled | boolean | 是否启用该模型。 |
|
144
|
+
| enabledModels | string\[] | 启用的模型的 ID。 |
|
145
|
+
| fetchOnClient | boolean | 是否在客户端发起请求,默认在服务端发起请求。 |
|
@@ -30,27 +30,15 @@ If you deployed your project according to the one-click deployment steps in the
|
|
30
30
|
|
31
31
|
After forking the project, due to Github's limitations, you need to manually enable Workflows on the Actions page of your forked project and start the Upstream Sync Action. Once enabled, you can set up automatic updates to occur every hour.
|
32
32
|
|
33
|
-
<Image
|
34
|
-
alt="Enable Automatic Updates S1"
|
35
|
-
src="https://github-production-user-asset-6210df.s3.amazonaws.com/17870709/266985117-4d48fe7b-0412-4667-8129-b25ebcf2c9de.png"
|
36
|
-
/>
|
33
|
+
<Image alt="Enable Automatic Updates S1" src="https://github-production-user-asset-6210df.s3.amazonaws.com/17870709/266985117-4d48fe7b-0412-4667-8129-b25ebcf2c9de.png" />
|
37
34
|
|
38
|
-
<Image
|
39
|
-
alt="Enable Automatic Updates S2"
|
40
|
-
src="https://github-production-user-asset-6210df.s3.amazonaws.com/17870709/266985177-7677b4ce-c348-4145-9f60-829d448d5be6.png"
|
41
|
-
/>
|
35
|
+
<Image alt="Enable Automatic Updates S2" src="https://github-production-user-asset-6210df.s3.amazonaws.com/17870709/266985177-7677b4ce-c348-4145-9f60-829d448d5be6.png" />
|
42
36
|
|
43
37
|
If you encounter a sync failure, you need to manually click "Update Branch" once.
|
44
38
|
|
45
|
-
<Image
|
46
|
-
alt="GitHub Action Sync Failure"
|
47
|
-
src="https://github.com/user-attachments/assets/9baacac6-5af4-460b-862d-682b76c18459"
|
48
|
-
/>
|
39
|
+
<Image alt="GitHub Action Sync Failure" src="https://github.com/user-attachments/assets/9baacac6-5af4-460b-862d-682b76c18459" />
|
49
40
|
|
50
|
-
<Image
|
51
|
-
alt="Manually Sync 'Update Branch'"
|
52
|
-
src="https://github.com/user-attachments/assets/d524c20d-306a-45bc-971b-96920b87fab4"
|
53
|
-
/>
|
41
|
+
<Image alt="Manually Sync 'Update Branch'" src="https://github.com/user-attachments/assets/d524c20d-306a-45bc-971b-96920b87fab4" />
|
54
42
|
|
55
43
|
## `B` Docker Deployment
|
56
44
|
|
@@ -59,34 +47,33 @@ Upgrading the Docker deployment version is very simple, you just need to redeplo
|
|
59
47
|
<Steps>
|
60
48
|
### Stop and Remove the Current Running LobeChat Container
|
61
49
|
|
62
|
-
Assuming the LobeChat container is named `lobe-chat`, use the following commands to stop and remove the currently running LobeChat container:
|
50
|
+
Assuming the LobeChat container is named `lobe-chat`, use the following commands to stop and remove the currently running LobeChat container:
|
63
51
|
|
64
|
-
```fish
|
65
|
-
docker stop lobe-chat
|
66
|
-
docker rm lobe-chat
|
67
|
-
```
|
52
|
+
```fish
|
53
|
+
docker stop lobe-chat
|
54
|
+
docker rm lobe-chat
|
55
|
+
```
|
68
56
|
|
69
|
-
### Pull the Latest LobeChat Image
|
57
|
+
### Pull the Latest LobeChat Image
|
70
58
|
|
71
|
-
Use the following command to pull the latest Docker image for LobeChat:
|
59
|
+
Use the following command to pull the latest Docker image for LobeChat:
|
72
60
|
|
73
|
-
```fish
|
74
|
-
docker pull lobehub/lobe-chat
|
75
|
-
```
|
61
|
+
```fish
|
62
|
+
docker pull lobehub/lobe-chat
|
63
|
+
```
|
76
64
|
|
77
|
-
### Restart the Docker Container
|
65
|
+
### Restart the Docker Container
|
78
66
|
|
79
|
-
Redeploy the LobeChat container using the newly pulled image:
|
80
|
-
|
81
|
-
```fish
|
82
|
-
docker run -d -p 3210:3210 \
|
83
|
-
-e OPENAI_API_KEY=sk-xxxx \
|
84
|
-
-e OPENAI_PROXY_URL=https://api-proxy.com/v1 \
|
85
|
-
-e ACCESS_CODE=lobe66 \
|
86
|
-
--name lobe-chat \
|
87
|
-
lobehub/lobe-chat
|
88
|
-
```
|
67
|
+
Redeploy the LobeChat container using the newly pulled image:
|
89
68
|
|
69
|
+
```fish
|
70
|
+
docker run -d -p 3210:3210 \
|
71
|
+
-e OPENAI_API_KEY=sk-xxxx \
|
72
|
+
-e OPENAI_PROXY_URL=https://api-proxy.com/v1 \
|
73
|
+
-e ACCESS_CODE=lobe66 \
|
74
|
+
--name lobe-chat \
|
75
|
+
lobehub/lobe-chat
|
76
|
+
```
|
90
77
|
</Steps>
|
91
78
|
|
92
79
|
Ensure that you have sufficient permissions to stop and remove the container before executing these commands, and that Docker has sufficient permissions to pull the new image.
|
@@ -94,80 +81,77 @@ Ensure that you have sufficient permissions to stop and remove the container bef
|
|
94
81
|
<Callout type={'tip'}>
|
95
82
|
**If I redeploy, will I lose my local chat records?**
|
96
83
|
|
97
|
-
No need to worry, you won't. All of LobeChat's chat records are stored in your local browser. Therefore, when redeploying LobeChat using Docker, your chat records will not be lost.
|
98
|
-
|
84
|
+
No need to worry, you won't. All of LobeChat's chat records are stored in your local browser. Therefore, when redeploying LobeChat using Docker, your chat records will not be lost.
|
99
85
|
</Callout>
|
100
86
|
|
101
87
|
If you wish to automate the above steps, you can follow the method below and use Crontab scheduling to complete it. The specific steps are as follows.
|
102
88
|
|
103
89
|
<Steps>
|
90
|
+
### Write automatic update scripts and configuration files
|
104
91
|
|
105
|
-
|
106
|
-
|
107
|
-
First, create a `lobe.env` configuration file with various environment variables, for example:
|
92
|
+
First, create a `lobe.env` configuration file with various environment variables, for example:
|
108
93
|
|
109
|
-
```env
|
110
|
-
OPENAI_API_KEY=sk-xxxx
|
111
|
-
OPENAI_PROXY_URL=https://api-proxy.com/v1
|
112
|
-
ACCESS_CODE=arthals2333
|
113
|
-
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
|
114
|
-
```
|
94
|
+
```env
|
95
|
+
OPENAI_API_KEY=sk-xxxx
|
96
|
+
OPENAI_PROXY_URL=https://api-proxy.com/v1
|
97
|
+
ACCESS_CODE=arthals2333
|
98
|
+
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
|
99
|
+
```
|
115
100
|
|
116
|
-
Then, you can use the following script to automate the update:
|
101
|
+
Then, you can use the following script to automate the update:
|
117
102
|
|
118
|
-
```bash
|
119
|
-
#!/bin/bash
|
120
|
-
# auto-update-lobe-chat.sh
|
103
|
+
```bash
|
104
|
+
#!/bin/bash
|
105
|
+
# auto-update-lobe-chat.sh
|
121
106
|
|
122
|
-
# Set up proxy (optional)
|
123
|
-
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
|
107
|
+
# Set up proxy (optional)
|
108
|
+
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
|
124
109
|
|
125
|
-
# Pull the latest image and store the output in a variable
|
126
|
-
output=$(docker pull lobehub/lobe-chat:latest 2>&1)
|
110
|
+
# Pull the latest image and store the output in a variable
|
111
|
+
output=$(docker pull lobehub/lobe-chat:latest 2>&1)
|
127
112
|
|
128
|
-
# Check if the pull command was executed successfully
|
129
|
-
if [ $? -ne 0 ]; then
|
130
|
-
|
131
|
-
fi
|
113
|
+
# Check if the pull command was executed successfully
|
114
|
+
if [ $? -ne 0 ]; then
|
115
|
+
exit 1
|
116
|
+
fi
|
132
117
|
|
133
|
-
# Check if the output contains a specific string
|
134
|
-
echo "$output" | grep -q "Image is up to date for lobehub/lobe-chat:latest"
|
118
|
+
# Check if the output contains a specific string
|
119
|
+
echo "$output" | grep -q "Image is up to date for lobehub/lobe-chat:latest"
|
135
120
|
|
136
|
-
# If the image is already up to date, do nothing
|
137
|
-
if [ $? -eq 0 ]; then
|
138
|
-
|
139
|
-
fi
|
121
|
+
# If the image is already up to date, do nothing
|
122
|
+
if [ $? -eq 0 ]; then
|
123
|
+
exit 0
|
124
|
+
fi
|
140
125
|
|
141
|
-
echo "Detected lobe-chat update"
|
126
|
+
echo "Detected lobe-chat update"
|
142
127
|
|
143
|
-
# Remove the old container
|
144
|
-
echo "Removed: $(docker rm -f lobe-chat)"
|
128
|
+
# Remove the old container
|
129
|
+
echo "Removed: $(docker rm -f lobe-chat)"
|
145
130
|
|
146
|
-
# Run the new container(Please change the path to the env file)
|
147
|
-
echo "Started: $(docker run -d --network=host --env-file /path/to/lobe.env --name=lobe-chat --restart=always lobehub/lobe-chat)"
|
131
|
+
# Run the new container(Please change the path to the env file)
|
132
|
+
echo "Started: $(docker run -d --network=host --env-file /path/to/lobe.env --name=lobe-chat --restart=always lobehub/lobe-chat)"
|
148
133
|
|
149
|
-
# Print the update time and version
|
150
|
-
echo "Update time: $(date)"
|
151
|
-
echo "Version: $(docker inspect lobehub/lobe-chat:latest | grep 'org.opencontainers.image.version' | awk -F'"' '{print $4}')"
|
134
|
+
# Print the update time and version
|
135
|
+
echo "Update time: $(date)"
|
136
|
+
echo "Version: $(docker inspect lobehub/lobe-chat:latest | grep 'org.opencontainers.image.version' | awk -F'"' '{print $4}')"
|
152
137
|
|
153
|
-
# Clean up unused images
|
154
|
-
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
|
155
|
-
echo "Removed old images."
|
156
|
-
```
|
157
|
-
|
158
|
-
<Callout type={'warning'}>
|
159
|
-
This script can be used in Crontab, but please ensure that your Crontab can find the correct
|
160
|
-
Docker command. It is recommended to use absolute paths.
|
161
|
-
</Callout>
|
138
|
+
# Clean up unused images
|
139
|
+
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
|
140
|
+
echo "Removed old images."
|
141
|
+
```
|
162
142
|
|
163
|
-
|
143
|
+
<Callout type={'warning'}>
|
144
|
+
This script can be used in Crontab, but please ensure that your Crontab can find the correct
|
145
|
+
Docker command. It is recommended to use absolute paths.
|
146
|
+
</Callout>
|
164
147
|
|
165
|
-
|
148
|
+
Configure Crontab to execute the script every 5 minutes:
|
166
149
|
|
167
|
-
|
150
|
+
### Configure Crontab to automatically execute scripts
|
168
151
|
|
169
|
-
|
170
|
-
*/5 * * * * /path/to/auto-update-lobe-chat.sh >> /path/to/auto-update-lobe-chat.log 2>&1
|
171
|
-
```
|
152
|
+
The following command configures Crontab to execute scripts every 5 minutes, or as often as you like:
|
172
153
|
|
154
|
+
```bash
|
155
|
+
*/5 * * * * /path/to/auto-update-lobe-chat.sh >> /path/to/auto-update-lobe-chat.log 2>&1
|
156
|
+
```
|
173
157
|
</Steps>
|