Skip to content

Commit

Permalink
fix: modified QdrantVectorStoreComponent to use server_kwargs correct…
Browse files Browse the repository at this point in the history
…ly (#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>
  • Loading branch information
Swastik-Swarup-Dash and autofix-ci[bot] authored Oct 3, 2024
1 parent 4519f9f commit 8a84299
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/backend/base/langflow/components/vectorstores/Qdrant.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,12 @@ def build_vector_store(self) -> Qdrant:

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,
}
Expand All @@ -89,7 +90,7 @@ def build_vector_store(self) -> Qdrant:
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

Expand Down

0 comments on commit 8a84299

Please sign in to comment.