fix neo4jstorage bug
Browse files- README.md +1 -1
- lightrag/lightrag.py +3 -1
- test_neo4j.py +1 -1
README.md
CHANGED
@@ -321,7 +321,7 @@ WORKING_DIR = "./local_neo4jWorkDir"
|
|
321 |
rag = LightRAG(
|
322 |
working_dir=WORKING_DIR,
|
323 |
llm_model_func=gpt_4o_mini_complete, # Use gpt_4o_mini_complete LLM model
|
324 |
-
|
325 |
log_level="DEBUG" #<-----------override log_level default
|
326 |
)
|
327 |
```
|
|
|
321 |
rag = LightRAG(
|
322 |
working_dir=WORKING_DIR,
|
323 |
llm_model_func=gpt_4o_mini_complete, # Use gpt_4o_mini_complete LLM model
|
324 |
+
graph_storage="Neo4JStorage", #<-----------override KG default
|
325 |
log_level="DEBUG" #<-----------override log_level default
|
326 |
)
|
327 |
```
|
lightrag/lightrag.py
CHANGED
@@ -186,7 +186,9 @@ class LightRAG:
|
|
186 |
embedding_func=self.embedding_func,
|
187 |
)
|
188 |
self.chunk_entity_relation_graph = self.graph_storage_cls(
|
189 |
-
namespace="chunk_entity_relation",
|
|
|
|
|
190 |
)
|
191 |
####
|
192 |
# add embedding func by walter over
|
|
|
186 |
embedding_func=self.embedding_func,
|
187 |
)
|
188 |
self.chunk_entity_relation_graph = self.graph_storage_cls(
|
189 |
+
namespace="chunk_entity_relation",
|
190 |
+
global_config=asdict(self),
|
191 |
+
embedding_func=self.embedding_func,
|
192 |
)
|
193 |
####
|
194 |
# add embedding func by walter over
|
test_neo4j.py
CHANGED
@@ -17,7 +17,7 @@ if not os.path.exists(WORKING_DIR):
|
|
17 |
rag = LightRAG(
|
18 |
working_dir=WORKING_DIR,
|
19 |
llm_model_func=gpt_4o_mini_complete, # Use gpt_4o_mini_complete LLM model
|
20 |
-
|
21 |
log_level="INFO",
|
22 |
# llm_model_func=gpt_4o_complete # Optionally, use a stronger model
|
23 |
)
|
|
|
17 |
rag = LightRAG(
|
18 |
working_dir=WORKING_DIR,
|
19 |
llm_model_func=gpt_4o_mini_complete, # Use gpt_4o_mini_complete LLM model
|
20 |
+
graph_storage="Neo4JStorage",
|
21 |
log_level="INFO",
|
22 |
# llm_model_func=gpt_4o_complete # Optionally, use a stronger model
|
23 |
)
|