From 624554a43a1ab0113f3d79ebcbc9e726faecb339 Mon Sep 17 00:00:00 2001 From: OlajideOgun <37077640+OlajideOgun@users.noreply.github.com> Date: Thu, 4 May 2023 05:14:22 -0400 Subject: [PATCH] DeepLake: Pass in rest of args to self._search_helper (#4080) As of right now when trying to use functions like `max_marginal_relevance_search()` or `max_marginal_relevance_search_by_vector()` the rest of the kwargs are not propagated to `self._search_helper()`. For example a user cannot explicitly state the distance_metric they want to use when calling `max_marginal_relevance_search` --- langchain/vectorstores/deeplake.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/langchain/vectorstores/deeplake.py b/langchain/vectorstores/deeplake.py index fbe2f6f7..dc9a2106 100644 --- a/langchain/vectorstores/deeplake.py +++ b/langchain/vectorstores/deeplake.py @@ -450,6 +450,7 @@ class DeepLake(VectorStore): fetch_k=fetch_k, use_maximal_marginal_relevance=True, lambda_mult=lambda_mult, + **kwargs, ) def max_marginal_relevance_search( @@ -484,6 +485,7 @@ class DeepLake(VectorStore): fetch_k=fetch_k, use_maximal_marginal_relevance=True, lambda_mult=lambda_mult, + **kwargs, ) @classmethod