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

Class BaseVectorStorage

LightRAG/lightrag/base.py:49–60  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

47
48@dataclass
49class BaseVectorStorage(StorageNameSpace):
50 embedding_func: EmbeddingFunc
51 meta_fields: set = field(default_factory=set)
52
53 async def query(self, query: str, top_k: int) -> list[dict]:
54 raise NotImplementedError
55
56 async def upsert(self, data: dict[str, dict]):
57 """Use 'content' field from value for embedding, use key as id.
58 If embedding_func is None, use 'embedding' field from value
59 """
60 raise NotImplementedError
61
62
63@dataclass

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected