Hotfix: distance_func and collection_name must not be in kwargs (#735)

If `distance_func` and `collection_name` are in `kwargs` they are sent
to the `QdrantClient` which results in an error being raised.

Co-authored-by: Francisco Ingham <>
pull/744/head
Francisco Ingham 2 years ago committed by GitHub
parent fa6826e417
commit f9ddcb5705
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -182,10 +182,11 @@ class Qdrant(VectorStore):
qdrant_host = get_from_dict_or_env(kwargs, "host", "QDRANT_HOST")
kwargs.pop("host")
collection_name = kwargs.pop("collection_name", uuid.uuid4().hex)
distance_func = kwargs.pop("distance_func", "Cosine").upper()
client = qdrant_client.QdrantClient(host=qdrant_host, **kwargs)
collection_name = kwargs.get("collection_name", uuid.uuid4().hex)
distance_func = kwargs.pop("distance_func", "Cosine").upper()
client.recreate_collection(
collection_name=collection_name,
vectors_config=rest.VectorParams(

Loading…
Cancel
Save