mirror of
https://github.com/lobehub/lobehub.git
synced 2026-09-20 04:56:13 +08:00
191f3fe776
* 📝 docs: fix outdated content across the docs site Audited docs/ against the current codebase and fixed stale content that drifted after major refactors (Clerk/NextAuth → Better Auth, src/server → apps/server, src/{config,envs,locales} → packages/*, model-bank updates). - self-hosting/auth: mark removed NextAuth/Clerk pages with deprecation warnings; fix microsoft/zitadel alias claims and the Logto callback path - environment-variables & advanced: correct wrong defaults (S3_SET_ACL, AI_IMAGE_DEFAULT_IMAGE_NUM, index/proxy URLs), drop non-existent env vars and fictional feature flags, fix OIDC config guidance - development: update refactored paths, Better Auth, .mjs configs, remove the MSW section (msw is not a dependency) - providers & model examples: replace retired model ids with in-bank ones; fix comfyui frontmatter corruption - usage: rename Moderator→Orchestrator, GTD→Task, correct shortcut keys, channel capability tables, Feishu/Lark WebSocket mode - platform/migration: fix dead links, docker service name, npx/npm → bun EN and zh-CN pairs updated together. * 📝 docs: fix Logto callback path and AUTH_SECRET deprecation guidance - Revert Logto/Sealos callback URLs to /api/auth/callback/logto to match the runtime SSO redirectURI override - Narrow legacy auth Callout: AUTH_SECRET remains required for Better Auth; mark NEXT_AUTH_SECRET as deprecated in zh-CN * 📝 docs: refresh agent skills for locales, env, auth, and agentRun paths Align OSS agent guidance with post-refactor layout: - packages/locales/src/default + bun run i18n - packages/env/src for env schemas (@/envs alias) - spa-auth shell + src/routes/auth segments - chat agentRun/transports/hetero instead of aiChat * 📝 docs: document APP_URL as required for Better Auth base URL Self-hosted auth uses appEnv.APP_URL as baseURL, not request-header auto-detection. NEXT_PUBLIC_AUTH_URL remains deprecated. * 📝 docs: note self-host search provider setup for web search Built-in lobe-web-browsing needs no client plugin, but self-hosted servers still require SEARCH_PROVIDERS / SEARXNG_URL (default SearXNG). * 📝 docs: point feature guide welcome UI at AgentHome Opening message/questions on the agent chat page live in src/features/AgentHome, not Onboarding WelcomeMessage.
76 lines
2.7 KiB
Plaintext
76 lines
2.7 KiB
Plaintext
---
|
|
title: LobeHub Knowledge Base / File Upload
|
|
description: >-
|
|
Explore LobeHub's file upload and knowledge base management features with core
|
|
components.
|
|
tags:
|
|
- LobeHub
|
|
- File Upload
|
|
- Knowledge Base
|
|
- PostgreSQL
|
|
- OpenAI Embedding
|
|
---
|
|
|
|
# Knowledge Base / File Upload
|
|
|
|
LobeHub 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.
|
|
|
|
## Core Components
|
|
|
|
### 1. PostgreSQL and PGVector
|
|
|
|
PostgreSQL is a powerful open-source relational database system, and PGVector is its extension for vector operations.
|
|
|
|
- **Purpose**: Store structured data and vector indexes
|
|
- **Deployment Tip**: Use the ParadeDB Docker image for quick deployment with pgvector and pg\_search plugins
|
|
|
|
Deployment script example:
|
|
|
|
```
|
|
docker run -p 5432:5432 -d --name pg -e POSTGRES_PASSWORD=mysecretpassword paradedb/paradedb:latest-pg17
|
|
```
|
|
|
|
- **Note**: Ensure sufficient resources for vector operations
|
|
|
|
### 2. S3-compatible Object Storage
|
|
|
|
S3 (or S3-compatible storage services) is used for storing uploaded files.
|
|
|
|
- **Purpose**: Store raw files
|
|
- **Options**: AWS S3, RustFS, ceph, or other S3-compatible services
|
|
- **Note**: Configure appropriate access permissions and security policies
|
|
|
|
### 3. OpenAI Embedding
|
|
|
|
OpenAI's Embedding service is used to convert text into vector representations.
|
|
|
|
<Callout type={'info'}>
|
|
LobeHub currently uses OpenAI's `text-embedding-3-small` model by default. Ensure your API Key
|
|
has access to this model.
|
|
</Callout>
|
|
|
|
- **Purpose**: Generate vector representations for semantic search
|
|
- **Notes**:
|
|
- Requires valid OpenAI API key
|
|
- Implement proper API call limits and error handling
|
|
|
|
### 4. Unstructured.io (Optional)
|
|
|
|
Unstructured.io is a powerful document processing tool.
|
|
|
|
- **Purpose**: Process complex document formats, extract structured information
|
|
- **Use Case**: Handle non-plain text formats like PDF, Word
|
|
- **Note**: Evaluate processing needs based on document complexity
|
|
|
|
By correctly configuring and integrating these core components, you can build a powerful and efficient knowledge base system for LobeHub. Each component plays a crucial role in the overall architecture, supporting advanced document management and intelligent retrieval functions.
|
|
|
|
### 5. Custom Embedding
|
|
|
|
- **Purpose**: Use different Embedding generate vector representations for semantic search
|
|
- **Options**: support model provider list: zhipu/github/openai/bedrock/ollama
|
|
- **Deployment Tip**: Used to configure the default Embedding model
|
|
|
|
```
|
|
environment: DEFAULT_FILES_CONFIG=embedding_model=openai/text-embedding-3-small
|
|
```
|