feat(rag): Implement auto-indexing and status indicators
This commit is contained in:
@@ -80,6 +80,15 @@ class RAGEngine:
|
||||
else:
|
||||
raise ValueError(f"Unknown vector store provider: {vs_config.provider}")
|
||||
|
||||
def is_empty(self) -> bool:
|
||||
if not self.config.enabled:
|
||||
return True
|
||||
if self.config.vector_store.provider == 'mock' or self.collection == "mock":
|
||||
return True
|
||||
if self.collection is None:
|
||||
return True
|
||||
return self.collection.count() == 0
|
||||
|
||||
def add_documents(self, ids: List[str], texts: List[str], metadatas: Optional[List[Dict[str, Any]]] = None):
|
||||
if not self.config.enabled or self.collection == "mock":
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user