This commit is contained in:
24
backend/rag_core/config.py
Normal file
24
backend/rag_core/config.py
Normal file
@@ -0,0 +1,24 @@
|
||||
"""
|
||||
RAG Core 配置管理模块
|
||||
集中管理所有环境变量配置项,避免散落在各个文件中
|
||||
"""
|
||||
|
||||
import os
|
||||
|
||||
# ========== 向量数据库配置 ==========
|
||||
QDRANT_URL = os.getenv("QDRANT_URL", "http://127.0.0.1:6333")
|
||||
QDRANT_API_KEY = os.getenv("QDRANT_API_KEY", "")
|
||||
|
||||
# ========== 嵌入服务配置 ==========
|
||||
LLAMACPP_EMBEDDING_URL = os.getenv("LLAMACPP_EMBEDDING_URL", "http://127.0.0.1:8082")
|
||||
LLAMACPP_API_KEY = os.getenv("LLAMACPP_API_KEY", "")
|
||||
|
||||
# ========== 文档存储配置 ==========
|
||||
DB_URI = os.getenv(
|
||||
"DB_URI",
|
||||
"postgresql://postgres:***@ai-postgres:5432/langgraph_db?sslmode=disable"
|
||||
)
|
||||
DOCSTORE_URI = os.getenv("DOCSTORE_URI", DB_URI)
|
||||
|
||||
# ========== 其他配置 ==========
|
||||
# 可以在此添加其他 RAG Core 专用的配置项
|
||||
Reference in New Issue
Block a user