ArnoChen commited on
Commit
316c28a
·
1 Parent(s): 8facc80
examples/lightrag_ollama_neo4j_milvus_mongo_demo.py CHANGED
@@ -44,7 +44,7 @@ rag = LightRAG(
44
  ),
45
  kv_storage="MongoKVStorage",
46
  graph_storage="Neo4JStorage",
47
- vector_storage="MilvusVectorDBStorge",
48
  )
49
 
50
  file = "./book.txt"
 
44
  ),
45
  kv_storage="MongoKVStorage",
46
  graph_storage="Neo4JStorage",
47
+ vector_storage="MilvusVectorDBStorage",
48
  )
49
 
50
  file = "./book.txt"
examples/lightrag_openai_neo4j_milvus_redis_demo.py CHANGED
@@ -58,7 +58,7 @@ rag = LightRAG(
58
  chunk_overlap_token_size=256,
59
  kv_storage="RedisKVStorage",
60
  graph_storage="Neo4JStorage",
61
- vector_storage="MilvusVectorDBStorge",
62
  doc_status_storage="RedisKVStorage",
63
  )
64
 
 
58
  chunk_overlap_token_size=256,
59
  kv_storage="RedisKVStorage",
60
  graph_storage="Neo4JStorage",
61
+ vector_storage="MilvusVectorDBStorage",
62
  doc_status_storage="RedisKVStorage",
63
  )
64
 
lightrag/api/lightrag_server.py CHANGED
@@ -111,7 +111,7 @@ if milvus_uri:
111
  os.environ["MILVUS_USER"] = milvus_user
112
  os.environ["MILVUS_PASSWORD"] = milvus_password
113
  os.environ["MILVUS_DB_NAME"] = milvus_db_name
114
- rag_storage_config.VECTOR_STORAGE = "MilvusVectorDBStorge"
115
 
116
  # Qdrant config
117
  qdrant_uri = config.get("qdrant", "uri", fallback=None)
 
111
  os.environ["MILVUS_USER"] = milvus_user
112
  os.environ["MILVUS_PASSWORD"] = milvus_password
113
  os.environ["MILVUS_DB_NAME"] = milvus_db_name
114
+ rag_storage_config.VECTOR_STORAGE = "MilvusVectorDBStorage"
115
 
116
  # Qdrant config
117
  qdrant_uri = config.get("qdrant", "uri", fallback=None)
lightrag/kg/milvus_impl.py CHANGED
@@ -14,7 +14,7 @@ from pymilvus import MilvusClient
14
 
15
 
16
  @dataclass
17
- class MilvusVectorDBStorge(BaseVectorStorage):
18
  @staticmethod
19
  def create_collection_if_not_exist(
20
  client: MilvusClient, collection_name: str, **kwargs
@@ -37,7 +37,7 @@ class MilvusVectorDBStorge(BaseVectorStorage):
37
  db_name=os.environ.get("MILVUS_DB_NAME", ""),
38
  )
39
  self._max_batch_size = self.global_config["embedding_batch_num"]
40
- MilvusVectorDBStorge.create_collection_if_not_exist(
41
  self._client,
42
  self.namespace,
43
  dimension=self.embedding_func.embedding_dim,
 
14
 
15
 
16
  @dataclass
17
+ class MilvusVectorDBStorage(BaseVectorStorage):
18
  @staticmethod
19
  def create_collection_if_not_exist(
20
  client: MilvusClient, collection_name: str, **kwargs
 
37
  db_name=os.environ.get("MILVUS_DB_NAME", ""),
38
  )
39
  self._max_batch_size = self.global_config["embedding_batch_num"]
40
+ MilvusVectorDBStorage.create_collection_if_not_exist(
41
  self._client,
42
  self.namespace,
43
  dimension=self.embedding_func.embedding_dim,
lightrag/lightrag.py CHANGED
@@ -44,7 +44,7 @@ STORAGES = {
44
  "OracleKVStorage": ".kg.oracle_impl",
45
  "OracleGraphStorage": ".kg.oracle_impl",
46
  "OracleVectorDBStorage": ".kg.oracle_impl",
47
- "MilvusVectorDBStorge": ".kg.milvus_impl",
48
  "MongoKVStorage": ".kg.mongo_impl",
49
  "MongoDocStatusStorage": ".kg.mongo_impl",
50
  "MongoGraphStorage": ".kg.mongo_impl",
 
44
  "OracleKVStorage": ".kg.oracle_impl",
45
  "OracleGraphStorage": ".kg.oracle_impl",
46
  "OracleVectorDBStorage": ".kg.oracle_impl",
47
+ "MilvusVectorDBStorage": ".kg.milvus_impl",
48
  "MongoKVStorage": ".kg.mongo_impl",
49
  "MongoDocStatusStorage": ".kg.mongo_impl",
50
  "MongoGraphStorage": ".kg.mongo_impl",