mirror of
https://github.com/hwchase17/langchain.git
synced 2025-08-08 12:31:49 +00:00
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 <>
This commit is contained in:
parent
fa6826e417
commit
f9ddcb5705
@ -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…
Reference in New Issue
Block a user