MCPcopy Create free account
hub / github.com/Enfoirer/Text2GraphRAG / BaseVectorStorage

Class BaseVectorStorage

nano_graphrag/base.py:78–89  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

76
77@dataclass
78class BaseVectorStorage(StorageNameSpace):
79 embedding_func: EmbeddingFunc
80 meta_fields: set = field(default_factory=set)
81
82 async def query(self, query: str, top_k: int) -> list[dict]:
83 raise NotImplementedError
84
85 async def upsert(self, data: dict[str, dict]):
86 """Use 'content' field from value for embedding, use key as id.
87 If embedding_func is None, use 'embedding' field from value
88 """
89 raise NotImplementedError
90
91
92@dataclass

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected