- Add new models for `KnowledgeDocument` and `KnowledgeChunk` to manage document ingestion and chunking. - Implement S3-compatible storage integration for knowledge documents, allowing for file uploads and retrieval. - Introduce API endpoints for managing knowledge bases and documents, including creation, deletion, and searching. - Update frontend components to support knowledge base configuration and document management, improving user interaction. - Enhance backend services for knowledge processing and retrieval, ensuring robust handling of document statuses and errors.
30 lines
1.2 KiB
Plaintext
30 lines
1.2 KiB
Plaintext
# 复制为 .env 并填入真实值。
|
|
# 模型接入配置不再放在 .env;请在 model_resources 中维护 apiUrl/modelId/apiKey 等字段。
|
|
# 开发环境可先执行 `make db-seed`,再到前端「组件 / 模型」里替换真实密钥。
|
|
|
|
# ---- 数据库(Postgres) ----
|
|
# 本地直连;docker compose 里则用 postgres:5432
|
|
DATABASE_URL=postgresql+asyncpg://postgres:postgres@localhost:5432/postgres
|
|
|
|
# ---- 服务监听 & 跨域 ----
|
|
HOST=0.0.0.0
|
|
PORT=8000
|
|
# 前端开发地址,允许跨域(公网部署时加上实际前端 origin)
|
|
CORS_ORIGINS=http://localhost:3000,http://127.0.0.1:3000
|
|
|
|
# ---- RustFS / S3-compatible storage ----
|
|
S3_ENDPOINT_URL=http://localhost:9000
|
|
S3_ACCESS_KEY=rustfsadmin
|
|
S3_SECRET_KEY=rustfsadmin
|
|
S3_BUCKET=ai-video
|
|
S3_REGION=us-east-1
|
|
KNOWLEDGE_MAX_FILE_BYTES=20971520
|
|
KNOWLEDGE_TOP_K=5
|
|
|
|
# ---- WebRTC TURN(公网跨网语音预览;本地开发留空) ----
|
|
# 与 docker compose --profile remote 的 coturn 配套。云安全组需放行 UDP 3478 与 49152-49200。
|
|
# PUBLIC_IP 填云主机公网 IP(compose 里给 coturn --external-ip 用,见项目根 .env)。
|
|
# TURN_URLS=turn:182.92.86.220:3478?transport=udp,turn:182.92.86.220:3478?transport=tcp
|
|
# TURN_SECRET=your-turn-secret
|
|
# TURN_CREDENTIAL_TTL=86400
|