fix: await retrieve in qdrant adapter

This commit is contained in:
Boris Arzentar 2024-04-26 18:45:37 +02:00
parent ac1a4cf076
commit 7652f4001d

View file

@ -111,8 +111,8 @@ class QDrantAdapter(VectorDBInterface):
return result
async def retrieve(self, collection_name: str, data_id: str):
client = await self.get_qdrant_client()
results = client.retrieve(collection_name, [data_id], with_payload = True)
client = self.get_qdrant_client()
results = await client.retrieve(collection_name, [data_id], with_payload = True)
await client.close()
return results[0] if len(results) > 0 else None