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:
M1n9X
2024-08-30 21:59:44 +08:00
committed by GitHub
parent 471689ba20
commit 759f7d99cc
59 changed files with 29316 additions and 411 deletions

View File

@@ -9,11 +9,27 @@ logger = logging.getLogger(__name__)
class TransformerBase:
"""Transformer base class."""
@abstractmethod
def truncate(self):
"""Truncate operation."""
@abstractmethod
def drop(self):
"""Clean operation."""
class EmbedderBase(TransformerBase, ABC):
"""Embedder base class."""
class SummarizerBase(TransformerBase, ABC):
"""Summarizer base class."""
@abstractmethod
async def summarize(self, **args) -> str:
"""Summarize result."""
class ExtractorBase(TransformerBase, ABC):
"""Extractor base class."""