fix: Replacing cosine_similarity and maximal_marginal_relevance local method with the ones in langchain core.#190
Conversation
|
🤖 I detect that the PR title and the commit message differ and there's only one commit. To use the PR title for the commit history, you can use Github's automerge feature with squashing, or use -- conventional-commit-lint bot |
b2ddc3c to
90464c1
Compare
|
Need to run isort linter. First install the test deps: |
1962175 to
06f9946
Compare
| lambda_mult = lambda_mult if lambda_mult else self.lambda_mult | ||
| embedding_list = [json.loads(row[self.embedding_column]) for row in results] | ||
| mmr_selected = maximal_marginal_relevance( | ||
| mmr_selected = utils._maximal_marginal_relevance( |
There was a problem hiding this comment.
Does this help with the lint error?
The upstream function in langchain repo is maximal_marginal_relevance [link]
| mmr_selected = utils._maximal_marginal_relevance( | |
| mmr_selected = utils.maximal_marginal_relevance( |
There was a problem hiding this comment.
I think we also need to bump up the version in requirements.txt file here
to langchain-core==0.2.35.
I'm not sure why the renovate bot didn't automatically update it.
There was a problem hiding this comment.
Might be because our repos are missing the renovate config, like this. Or some other reason.
There was a problem hiding this comment.
@vishwarajanand lets file a bug for fixing that
… methods with the ones in langchain core.
06f9946 to
b3e6ef1
Compare
No description provided.