Refactor before imporve knowledge base.

This commit is contained in:
Liu Zhicong
2023-10-18 11:19:11 -07:00
parent 760087d945
commit b74b86b4d4
19 changed files with 683 additions and 445 deletions
+4
View File
@@ -6,6 +6,8 @@ from .vector import ChromaVectorStore, VectorBase
import logging
# KnowledgeStore class, which aggregates ChunkStore, ChunkTracker, and ObjectStore, and is a global singleton that makes it easy to use these three built-in store examples
class KnowledgeStore:
_instance = None
@@ -41,6 +43,8 @@ class KnowledgeStore:
self.chunk_list_writer = ChunkListWriter(self.chunk_store, self.chunk_tracker)
self.chunk_reader = ChunkReader(self.chunk_store, self.chunk_tracker)
self.vector_store = {}
def get_relation_store(self) -> ObjectRelationStore:
return self.relation_store