mirror of
https://github.com/open-webui/open-webui.git
synced 2026-09-19 00:03:21 +00:00
update async client
This commit is contained in:
parent
e8b2ccbd4f
commit
9192da00a4
1 changed files with 4 additions and 2 deletions
|
|
@ -100,16 +100,18 @@ class AsyncVectorDBClient:
|
|||
vectors: List[List[Union[float, int]]],
|
||||
filter: Optional[Dict] = None,
|
||||
limit: int = 10,
|
||||
query: Optional[str] = None,
|
||||
) -> Optional[SearchResult]:
|
||||
return await asyncio.to_thread(self._sync.search, collection_name, vectors, filter, limit)
|
||||
return await asyncio.to_thread(self._sync.search, collection_name, vectors, filter, limit, query)
|
||||
|
||||
async def query(
|
||||
self,
|
||||
collection_name: str,
|
||||
filter: Dict,
|
||||
limit: Optional[int] = None,
|
||||
query: Optional[str] = None,
|
||||
) -> Optional[GetResult]:
|
||||
return await asyncio.to_thread(self._sync.query, collection_name, filter, limit)
|
||||
return await asyncio.to_thread(self._sync.query, collection_name, filter, limit, query)
|
||||
|
||||
async def get(self, collection_name: str) -> Optional[GetResult]:
|
||||
return await asyncio.to_thread(self._sync.get, collection_name)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue