yangdx
commited on
Commit
·
186aa61
1
Parent(s):
79d1146
Add storage info to splash screen
Browse files- .env.example +17 -8
- lightrag/api/lightrag_server.py +12 -2
.env.example
CHANGED
@@ -75,36 +75,45 @@ LOG_LEVEL=INFO
|
|
75 |
# Ollama Emulating Model Tag
|
76 |
# OLLAMA_EMULATING_MODEL_TAG=latest
|
77 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
78 |
# Oracle Database Configuration
|
79 |
ORACLE_DSN=localhost:1521/XEPDB1
|
80 |
ORACLE_USER=your_username
|
81 |
-
ORACLE_PASSWORD=your_password
|
82 |
ORACLE_CONFIG_DIR=/path/to/oracle/config
|
83 |
ORACLE_WALLET_LOCATION=/path/to/wallet # 可选
|
84 |
-
ORACLE_WALLET_PASSWORD=
|
85 |
-
ORACLE_WORKSPACE=default # 可选,默认为default
|
86 |
|
87 |
# TiDB Configuration
|
88 |
TIDB_HOST=localhost
|
89 |
TIDB_PORT=4000
|
90 |
TIDB_USER=your_username
|
91 |
-
TIDB_PASSWORD=your_password
|
92 |
TIDB_DATABASE=your_database
|
93 |
-
TIDB_WORKSPACE=default # 可选,默认为default
|
94 |
|
95 |
# PostgreSQL Configuration
|
96 |
POSTGRES_HOST=localhost
|
97 |
POSTGRES_PORT=5432
|
98 |
POSTGRES_USER=your_username
|
99 |
-
POSTGRES_PASSWORD=your_password
|
100 |
POSTGRES_DATABASE=your_database
|
101 |
-
POSTGRES_WORKSPACE=default # 可选,默认为default
|
|
|
|
|
102 |
|
103 |
# Database Configurations
|
104 |
# Neo4j
|
105 |
NEO4J_URI=neo4j+s://xxxxxxxx.databases.neo4j.io
|
106 |
NEO4J_USERNAME=neo4j
|
107 |
-
NEO4J_PASSWORD=
|
108 |
|
109 |
# MongoDB (可选)
|
110 |
MONGODB_URI=mongodb+srv://name:password@your-cluster-address
|
|
|
75 |
# Ollama Emulating Model Tag
|
76 |
# OLLAMA_EMULATING_MODEL_TAG=latest
|
77 |
|
78 |
+
|
79 |
+
# Data storage selection
|
80 |
+
# LIGHTRAG_KV_STORAGE=PGKVStorage
|
81 |
+
# LIGHTRAG_VECTOR_STORAGE=PGVectorStorage
|
82 |
+
# LIGHTRAG_GRAPH_STORAGE=PGGraphStorage
|
83 |
+
# LIGHTRAG_DOC_STATUS_STORAGE=PGDocStatusStorage
|
84 |
+
|
85 |
# Oracle Database Configuration
|
86 |
ORACLE_DSN=localhost:1521/XEPDB1
|
87 |
ORACLE_USER=your_username
|
88 |
+
ORACLE_PASSWORD='your_password'
|
89 |
ORACLE_CONFIG_DIR=/path/to/oracle/config
|
90 |
ORACLE_WALLET_LOCATION=/path/to/wallet # 可选
|
91 |
+
#ORACLE_WALLET_PASSWORD='your_password' # 可选
|
92 |
+
#ORACLE_WORKSPACE=default # 可选,默认为default
|
93 |
|
94 |
# TiDB Configuration
|
95 |
TIDB_HOST=localhost
|
96 |
TIDB_PORT=4000
|
97 |
TIDB_USER=your_username
|
98 |
+
TIDB_PASSWORD='your_password'
|
99 |
TIDB_DATABASE=your_database
|
100 |
+
#TIDB_WORKSPACE=default # 可选,默认为default
|
101 |
|
102 |
# PostgreSQL Configuration
|
103 |
POSTGRES_HOST=localhost
|
104 |
POSTGRES_PORT=5432
|
105 |
POSTGRES_USER=your_username
|
106 |
+
POSTGRES_PASSWORD='your_password'
|
107 |
POSTGRES_DATABASE=your_database
|
108 |
+
#POSTGRES_WORKSPACE=default # 可选,默认为default
|
109 |
+
# AGE Configuration
|
110 |
+
AGE_GRAPH_NAME=dickens
|
111 |
|
112 |
# Database Configurations
|
113 |
# Neo4j
|
114 |
NEO4J_URI=neo4j+s://xxxxxxxx.databases.neo4j.io
|
115 |
NEO4J_USERNAME=neo4j
|
116 |
+
NEO4J_PASSWORD='your_password'
|
117 |
|
118 |
# MongoDB (可选)
|
119 |
MONGODB_URI=mongodb+srv://name:password@your-cluster-address
|
lightrag/api/lightrag_server.py
CHANGED
@@ -47,9 +47,9 @@ class RAGStorageConfig:
|
|
47 |
|
48 |
# 默认存储实现
|
49 |
DEFAULT_KV_STORAGE = "JsonKVStorage"
|
50 |
-
DEFAULT_DOC_STATUS_STORAGE = "JsonDocStatusStorage"
|
51 |
-
DEFAULT_GRAPH_STORAGE = "NetworkXStorage"
|
52 |
DEFAULT_VECTOR_STORAGE = "NanoVectorDBStorage"
|
|
|
|
|
53 |
|
54 |
def __init__(self):
|
55 |
# 从环境变量读取配置,如果没有则使用默认值
|
@@ -219,6 +219,16 @@ def display_splash_screen(args: argparse.Namespace) -> None:
|
|
219 |
ASCIIColors.yellow(f"{args.top_k}")
|
220 |
|
221 |
# System Configuration
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
222 |
ASCIIColors.magenta("\n🛠️ System Configuration:")
|
223 |
ASCIIColors.white(" ├─ Ollama Emulating Model: ", end="")
|
224 |
ASCIIColors.yellow(f"{ollama_server_infos.LIGHTRAG_MODEL}")
|
|
|
47 |
|
48 |
# 默认存储实现
|
49 |
DEFAULT_KV_STORAGE = "JsonKVStorage"
|
|
|
|
|
50 |
DEFAULT_VECTOR_STORAGE = "NanoVectorDBStorage"
|
51 |
+
DEFAULT_GRAPH_STORAGE = "NetworkXStorage"
|
52 |
+
DEFAULT_DOC_STATUS_STORAGE = "JsonDocStatusStorage"
|
53 |
|
54 |
def __init__(self):
|
55 |
# 从环境变量读取配置,如果没有则使用默认值
|
|
|
219 |
ASCIIColors.yellow(f"{args.top_k}")
|
220 |
|
221 |
# System Configuration
|
222 |
+
ASCIIColors.magenta("\n💾 Storage Configuration:")
|
223 |
+
ASCIIColors.white(" ├─ KV Storage: ", end="")
|
224 |
+
ASCIIColors.yellow(f"{rag_storage_config.KV_STORAGE}")
|
225 |
+
ASCIIColors.white(" ├─ Document Status Storage: ", end="")
|
226 |
+
ASCIIColors.yellow(f"{rag_storage_config.DOC_STATUS_STORAGE}")
|
227 |
+
ASCIIColors.white(" ├─ Graph Storage: ", end="")
|
228 |
+
ASCIIColors.yellow(f"{rag_storage_config.GRAPH_STORAGE}")
|
229 |
+
ASCIIColors.white(" └─ Vector Storage: ", end="")
|
230 |
+
ASCIIColors.yellow(f"{rag_storage_config.VECTOR_STORAGE}")
|
231 |
+
|
232 |
ASCIIColors.magenta("\n🛠️ System Configuration:")
|
233 |
ASCIIColors.white(" ├─ Ollama Emulating Model: ", end="")
|
234 |
ASCIIColors.yellow(f"{ollama_server_infos.LIGHTRAG_MODEL}")
|