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

Co-authored-by: Li Jiang <bnujli@gmail.com>
This commit is contained in:
Eddy Fidel
2024-08-22 05:38:34 -04:00
committed by GitHub
parent 395af4e258
commit 8aea367558

View File

@@ -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