Fix the parameter error of 'Qdrant.maximal_marginal_relevance' (#1921)

Hi, first and foremost, I would like to express my gratitude for your
outstanding work; it's truly remarkable!


https://github.com/hwchase17/langchain/blob/master/langchain/vectorstores/qdrant.py#L134
It appears that there might be a minor issue with the `limit` parameter
being passed incorrectly in the `Qdrant.maximal_marginal_relevance`
function. This seems to be a typographical error.

Signed-off-by: weiyang <weiyang.ones@gmail.com>
searx
weiyang 1 year ago committed by GitHub
parent 62e08f80de
commit e50c1ea7fb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -165,7 +165,7 @@ class Qdrant(VectorStore):
query_vector=embedding,
with_payload=True,
with_vectors=True,
limit=k,
limit=fetch_k,
)
embeddings = [result.vector for result in results]
mmr_selected = maximal_marginal_relevance(embedding, embeddings, k=k)

Loading…
Cancel
Save