@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
@@ -1,3 +1,16 @@
|
|
1
|
+
---
|
2
|
+
title: LobeChat Knowledge Base / File Upload
|
3
|
+
description: >-
|
4
|
+
Explore LobeChat's file upload and knowledge base management features with
|
5
|
+
core components.
|
6
|
+
tags:
|
7
|
+
- LobeChat
|
8
|
+
- File Upload
|
9
|
+
- Knowledge Base
|
10
|
+
- PostgreSQL
|
11
|
+
- OpenAI Embedding
|
12
|
+
---
|
13
|
+
|
1
14
|
# Knowledge Base / File Upload
|
2
15
|
|
3
16
|
LobeChat supports file upload and knowledge base management. This feature relies on the following core technical components. Understanding these components will help you successfully deploy and maintain the knowledge base system.
|
@@ -32,9 +45,7 @@ S3 (or S3-compatible storage services) is used for storing uploaded files.
|
|
32
45
|
OpenAI's Embedding service is used to convert text into vector representations.
|
33
46
|
|
34
47
|
<Callout type={'info'}>
|
35
|
-
|
36
|
-
LobeChat currently uses OpenAI's `text-embedding-3-small` model by default. Ensure your API Key has access to this model.
|
37
|
-
|
48
|
+
LobeChat currently uses OpenAI's `text-embedding-3-small` model by default. Ensure your API Key has access to this model.
|
38
49
|
</Callout>
|
39
50
|
|
40
51
|
- **Purpose**: Generate vector representations for semantic search
|
@@ -1,3 +1,14 @@
|
|
1
|
+
---
|
2
|
+
title: LobeChat 知识库 / 文件上传
|
3
|
+
description: 了解 LobeChat 的文件上传和知识库管理核心组件,助力成功部署。
|
4
|
+
tags:
|
5
|
+
- LobeChat
|
6
|
+
- 文件上传
|
7
|
+
- 知识库管理
|
8
|
+
- PostgreSQL
|
9
|
+
- OpenAI
|
10
|
+
---
|
11
|
+
|
1
12
|
# 知识库 / 文件上传
|
2
13
|
|
3
14
|
LobeChat 支持文件上传 / 知识库管理。该功能依赖于以下核心技术组件,了解这些组件将有助于你成功部署和维护知识库系统。
|
@@ -32,9 +43,7 @@ S3(或兼容 S3 协议的存储服务)用于存储上传的文件。
|
|
32
43
|
OpenAI 的嵌入(Embedding)服务用于将文本转化为向量表示。
|
33
44
|
|
34
45
|
<Callout type={'info'}>
|
35
|
-
|
36
|
-
LobeChat 当前默认使用 OpenAI `text-embedding-3-small` 模型,请确保你的 API Key 可以访问该模型。
|
37
|
-
|
46
|
+
LobeChat 当前默认使用 OpenAI `text-embedding-3-small` 模型,请确保你的 API Key 可以访问该模型。
|
38
47
|
</Callout>
|
39
48
|
|
40
49
|
- **用途**:生成文本的向量表示,用于语义搜索
|
@@ -42,8 +42,8 @@ id=displayName<maxToken:vision:fc:file>
|
|
42
42
|
|
43
43
|
目前支持的扩展能力有:
|
44
44
|
|
45
|
-
| --- | 描述
|
46
|
-
| -------- |
|
47
|
-
| `fc` | 函数调用(function calling)
|
48
|
-
| `vision` | 视觉识别
|
49
|
-
| `file` | 文件上传(比较hack,不建议日常使用)
|
45
|
+
| --- | 描述 |
|
46
|
+
| -------- | ---------------------- |
|
47
|
+
| `fc` | 函数调用(function calling) |
|
48
|
+
| `vision` | 视觉识别 |
|
49
|
+
| `file` | 文件上传(比较 hack,不建议日常使用) |
|
@@ -14,118 +14,89 @@ We need to configure an S3 storage service in the server-side database to store
|
|
14
14
|
## Configuration Steps
|
15
15
|
|
16
16
|
<Steps>
|
17
|
+
### Configure and Obtain S3 Bucket
|
17
18
|
|
18
|
-
|
19
|
+
You need to go to your S3 service provider (such as AWS S3, Cloudflare R2, etc.) and create a new storage bucket. The following is an example using Cloudflare R2 to guide you through the creation process.
|
19
20
|
|
20
|
-
|
21
|
+
The interface of Cloudflare R2 is shown below:
|
21
22
|
|
22
|
-
|
23
|
+
<Image alt={'Cloudflare R2 Storage Interface'} src={'https://github.com/lobehub/lobe-chat/assets/28616219/41f7f677-0153-4a96-b849-5ac9b7ebefee'} />
|
23
24
|
|
24
|
-
|
25
|
-
alt={'Cloudflare R2 Storage Interface'}
|
26
|
-
src={'https://github.com/lobehub/lobe-chat/assets/28616219/41f7f677-0153-4a96-b849-5ac9b7ebefee'}
|
27
|
-
/>
|
25
|
+
When creating the bucket, specify its name and then click create.
|
28
26
|
|
29
|
-
|
27
|
+
<Image alt={'Create Bucket in R2'} src={'https://github.com/lobehub/lobe-chat/assets/28616219/9c0d184c-3169-40fa-9115-011cfffb9ca7'} />
|
30
28
|
|
31
|
-
|
32
|
-
alt={'Create Bucket in R2'}
|
33
|
-
src={'https://github.com/lobehub/lobe-chat/assets/28616219/9c0d184c-3169-40fa-9115-011cfffb9ca7'}
|
34
|
-
/>
|
29
|
+
### Obtain Environment Variables for the Bucket
|
35
30
|
|
36
|
-
|
31
|
+
In the settings of the R2 storage bucket, you can view the bucket configuration information:
|
37
32
|
|
38
|
-
|
33
|
+
<Image alt={'View relevant information of the bucket'} src={'https://github.com/lobehub/lobe-chat/assets/28616219/2ceb210c-eca0-4439-ba27-8734d4ebb3ee'} />
|
39
34
|
|
40
|
-
|
41
|
-
alt={'View relevant information of the bucket'}
|
42
|
-
src={'https://github.com/lobehub/lobe-chat/assets/28616219/2ceb210c-eca0-4439-ba27-8734d4ebb3ee'}
|
43
|
-
/>
|
35
|
+
The corresponding environment variables are:
|
44
36
|
|
45
|
-
|
37
|
+
```shell
|
38
|
+
# Bucket name
|
39
|
+
S3_BUCKET=lobechat
|
40
|
+
# Request endpoint of the bucket (note that the path in this link includes the bucket name, which must be removed, or use the link provided on the page for applying S3 API token)
|
41
|
+
S3_ENDPOINT=https://0b33a03b5c993fd2f453379dc36558e5.r2.cloudflarestorage.com
|
42
|
+
# Access domain of the bucket
|
43
|
+
S3_PUBLIC_DOMAIN=https://s3-for-lobechat.your-domain.com
|
44
|
+
```
|
46
45
|
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
# Request endpoint of the bucket (note that the path in this link includes the bucket name, which must be removed, or use the link provided on the page for applying S3 API token)
|
51
|
-
S3_ENDPOINT=https://0b33a03b5c993fd2f453379dc36558e5.r2.cloudflarestorage.com
|
52
|
-
# Access domain of the bucket
|
53
|
-
S3_PUBLIC_DOMAIN=https://s3-for-lobechat.your-domain.com
|
54
|
-
```
|
46
|
+
<Callout type={'warning'}>
|
47
|
+
`S3_ENDPOINT` must have its path removed, otherwise uploaded files cannot be accessed.
|
48
|
+
</Callout>
|
55
49
|
|
56
|
-
|
57
|
-
`S3_ENDPOINT` must have its path removed, otherwise uploaded files cannot be accessed.
|
58
|
-
</Callout>
|
50
|
+
### Obtain S3 Key Environment Variables
|
59
51
|
|
60
|
-
|
52
|
+
You need to obtain the access key for S3 so that the LobeChat server has permission to access the S3 storage service. In R2, you can configure the access key in the account details:
|
61
53
|
|
62
|
-
|
54
|
+
<Image alt={'View access key of the bucket'} src={'https://github.com/lobehub/lobe-chat/assets/28616219/be0c95c0-6693-44ee-a490-7e8dfaa8b34d'} />
|
63
55
|
|
64
|
-
|
65
|
-
alt={'View access key of the bucket'}
|
66
|
-
src={'https://github.com/lobehub/lobe-chat/assets/28616219/be0c95c0-6693-44ee-a490-7e8dfaa8b34d'}
|
67
|
-
/>
|
56
|
+
Click the button in the upper right corner to create an API token and enter the create API Token page.
|
68
57
|
|
69
|
-
|
58
|
+
<Image alt={'Create corresponding API token'} src={'https://github.com/lobehub/lobe-chat/assets/28616219/7b0ea46c-5157-40a8-888f-f47664a4884f'} />
|
70
59
|
|
71
|
-
|
72
|
-
alt={'Create corresponding API token'}
|
73
|
-
src={'https://github.com/lobehub/lobe-chat/assets/28616219/7b0ea46c-5157-40a8-888f-f47664a4884f'}
|
74
|
-
/>
|
60
|
+
Since our server-side database needs to read and write to the S3 storage service, the permission needs to be set to `Object Read and Write`, then click create.
|
75
61
|
|
76
|
-
|
62
|
+
<Image alt={'Configure API token permissions'} src={'https://github.com/lobehub/lobe-chat/assets/28616219/d6f5a918-7b50-4d6e-83a6-3894ab930ddf'} />
|
77
63
|
|
78
|
-
|
79
|
-
alt={'Configure API token permissions'}
|
80
|
-
src={'https://github.com/lobehub/lobe-chat/assets/28616219/d6f5a918-7b50-4d6e-83a6-3894ab930ddf'}
|
81
|
-
/>
|
64
|
+
After creation, you can see the corresponding S3 API token.
|
82
65
|
|
83
|
-
|
66
|
+
<Image alt={'Copy API token'} src={'https://github.com/lobehub/lobe-chat/assets/28616219/763b18f9-2b5f-44bb-a479-9b56d46f7397'} />
|
84
67
|
|
85
|
-
|
86
|
-
alt={'Copy API token'}
|
87
|
-
src={'https://github.com/lobehub/lobe-chat/assets/28616219/763b18f9-2b5f-44bb-a479-9b56d46f7397'}
|
88
|
-
/>
|
68
|
+
The corresponding environment variables are:
|
89
69
|
|
90
|
-
|
70
|
+
```shell
|
71
|
+
S3_ACCESS_KEY_ID=9998d6757e276cf9f1edbd325b7083a6
|
72
|
+
S3_SECRET_ACCESS_KEY=55af75d8eb6b99f189f6a35f855336ea62cd9c4751a5cf4337c53c1d3f497ac2
|
73
|
+
```
|
91
74
|
|
92
|
-
|
93
|
-
S3_ACCESS_KEY_ID=9998d6757e276cf9f1edbd325b7083a6
|
94
|
-
S3_SECRET_ACCESS_KEY=55af75d8eb6b99f189f6a35f855336ea62cd9c4751a5cf4337c53c1d3f497ac2
|
95
|
-
```
|
75
|
+
### Configure Cross-Origin Resource Sharing (CORS)
|
96
76
|
|
97
|
-
|
77
|
+
Since S3 storage services are often on a separate domain, cross-origin access needs to be configured.
|
98
78
|
|
99
|
-
|
79
|
+
In R2, you can find the CORS configuration in the settings of the storage bucket:
|
100
80
|
|
101
|
-
|
81
|
+
<Image alt={'Cross-Origin Settings in Cloudflare R2'} src={'https://github.com/lobehub/lobe-chat/assets/28616219/ab008be7-26b2-4b78-8bd9-24301bf34d23'} />
|
102
82
|
|
103
|
-
|
104
|
-
alt={'Cross-Origin Settings in Cloudflare R2'}
|
105
|
-
src={'https://github.com/lobehub/lobe-chat/assets/28616219/ab008be7-26b2-4b78-8bd9-24301bf34d23'}
|
106
|
-
/>
|
83
|
+
Add a CORS rule to allow requests from your domain (in the previous section, it is `https://your-project.vercel.app`):
|
107
84
|
|
108
|
-
|
85
|
+
<Image alt={'Configure allowed site domain'} src={'https://github.com/lobehub/lobe-chat/assets/28616219/dfcc2cb3-2958-4498-a8a4-51bec584fe7d'} />
|
109
86
|
|
110
|
-
|
111
|
-
alt={'Configure allowed site domain'}
|
112
|
-
src={'https://github.com/lobehub/lobe-chat/assets/28616219/dfcc2cb3-2958-4498-a8a4-51bec584fe7d'}
|
113
|
-
/>
|
114
|
-
|
115
|
-
Example configuration is as follows:
|
116
|
-
|
117
|
-
```json
|
118
|
-
[
|
119
|
-
{
|
120
|
-
"AllowedOrigins": ["https://your-project.vercel.app"],
|
121
|
-
"AllowedMethods": ["GET", "PUT", "HEAD", "POST", "DELETE"],
|
122
|
-
"AllowedHeaders": ["*"]
|
123
|
-
}
|
124
|
-
]
|
125
|
-
```
|
87
|
+
Example configuration is as follows:
|
126
88
|
|
127
|
-
|
89
|
+
```json
|
90
|
+
[
|
91
|
+
{
|
92
|
+
"AllowedOrigins": ["https://your-project.vercel.app"],
|
93
|
+
"AllowedMethods": ["GET", "PUT", "HEAD", "POST", "DELETE"],
|
94
|
+
"AllowedHeaders": ["*"]
|
95
|
+
}
|
96
|
+
]
|
97
|
+
```
|
128
98
|
|
99
|
+
After configuration, click save.
|
129
100
|
</Steps>
|
130
101
|
|
131
102
|
## Overview of Environment Variables
|
@@ -15,121 +15,92 @@ tags:
|
|
15
15
|
## 配置步骤
|
16
16
|
|
17
17
|
<Steps>
|
18
|
+
### 配置并获取 S3 存储桶
|
18
19
|
|
19
|
-
|
20
|
+
你需要前往你的 S3 服务提供商(如 AWS S3、Cloudflare R2 等)并创建一个新的存储桶(Bucket)。接下来以 Cloudflare R2 为例,介绍创建流程。
|
20
21
|
|
21
|
-
|
22
|
+
下图是 Cloudflare R2 的界面:
|
22
23
|
|
23
|
-
|
24
|
+
<Image alt={'Cloudflare R2 存储界面'} src={'https://github.com/lobehub/lobe-chat/assets/28616219/41f7f677-0153-4a96-b849-5ac9b7ebefee'} />
|
24
25
|
|
25
|
-
|
26
|
-
alt={'Cloudflare R2 存储界面'}
|
27
|
-
src={'https://github.com/lobehub/lobe-chat/assets/28616219/41f7f677-0153-4a96-b849-5ac9b7ebefee'}
|
28
|
-
/>
|
26
|
+
创建存储桶时将指定其名称,然后点击创建。
|
29
27
|
|
30
|
-
|
28
|
+
<Image alt={'R2 创建存储桶'} src={'https://github.com/lobehub/lobe-chat/assets/28616219/9c0d184c-3169-40fa-9115-011cfffb9ca7'} />
|
31
29
|
|
32
|
-
|
33
|
-
alt={'R2 创建存储桶'}
|
34
|
-
src={'https://github.com/lobehub/lobe-chat/assets/28616219/9c0d184c-3169-40fa-9115-011cfffb9ca7'}
|
35
|
-
/>
|
30
|
+
### 获取存储桶相关环境变量
|
36
31
|
|
37
|
-
|
32
|
+
在 R2 存储桶的设置中,可以看到桶配置的信息:
|
38
33
|
|
39
|
-
|
34
|
+
<Image alt={'查看存储桶的相关信息'} src={'https://github.com/lobehub/lobe-chat/assets/28616219/2ceb210c-eca0-4439-ba27-8734d4ebb3ee'} />
|
40
35
|
|
41
|
-
|
42
|
-
alt={'查看存储桶的相关信息'}
|
43
|
-
src={'https://github.com/lobehub/lobe-chat/assets/28616219/2ceb210c-eca0-4439-ba27-8734d4ebb3ee'}
|
44
|
-
/>
|
36
|
+
其对应的环境变量为:
|
45
37
|
|
46
|
-
|
38
|
+
```shell
|
39
|
+
# 存储桶的名称
|
40
|
+
S3_BUCKET=lobechat
|
41
|
+
# 存储桶的请求端点(注意此处链接的路径带存储桶名称,必须删除该路径,或使用申请 S3 API token 页面所提供的链接)
|
42
|
+
S3_ENDPOINT=https://0b33a03b5c993fd2f453379dc36558e5.r2.cloudflarestorage.com
|
43
|
+
# 存储桶对外的访问域名
|
44
|
+
S3_PUBLIC_DOMAIN=https://s3-for-lobechat.your-domain.com
|
45
|
+
```
|
47
46
|
|
48
|
-
|
49
|
-
# 存储桶的名称
|
50
|
-
S3_BUCKET=lobechat
|
51
|
-
# 存储桶的请求端点(注意此处链接的路径带存储桶名称,必须删除该路径,或使用申请 S3 API token 页面所提供的链接)
|
52
|
-
S3_ENDPOINT=https://0b33a03b5c993fd2f453379dc36558e5.r2.cloudflarestorage.com
|
53
|
-
# 存储桶对外的访问域名
|
54
|
-
S3_PUBLIC_DOMAIN=https://s3-for-lobechat.your-domain.com
|
55
|
-
```
|
47
|
+
<Callout type={'warning'}>`S3_ENDPOINT`必须删除其路径,否则会无法访问所上传文件</Callout>
|
56
48
|
|
57
|
-
|
49
|
+
### 获取 S3 密钥环境变量
|
58
50
|
|
59
|
-
|
51
|
+
你需要获取 S3 的访问密钥,以便 LobeChat 的服务端有权限访问 S3 存储服务。在 R2 中,你可以在账户详情中配置访问密钥:
|
60
52
|
|
61
|
-
|
53
|
+
<Image alt={'查看存储桶的访问秘钥'} src={'https://github.com/lobehub/lobe-chat/assets/28616219/be0c95c0-6693-44ee-a490-7e8dfaa8b34d'} />
|
62
54
|
|
63
|
-
|
64
|
-
alt={'查看存储桶的访问秘钥'}
|
65
|
-
src={'https://github.com/lobehub/lobe-chat/assets/28616219/be0c95c0-6693-44ee-a490-7e8dfaa8b34d'}
|
66
|
-
/>
|
55
|
+
点击右上角按钮创建 API token,进入创建 API Token 页面
|
67
56
|
|
68
|
-
|
57
|
+
<Image alt={'创建对应 API token'} src={'https://github.com/lobehub/lobe-chat/assets/28616219/7b0ea46c-5157-40a8-888f-f47664a4884f'} />
|
69
58
|
|
70
|
-
|
71
|
-
alt={'创建对应 API token'}
|
72
|
-
src={'https://github.com/lobehub/lobe-chat/assets/28616219/7b0ea46c-5157-40a8-888f-f47664a4884f'}
|
73
|
-
/>
|
59
|
+
鉴于我们的服务端数据库需要读写 S3 存储服务,因此权限需要选择`对象读与写`,然后点击创建。
|
74
60
|
|
75
|
-
|
61
|
+
<Image alt={'配置 API token 权限'} src={'https://github.com/lobehub/lobe-chat/assets/28616219/d6f5a918-7b50-4d6e-83a6-3894ab930ddf'} />
|
76
62
|
|
77
|
-
|
78
|
-
alt={'配置 API token 权限'}
|
79
|
-
src={'https://github.com/lobehub/lobe-chat/assets/28616219/d6f5a918-7b50-4d6e-83a6-3894ab930ddf'}
|
80
|
-
/>
|
63
|
+
创建完成后,就可以看到对应的 S3 API token
|
81
64
|
|
82
|
-
|
65
|
+
<Image alt={'复制 API token'} src={'https://github.com/lobehub/lobe-chat/assets/28616219/763b18f9-2b5f-44bb-a479-9b56d46f7397'} />
|
83
66
|
|
84
|
-
|
85
|
-
alt={'复制 API token'}
|
86
|
-
src={'https://github.com/lobehub/lobe-chat/assets/28616219/763b18f9-2b5f-44bb-a479-9b56d46f7397'}
|
87
|
-
/>
|
67
|
+
其对应的环境变量为:
|
88
68
|
|
89
|
-
|
69
|
+
```shell
|
70
|
+
S3_ACCESS_KEY_ID=9998d6757e276cf9f1edbd325b7083a6
|
71
|
+
S3_SECRET_ACCESS_KEY=55af75d8eb6b99f189f6a35f855336ea62cd9c4751a5cf4337c53c1d3f497ac2
|
72
|
+
```
|
90
73
|
|
91
|
-
|
92
|
-
S3_ACCESS_KEY_ID=9998d6757e276cf9f1edbd325b7083a6
|
93
|
-
S3_SECRET_ACCESS_KEY=55af75d8eb6b99f189f6a35f855336ea62cd9c4751a5cf4337c53c1d3f497ac2
|
94
|
-
```
|
74
|
+
### 配置跨域
|
95
75
|
|
96
|
-
|
76
|
+
由于 S3 存储服务往往是一个独立的网址,因此需要配置跨域访问。
|
97
77
|
|
98
|
-
|
78
|
+
在 R2 中,你可以在存储桶的设置中找到跨域配置:
|
99
79
|
|
100
|
-
|
80
|
+
<Image alt={'Cloudflare R2 的跨域设置'} src={'https://github.com/lobehub/lobe-chat/assets/28616219/ab008be7-26b2-4b78-8bd9-24301bf34d23'} />
|
101
81
|
|
102
|
-
|
103
|
-
alt={'Cloudflare R2 的跨域设置'}
|
104
|
-
src={'https://github.com/lobehub/lobe-chat/assets/28616219/ab008be7-26b2-4b78-8bd9-24301bf34d23'}
|
105
|
-
/>
|
82
|
+
添加跨域规则,允许你的域名(在上文是 `https://your-project.vercel.app`)来源的请求:
|
106
83
|
|
107
|
-
|
84
|
+
<Image alt={'配置允许你的站点域名'} src={'https://github.com/lobehub/lobe-chat/assets/28616219/dfcc2cb3-2958-4498-a8a4-51bec584fe7d'} />
|
108
85
|
|
109
|
-
|
110
|
-
alt={'配置允许你的站点域名'}
|
111
|
-
src={'https://github.com/lobehub/lobe-chat/assets/28616219/dfcc2cb3-2958-4498-a8a4-51bec584fe7d'}
|
112
|
-
/>
|
113
|
-
|
114
|
-
示例配置如下:
|
115
|
-
|
116
|
-
```json
|
117
|
-
[
|
118
|
-
{
|
119
|
-
"AllowedOrigins": ["https://your-project.vercel.app"],
|
120
|
-
"AllowedMethods": ["GET", "PUT", "HEAD", "POST", "DELETE"],
|
121
|
-
"AllowedHeaders": ["*"]
|
122
|
-
}
|
123
|
-
]
|
124
|
-
```
|
86
|
+
示例配置如下:
|
125
87
|
|
126
|
-
|
88
|
+
```json
|
89
|
+
[
|
90
|
+
{
|
91
|
+
"AllowedOrigins": ["https://your-project.vercel.app"],
|
92
|
+
"AllowedMethods": ["GET", "PUT", "HEAD", "POST", "DELETE"],
|
93
|
+
"AllowedHeaders": ["*"]
|
94
|
+
}
|
95
|
+
]
|
96
|
+
```
|
127
97
|
|
98
|
+
配置后点击保存即可。
|
128
99
|
</Steps>
|
129
100
|
|
130
101
|
## 环境变量一览
|
131
102
|
|
132
|
-
<Callout type={'warning'}>URL的`https://`不可缺失,须保持URL的完整性</Callout>
|
103
|
+
<Callout type={'warning'}>URL 的`https://`不可缺失,须保持 URL 的完整性</Callout>
|
133
104
|
|
134
105
|
```shell
|
135
106
|
# S3 秘钥
|
@@ -19,58 +19,44 @@ We need to configure S3 storage service for file storage in the server-side data
|
|
19
19
|
<Steps>
|
20
20
|
### Configure and Obtain S3 Bucket
|
21
21
|
|
22
|
-
Create a new bucket on [Tencent Cloud COS](https://console.cloud.tencent.com/cos/bucket):
|
22
|
+
Create a new bucket on [Tencent Cloud COS](https://console.cloud.tencent.com/cos/bucket):
|
23
23
|
|
24
|
-
<Image
|
25
|
-
alt={'Tencent Cloud COS Storage Interface'}
|
26
|
-
src={'https://github.com/user-attachments/assets/d3626294-74ba-4944-9a63-052e6cf719ab'}
|
27
|
-
/>
|
24
|
+
<Image alt={'Tencent Cloud COS Storage Interface'} src={'https://github.com/user-attachments/assets/d3626294-74ba-4944-9a63-052e6cf719ab'} />
|
28
25
|
|
29
|
-
Name the bucket (e.g., 'lobe'). Choose 'Public Read, Private Write', select any region, and keep other settings default.
|
26
|
+
Name the bucket (e.g., 'lobe'). Choose 'Public Read, Private Write', select any region, and keep other settings default.
|
30
27
|
|
31
|
-
<Image
|
32
|
-
alt={'COS Create Bucket'}
|
33
|
-
src={'https://github.com/user-attachments/assets/7257eb0e-4e2c-4db2-981d-354598e2c60f'}
|
34
|
-
/>
|
28
|
+
<Image alt={'COS Create Bucket'} src={'https://github.com/user-attachments/assets/7257eb0e-4e2c-4db2-981d-354598e2c60f'} />
|
35
29
|
|
36
|
-
### Get Bucket-related Environment Variables
|
30
|
+
### Get Bucket-related Environment Variables
|
37
31
|
|
38
|
-
View bucket information in COS bucket overview:
|
32
|
+
View bucket information in COS bucket overview:
|
39
33
|
|
40
|
-
<Image
|
41
|
-
alt={'View Bucket Information'}
|
42
|
-
src={'https://github.com/user-attachments/assets/d7d65e32-679d-4e50-a933-28cf5dde1330'}
|
43
|
-
/>
|
34
|
+
<Image alt={'View Bucket Information'} src={'https://github.com/user-attachments/assets/d7d65e32-679d-4e50-a933-28cf5dde1330'} />
|
44
35
|
|
45
|
-
Corresponding environment variables:
|
36
|
+
Corresponding environment variables:
|
46
37
|
|
47
|
-
```shell
|
48
|
-
S3_BUCKET=lobe-130xxxxxx2
|
49
|
-
S3_ENDPOINT=https://cos.ap-chengdu.myqcloud.com
|
50
|
-
S3_REGION=ap-chengdu
|
51
|
-
S3_PUBLIC_DOMAIN=https://lobe-1251234567.cos.ap-chengdu.myqcloud.com
|
52
|
-
```
|
38
|
+
```shell
|
39
|
+
S3_BUCKET=lobe-130xxxxxx2
|
40
|
+
S3_ENDPOINT=https://cos.ap-chengdu.myqcloud.com
|
41
|
+
S3_REGION=ap-chengdu
|
42
|
+
S3_PUBLIC_DOMAIN=https://lobe-1251234567.cos.ap-chengdu.myqcloud.com
|
43
|
+
```
|
53
44
|
|
54
45
|
<Callout type={'warning'}>
|
55
46
|
Note: `S3_ENDPOINT` should be `https://cos.ap-chengdu.myqcloud.com`, not `https://lobe-130xxxxxx2.cos.ap-chengdu.myqcloud.com`
|
56
47
|
|
57
48
|
Include `https://` in the URL
|
49
|
+
</Callout>
|
58
50
|
|
59
|
-
|
51
|
+
### Configure CORS
|
60
52
|
|
61
|
-
|
53
|
+
Add the following in 'Security Management - CORS Settings':
|
62
54
|
|
63
|
-
|
55
|
+
<Image alt={'Configure CORS'} src={'https://github.com/user-attachments/assets/35164b25-c964-42ce-9cb0-32f6ebe1d07c'} />
|
64
56
|
|
65
|
-
|
66
|
-
alt={'Configure CORS'}
|
67
|
-
src={'https://github.com/user-attachments/assets/35164b25-c964-42ce-9cb0-32f6ebe1d07c'}
|
68
|
-
/>
|
69
|
-
|
70
|
-
### Get S3 Keys
|
71
|
-
|
72
|
-
Create a new SecretId and SecretKey at [Tencent Cloud API Key Management](https://console.cloud.tencent.com/cam/capi). Use as `S3_ACCESS_KEY_ID` and `S3_SECRET_ACCESS_KEY`.
|
57
|
+
### Get S3 Keys
|
73
58
|
|
59
|
+
Create a new SecretId and SecretKey at [Tencent Cloud API Key Management](https://console.cloud.tencent.com/cam/capi). Use as `S3_ACCESS_KEY_ID` and `S3_SECRET_ACCESS_KEY`.
|
74
60
|
</Steps>
|
75
61
|
|
76
62
|
### Additional Notes
|
@@ -15,65 +15,50 @@ tags:
|
|
15
15
|
## 配置步骤
|
16
16
|
|
17
17
|
<Steps>
|
18
|
+
### 配置并获取 S3 存储桶
|
18
19
|
|
19
|
-
|
20
|
+
你需要首先前往 [腾讯云 COS](https://console.cloud.tencent.com/cos/bucket) 并创建一个新的存储桶(Bucket):
|
20
21
|
|
21
|
-
|
22
|
+
<Image alt={'腾讯云 COS 存储界面'} src={'https://github.com/user-attachments/assets/d3626294-74ba-4944-9a63-052e6cf719ab'} />
|
22
23
|
|
23
|
-
|
24
|
-
alt={'腾讯云 COS 存储界面'}
|
25
|
-
src={'https://github.com/user-attachments/assets/d3626294-74ba-4944-9a63-052e6cf719ab'}
|
26
|
-
/>
|
24
|
+
创建存储桶时将指定其名称,下文以 `lobe` 为例。选择 `公有读私有写`,地域随意,其余配置一概默认即可,然后点击创建。
|
27
25
|
|
28
|
-
|
26
|
+
<Image alt={'COS 创建存储桶'} src={'https://github.com/user-attachments/assets/7257eb0e-4e2c-4db2-981d-354598e2c60f'} />
|
29
27
|
|
30
|
-
|
31
|
-
alt={'COS 创建存储桶'}
|
32
|
-
src={'https://github.com/user-attachments/assets/7257eb0e-4e2c-4db2-981d-354598e2c60f'}
|
33
|
-
/>
|
28
|
+
### 获取存储桶相关环境变量
|
34
29
|
|
35
|
-
|
30
|
+
在 COS 存储桶的概览设置中,可以看到桶配置的信息:
|
36
31
|
|
37
|
-
|
32
|
+
<Image alt={'查看存储桶的相关信息'} src={'https://github.com/user-attachments/assets/d7d65e32-679d-4e50-a933-28cf5dde1330'} />
|
38
33
|
|
39
|
-
|
40
|
-
alt={'查看存储桶的相关信息'}
|
41
|
-
src={'https://github.com/user-attachments/assets/d7d65e32-679d-4e50-a933-28cf5dde1330'}
|
42
|
-
/>
|
34
|
+
其对应的环境变量为:
|
43
35
|
|
44
|
-
|
36
|
+
```shell
|
37
|
+
# 存储桶的名称
|
38
|
+
S3_BUCKET=lobe-130xxxxxx2
|
39
|
+
# 存储桶的请求端点,注意没有前面的桶名
|
40
|
+
S3_ENDPOINT=https://cos.ap-chengdu.myqcloud.com
|
41
|
+
# 桶的区域
|
42
|
+
S3_REGION=ap-chengdu
|
43
|
+
# 存储桶对外的访问域名
|
44
|
+
S3_PUBLIC_DOMAIN=https://lobe-1251234567.cos.ap-chengdu.myqcloud.com
|
45
|
+
```
|
45
46
|
|
46
|
-
|
47
|
-
|
48
|
-
S3_BUCKET=lobe-130xxxxxx2
|
49
|
-
# 存储桶的请求端点,注意没有前面的桶名
|
50
|
-
S3_ENDPOINT=https://cos.ap-chengdu.myqcloud.com
|
51
|
-
# 桶的区域
|
52
|
-
S3_REGION=ap-chengdu
|
53
|
-
# 存储桶对外的访问域名
|
54
|
-
S3_PUBLIC_DOMAIN=https://lobe-1251234567.cos.ap-chengdu.myqcloud.com
|
55
|
-
```
|
47
|
+
<Callout type={'warning'}>
|
48
|
+
请注意,`S3_ENDPOINT` 的值为 `https://cos.ap-chengdu.myqcloud.com`,而不是 `https://lobe-130xxxxxx2.cos.ap-chengdu.myqcloud.com`
|
56
49
|
|
57
|
-
|
58
|
-
|
50
|
+
且此处 URL 的 `https://` 不可缺失,须保持 URL 的完整性
|
51
|
+
</Callout>
|
59
52
|
|
60
|
-
|
53
|
+
### 配置跨域
|
61
54
|
|
62
|
-
|
55
|
+
在左侧 `安全管理 - 跨域访问 CORS 设置` 中,添加以下配置并保存:
|
63
56
|
|
64
|
-
|
57
|
+
<Image alt={'配置跨域'} src={'https://github.com/user-attachments/assets/35164b25-c964-42ce-9cb0-32f6ebe1d07c'} />
|
65
58
|
|
66
|
-
|
67
|
-
|
68
|
-
<Image
|
69
|
-
alt={'配置跨域'}
|
70
|
-
src={'https://github.com/user-attachments/assets/35164b25-c964-42ce-9cb0-32f6ebe1d07c'}
|
71
|
-
/>
|
72
|
-
|
73
|
-
### 获取 S3 秘钥
|
74
|
-
|
75
|
-
前往 [腾讯云 API 密钥管理](https://console.cloud.tencent.com/cam/capi) 创建一个新的 SecretId 和 SecretKey,填写为 `S3_ACCESS_KEY_ID` 和 `S3_SECRET_ACCESS_KEY` 即可。
|
59
|
+
### 获取 S3 秘钥
|
76
60
|
|
61
|
+
前往 [腾讯云 API 密钥管理](https://console.cloud.tencent.com/cam/capi) 创建一个新的 SecretId 和 SecretKey,填写为 `S3_ACCESS_KEY_ID` 和 `S3_SECRET_ACCESS_KEY` 即可。
|
77
62
|
</Steps>
|
78
63
|
|
79
64
|
### 附加说明
|