mirror of
https://github.com/csunny/DB-GPT.git
synced 2025-09-09 04:49:26 +00:00
✨ feat(GraphRAG): enhance GraphRAG by graph community summary (#1801)
Co-authored-by: Florian <fanzhidongyzby@163.com> Co-authored-by: KingSkyLi <15566300566@163.com> Co-authored-by: aries_ckt <916701291@qq.com> Co-authored-by: Fangyin Cheng <staneyffer@gmail.com> Co-authored-by: yvonneyx <zhuyuxin0627@gmail.com>
This commit is contained in:
@@ -54,6 +54,10 @@ class IndexStoreBase(ABC):
|
||||
"""Init index store."""
|
||||
self._executor = executor or ThreadPoolExecutor()
|
||||
|
||||
@abstractmethod
|
||||
def get_config(self) -> IndexStoreConfig:
|
||||
"""Get the index store config."""
|
||||
|
||||
@abstractmethod
|
||||
def load_document(self, chunks: List[Chunk]) -> List[str]:
|
||||
"""Load document in index database.
|
||||
@@ -104,6 +108,10 @@ class IndexStoreBase(ABC):
|
||||
ids(str): The vector ids to delete, separated by comma.
|
||||
"""
|
||||
|
||||
@abstractmethod
|
||||
def truncate(self) -> List[str]:
|
||||
"""Truncate data by name."""
|
||||
|
||||
@abstractmethod
|
||||
def delete_vector_name(self, index_name: str):
|
||||
"""Delete index by name.
|
||||
@@ -188,7 +196,7 @@ class IndexStoreBase(ABC):
|
||||
Return:
|
||||
List[Chunk]: The similar documents.
|
||||
"""
|
||||
return self.similar_search_with_scores(text, topk, 1.0, filters)
|
||||
return self.similar_search_with_scores(text, topk, 0.0, filters)
|
||||
|
||||
async def asimilar_search_with_scores(
|
||||
self,
|
||||
|
Reference in New Issue
Block a user