diff --git a/.env.example b/.env.example index 114f8554..135852a5 100644 --- a/.env.example +++ b/.env.example @@ -75,36 +75,45 @@ LOG_LEVEL=INFO # Ollama Emulating Model Tag # OLLAMA_EMULATING_MODEL_TAG=latest + +# Data storage selection +# LIGHTRAG_KV_STORAGE=PGKVStorage +# LIGHTRAG_VECTOR_STORAGE=PGVectorStorage +# LIGHTRAG_GRAPH_STORAGE=PGGraphStorage +# LIGHTRAG_DOC_STATUS_STORAGE=PGDocStatusStorage + # Oracle Database Configuration ORACLE_DSN=localhost:1521/XEPDB1 ORACLE_USER=your_username -ORACLE_PASSWORD=your_password +ORACLE_PASSWORD='your_password' ORACLE_CONFIG_DIR=/path/to/oracle/config ORACLE_WALLET_LOCATION=/path/to/wallet # 可选 -ORACLE_WALLET_PASSWORD=your_wallet_password # 可选 -ORACLE_WORKSPACE=default # 可选,默认为default +#ORACLE_WALLET_PASSWORD='your_password' # 可选 +#ORACLE_WORKSPACE=default # 可选,默认为default # TiDB Configuration TIDB_HOST=localhost TIDB_PORT=4000 TIDB_USER=your_username -TIDB_PASSWORD=your_password +TIDB_PASSWORD='your_password' TIDB_DATABASE=your_database -TIDB_WORKSPACE=default # 可选,默认为default +#TIDB_WORKSPACE=default # 可选,默认为default # PostgreSQL Configuration POSTGRES_HOST=localhost POSTGRES_PORT=5432 POSTGRES_USER=your_username -POSTGRES_PASSWORD=your_password +POSTGRES_PASSWORD='your_password' POSTGRES_DATABASE=your_database -POSTGRES_WORKSPACE=default # 可选,默认为default +#POSTGRES_WORKSPACE=default # 可选,默认为default +# AGE Configuration +AGE_GRAPH_NAME=dickens # Database Configurations # Neo4j NEO4J_URI=neo4j+s://xxxxxxxx.databases.neo4j.io NEO4J_USERNAME=neo4j -NEO4J_PASSWORD=your-password +NEO4J_PASSWORD='your_password' # MongoDB (可选) MONGODB_URI=mongodb+srv://name:password@your-cluster-address diff --git a/lightrag/api/lightrag_server.py b/lightrag/api/lightrag_server.py index 8d85c292..97b3f5a5 100644 --- a/lightrag/api/lightrag_server.py +++ b/lightrag/api/lightrag_server.py @@ -47,9 +47,9 @@ class RAGStorageConfig: # 默认存储实现 DEFAULT_KV_STORAGE = "JsonKVStorage" - DEFAULT_DOC_STATUS_STORAGE = "JsonDocStatusStorage" - DEFAULT_GRAPH_STORAGE = "NetworkXStorage" DEFAULT_VECTOR_STORAGE = "NanoVectorDBStorage" + DEFAULT_GRAPH_STORAGE = "NetworkXStorage" + DEFAULT_DOC_STATUS_STORAGE = "JsonDocStatusStorage" def __init__(self): # 从环境变量读取配置,如果没有则使用默认值 @@ -219,6 +219,16 @@ def display_splash_screen(args: argparse.Namespace) -> None: ASCIIColors.yellow(f"{args.top_k}") # System Configuration + ASCIIColors.magenta("\n💾 Storage Configuration:") + ASCIIColors.white(" ├─ KV Storage: ", end="") + ASCIIColors.yellow(f"{rag_storage_config.KV_STORAGE}") + ASCIIColors.white(" ├─ Document Status Storage: ", end="") + ASCIIColors.yellow(f"{rag_storage_config.DOC_STATUS_STORAGE}") + ASCIIColors.white(" ├─ Graph Storage: ", end="") + ASCIIColors.yellow(f"{rag_storage_config.GRAPH_STORAGE}") + ASCIIColors.white(" └─ Vector Storage: ", end="") + ASCIIColors.yellow(f"{rag_storage_config.VECTOR_STORAGE}") + ASCIIColors.magenta("\n🛠️ System Configuration:") ASCIIColors.white(" ├─ Ollama Emulating Model: ", end="") ASCIIColors.yellow(f"{ollama_server_infos.LIGHTRAG_MODEL}")