From 4bd706fed149fe70db879830820a5b0a3eb2b144 Mon Sep 17 00:00:00 2001 From: Eddy Fidel Date: Wed, 21 Aug 2024 09:40:51 -0400 Subject: [PATCH] Fix QdrantVectorDB to use custom embedding_function when provided, defaulting to FastEmbedEmbeddingFunction() otherwise --- autogen/agentchat/contrib/vectordb/qdrant.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autogen/agentchat/contrib/vectordb/qdrant.py b/autogen/agentchat/contrib/vectordb/qdrant.py index 398734eb033..d9c4ee1d2e5 100644 --- a/autogen/agentchat/contrib/vectordb/qdrant.py +++ b/autogen/agentchat/contrib/vectordb/qdrant.py @@ -93,7 +93,7 @@ def __init__( 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