Update qdrant.py (#2750)

At the moment of upload we should already know the format of data,
therefore we can skip the costly pydantic validation.
fix_agent_callbacks
Andrey Vasnetsov 1 year ago committed by GitHub
parent 74abeb8c53
commit dcb17503f2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -81,7 +81,7 @@ class Qdrant(VectorStore):
ids = [uuid.uuid4().hex for _ in texts]
self.client.upsert(
collection_name=self.collection_name,
points=rest.Batch(
points=rest.Batch.construct(
ids=ids,
vectors=[self.embedding_function(text) for text in texts],
payloads=self._build_payloads(
@ -314,7 +314,7 @@ class Qdrant(VectorStore):
client.upsert(
collection_name=collection_name,
points=rest.Batch(
points=rest.Batch.construct(
ids=[uuid.uuid4().hex for _ in texts],
vectors=embeddings,
payloads=cls._build_payloads(

Loading…
Cancel
Save