mirror of
https://github.com/csunny/DB-GPT.git
synced 2025-09-13 13:10:29 +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:
@@ -5,7 +5,7 @@ from concurrent.futures import Executor, ThreadPoolExecutor
|
||||
from typing import List, Optional
|
||||
|
||||
from dbgpt.core import Chunk
|
||||
from dbgpt.rag.index.base import logger
|
||||
from dbgpt.rag.index.base import IndexStoreConfig, logger
|
||||
from dbgpt.storage.full_text.base import FullTextStoreBase
|
||||
from dbgpt.storage.vector_store.elastic_store import ElasticsearchVectorConfig
|
||||
from dbgpt.storage.vector_store.filters import MetadataFilters
|
||||
@@ -35,6 +35,7 @@ class ElasticDocumentStore(FullTextStoreBase):
|
||||
This similarity has the following options:
|
||||
"""
|
||||
super().__init__()
|
||||
self._es_config = es_config
|
||||
from elasticsearch import Elasticsearch
|
||||
|
||||
self._es_config = es_config
|
||||
@@ -94,6 +95,10 @@ class ElasticDocumentStore(FullTextStoreBase):
|
||||
)
|
||||
self._executor = executor or ThreadPoolExecutor()
|
||||
|
||||
def get_config(self) -> IndexStoreConfig:
|
||||
"""Get the es store config."""
|
||||
return self._es_config
|
||||
|
||||
def load_document(self, chunks: List[Chunk]) -> List[str]:
|
||||
"""Load document in elasticsearch.
|
||||
|
||||
|
@@ -2,11 +2,11 @@
|
||||
from typing import List, Optional
|
||||
|
||||
from dbgpt.core import Chunk
|
||||
from dbgpt.rag.index.base import IndexStoreBase
|
||||
from dbgpt.storage.full_text.base import FullTextStoreBase
|
||||
from dbgpt.storage.vector_store.filters import MetadataFilters
|
||||
|
||||
|
||||
class OpenSearch(IndexStoreBase):
|
||||
class OpenSearch(FullTextStoreBase):
|
||||
"""OpenSearch index store."""
|
||||
|
||||
def load_document(self, chunks: List[Chunk]) -> List[str]:
|
||||
|
Reference in New Issue
Block a user