Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions env.example
Original file line number Diff line number Diff line change
Expand Up @@ -271,26 +271,28 @@ RAG_MAX_CONTEXT_TOKENS=3000

# ====== 存储后端配置 ======
# LightRAG 存储层配置(必须与 docker-compose 中的服务匹配)
# 完整支持列表参考:https://github.com/HKUDS/LightRAG

# --- Vector Storage ---
# 用于存储文档向量和语义检索
# 可选值: QdrantVectorDBStorage, MilvusVectorDBStorage, PGVectorStorage, etc.
# 支持: NanoVectorDBStorage, MilvusVectorDBStorage, PGVectorStorage,
# FaissVectorDBStorage, QdrantVectorDBStorage, MongoVectorDBStorage
VECTOR_STORAGE=QdrantVectorDBStorage

# --- Key-Value Storage ---
# 用于缓存和临时数据存储
# 可选值: RedisKVStorage, JsonKVStorage
# 支持: JsonKVStorage, RedisKVStorage, PGKVStorage, MongoKVStorage
KV_STORAGE=RedisKVStorage

# --- Graph Storage ---
# 用于存储知识图谱(实体和关系)
# 可选值: MemgraphStorage, Neo4JStorage
# 支持: NetworkXStorage, Neo4JStorage, PGGraphStorage, MongoGraphStorage, MemgraphStorage
GRAPH_STORAGE=MemgraphStorage

# --- Document Status Storage ---
# 用于存储文档处理状态和追踪信息
# 推荐值: RedisDocStatusStorage(生产环境), JsonDocStatusStorage(开发环境)
# 其他支持: MongoDocStatusStorage, PGDocStatusStorage
# 支持: JsonDocStatusStorage, RedisDocStatusStorage, PGDocStatusStorage, MongoDocStatusStorage
# 推荐: RedisDocStatusStorage(生产环境), JsonDocStatusStorage(开发环境)
DOC_STATUS_STORAGE=RedisDocStatusStorage

# ====== 可选配置 ======
Expand Down
25 changes: 20 additions & 5 deletions src/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,22 +168,37 @@ class StorageConfig(BaseSettings):
)
kv_storage: str = Field(
default="RedisKVStorage",
description="KV Storage Type",
description=(
"KV Storage Type. "
"Supported: JsonKVStorage, RedisKVStorage, PGKVStorage, MongoKVStorage"
),
alias="KV_STORAGE"
)
vector_storage: str = Field(
default="QdrantStorage",
description="Vector Storage Type",
default="QdrantVectorDBStorage",
description=(
"Vector Storage Type. "
"Supported: NanoVectorDBStorage, MilvusVectorDBStorage, PGVectorStorage, "
"FaissVectorDBStorage, QdrantVectorDBStorage, MongoVectorDBStorage"
),
alias="VECTOR_STORAGE"
)
graph_storage: str = Field(
default="MemgraphStorage",
description="Graph Storage Type",
description=(
"Graph Storage Type. "
"Supported: NetworkXStorage, Neo4JStorage, PGGraphStorage, "
"MongoGraphStorage, MemgraphStorage"
),
alias="GRAPH_STORAGE"
)
doc_status_storage: str = Field(
default="RedisDocStatusStorage",
description="Document Status Storage Type",
description=(
"Document Status Storage Type. "
"Supported: JsonDocStatusStorage, RedisDocStatusStorage, "
"PGDocStatusStorage, MongoDocStatusStorage"
),
alias="DOC_STATUS_STORAGE"
)
redis_uri: str = Field(
Expand Down