Skip to content

A programming framework for agentic AI

Fix QdrantVectorDB to use custom embedding_function when provided, defaulting to FastEmbedEmbeddingFunction() otherwise (#3396)

Eddy Fidel8aea3675589e
diff --git a/autogen/agentchat/contrib/vectordb/qdrant.py b/autogen/agentchat/contrib/vectordb/qdrant.py
index 398734eb0..d9c4ee1d2 100644
--- a/autogen/agentchat/contrib/vectordb/qdrant.py
+++ b/autogen/agentchat/contrib/vectordb/qdrant.py
@@ -93,7 +93,7 @@ class QdrantVectorDB(VectorDB):
kwargs: dict | Additional keyword arguments.
"""
self.client: QdrantClient = client or QdrantClient(location=":memory:")
- self.embedding_function = FastEmbedEmbeddingFunction() or embedding_function
+ self.embedding_function = embedding_function or FastEmbedEmbeddingFunction()
self.collection_options = collection_options
self.content_payload_key = content_payload_key
self.metadata_payload_key = metadata_payload_key