MCPcopy Create free account
hub / github.com/NanGePlus/LightRAGTest / BaseKVStorage

Class BaseKVStorage

LightRAG/lightrag/base.py:64–86  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

62
63@dataclass
64class BaseKVStorage(Generic[T], StorageNameSpace):
65 embedding_func: EmbeddingFunc
66
67 async def all_keys(self) -> list[str]:
68 raise NotImplementedError
69
70 async def get_by_id(self, id: str) -> Union[T, None]:
71 raise NotImplementedError
72
73 async def get_by_ids(
74 self, ids: list[str], fields: Union[set[str], None] = None
75 ) -> list[Union[T, None]]:
76 raise NotImplementedError
77
78 async def filter_keys(self, data: list[str]) -> set[str]:
79 """return un-exist keys"""
80 raise NotImplementedError
81
82 async def upsert(self, data: dict[str, T]):
83 raise NotImplementedError
84
85 async def drop(self):
86 raise NotImplementedError
87
88
89@dataclass

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected