mirror of
https://github.com/csunny/DB-GPT.git
synced 2025-09-15 14:11:14 +00:00
feat(rag): Support rag retriever evaluation (#1291)
This commit is contained in:
@@ -154,7 +154,7 @@ class Knowledge(ABC):
|
||||
self._type = knowledge_type
|
||||
self._data_loader = data_loader
|
||||
|
||||
def load(self):
|
||||
def load(self) -> List[Document]:
|
||||
"""Load knowledge from data_loader."""
|
||||
documents = self._load()
|
||||
return self._postprocess(documents)
|
||||
@@ -174,7 +174,7 @@ class Knowledge(ABC):
|
||||
return docs
|
||||
|
||||
@abstractmethod
|
||||
def _load(self):
|
||||
def _load(self) -> List[Document]:
|
||||
"""Preprocess knowledge from data_loader."""
|
||||
|
||||
@classmethod
|
||||
|
Reference in New Issue
Block a user