fix: modified QdrantVectorStoreComponent to use server_kwargs correctly (#3751)

* resolveQdrant Vector Store doesnt' use the advanced fields when ingesting documents #3749

* resolveQdrant Vector Store doesnt' use the advanced fields when ingesting documents #3749

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This commit is contained in:
Swastik-Swarup-Dash 2024-10-03 22:55:03 +05:30 committed by GitHub
commit 8a84299a47
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -66,11 +66,12 @@ class QdrantVectorStoreComponent(LCVectorStoreComponent):
server_kwargs = {
"host": self.host if self.host else None,
"port": int(self.port), # Garantir que port seja um inteiro
"grpc_port": int(self.grpc_port), # Garantir que grpc_port seja um inteiro
"port": int(self.port), # Ensure port is an integer
"grpc_port": int(self.grpc_port), # Ensure grpc_port is an integer
"api_key": self.api_key,
"prefix": self.prefix,
"timeout": int(self.timeout) if self.timeout else None, # Garantir que timeout seja um inteiro
# Ensure timeout is an integer
"timeout": int(self.timeout) if self.timeout else None,
"path": self.path if self.path else None,
"url": self.url if self.url else None,
}
@ -89,7 +90,7 @@ class QdrantVectorStoreComponent(LCVectorStoreComponent):
raise ValueError(msg)
if documents:
qdrant = Qdrant.from_documents(documents, embedding=self.embedding, **qdrant_kwargs)
qdrant = Qdrant.from_documents(documents, embedding=self.embedding, **qdrant_kwargs, **server_kwargs)
else:
from qdrant_client import QdrantClient