DavIvek commited on
Commit
426369f
·
1 Parent(s): d88f749

Add Memgraph into README.md

Browse files
Files changed (1) hide show
  1. README.md +35 -0
README.md CHANGED
@@ -854,6 +854,41 @@ rag = LightRAG(
854
 
855
  </details>
856
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
857
  ## Edit Entities and Relations
858
 
859
  LightRAG now supports comprehensive knowledge graph management capabilities, allowing you to create, edit, and delete entities and relationships within your knowledge graph.
 
854
 
855
  </details>
856
 
857
+ <details>
858
+ <summary> <b>Using Memgraph for Storage</b> </summary>
859
+
860
+ * Memgraph is a high-performance, in-memory graph database compatible with the Neo4j Bolt protocol.
861
+ * You can run Memgraph locally using Docker for easy testing:
862
+ * See: https://memgraph.com/download
863
+
864
+ ```python
865
+ export MEMGRAPH_URI="bolt://localhost:7687"
866
+
867
+ # Setup logger for LightRAG
868
+ setup_logger("lightrag", level="INFO")
869
+
870
+ # When you launch the project, override the default KG: NetworkX
871
+ # by specifying kg="MemgraphStorage".
872
+
873
+ # Note: Default settings use NetworkX
874
+ # Initialize LightRAG with Memgraph implementation.
875
+ async def initialize_rag():
876
+ rag = LightRAG(
877
+ working_dir=WORKING_DIR,
878
+ llm_model_func=gpt_4o_mini_complete, # Use gpt_4o_mini_complete LLM model
879
+ graph_storage="MemgraphStorage", #<-----------override KG default
880
+ )
881
+
882
+ # Initialize database connections
883
+ await rag.initialize_storages()
884
+ # Initialize pipeline status for document processing
885
+ await initialize_pipeline_status()
886
+
887
+ return rag
888
+ ```
889
+
890
+ </details>
891
+
892
  ## Edit Entities and Relations
893
 
894
  LightRAG now supports comprehensive knowledge graph management capabilities, allowing you to create, edit, and delete entities and relationships within your knowledge graph.