cleaned typing

This commit is contained in:
Yannick Stephan 2025-02-09 11:00:04 +01:00
parent f4287804ce
commit af477e8a26

View File

@ -66,10 +66,10 @@ class BaseVectorStorage(StorageNameSpace):
embedding_func: EmbeddingFunc
meta_fields: set = field(default_factory=set)
async def query(self, query: str, top_k: int) -> list[dict]:
async def query(self, query: str, top_k: int) -> list[dict[str, Any]]:
raise NotImplementedError
async def upsert(self, data: dict[str, dict]):
async def upsert(self, data: dict[str, dict[str, Any]]) -> None:
"""Use 'content' field from value for embedding, use key as id.
If embedding_func is None, use 'embedding' field from value
"""