Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: modified QdrantVectorStoreComponent to use server_kwargs correctly #3751

Merged
merged 3 commits into from
Oct 3, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -67,11 +67,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("Invalid embedding object")

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
Loading