From 8a84299a4777435e8fe541494dd475b826c6c63d Mon Sep 17 00:00:00 2001 From: Swastik-Swarup-Dash <143310346+Swastik-Swarup-Dash@users.noreply.github.com> Date: Thu, 3 Oct 2024 22:55:03 +0530 Subject: [PATCH] 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> --- .../base/langflow/components/vectorstores/Qdrant.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/backend/base/langflow/components/vectorstores/Qdrant.py b/src/backend/base/langflow/components/vectorstores/Qdrant.py index 84e6f941f..0ac4484eb 100644 --- a/src/backend/base/langflow/components/vectorstores/Qdrant.py +++ b/src/backend/base/langflow/components/vectorstores/Qdrant.py @@ -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