community: [MongoDBAtlasVectorSearch] Fix KeyError 'embedding' when using MMR #17963
Closed
4 tasks done
Labels
🤖:bug
Related to a bug, vulnerability, unexpected error with an existing feature
🔌: openai
Primarily related to OpenAI integrations
Ɑ: vector store
Related to vector store module
Checked other resources
Example Code
Error Message and Stack Trace (if applicable)
Description
max_marginal_relevance_search
directlydb.as_retriever(search_type="mmr")
self._embedding_key
is deleted fromdocs
in_similarity_search_with_score
langchain/libs/community/langchain_community/vectorstores/mongodb_atlas.py
Line 212 in f6e3aa9
the following method
maximal_marginal_relevance
tries to access the deleted field resulting in an errorlangchain/libs/community/langchain_community/vectorstores/mongodb_atlas.py
Line 325 in f6e3aa9
Expectation
System Info
Python
v3.12.0
requirements.txt
The text was updated successfully, but these errors were encountered: