From ff0bd1512eac3c7bcfc4940542d658ec0f60a7f3 Mon Sep 17 00:00:00 2001 From: Yannick Stephan Date: Sat, 8 Feb 2025 22:57:37 +0100 Subject: [PATCH] cleaned base and added missing status --- lightrag/base.py | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/lightrag/base.py b/lightrag/base.py index e71cac3f..661f1a79 100644 --- a/lightrag/base.py +++ b/lightrag/base.py @@ -56,7 +56,7 @@ class QueryParam: @dataclass class StorageNameSpace: namespace: str - global_config: dict + global_config: dict[str, Any] async def index_done_callback(self): """commit the storage operations after indexing""" @@ -92,22 +92,24 @@ class BaseKVStorage(Generic[T], StorageNameSpace): async def get_by_id(self, id: str) -> Union[T, None]: raise NotImplementedError - async def get_by_ids( - self, ids: list[str], fields: Union[set[str], None] = None - ) -> list[Union[T, None]]: + async def get_by_ids(self, ids: list[str]) -> list[Union[T, None]]: raise NotImplementedError async def filter_keys(self, data: list[str]) -> set[str]: """return un-exist keys""" raise NotImplementedError - async def upsert(self, data: dict[str, T]): + async def upsert(self, data: dict[str, T]) -> None: raise NotImplementedError - async def drop(self): + async def drop(self) -> None: raise NotImplementedError - - + + async def get_by_status_and_ids( + self, status: str, ids: list[str] + ) -> list[dict[str, Any]]: + raise NotImplementedError + @dataclass class BaseGraphStorage(StorageNameSpace): embedding_func: EmbeddingFunc = None