-
Type: Improvement
-
Resolution: Done
-
Priority: Unknown
-
None
-
Affects Version/s: None
-
Component/s: AI/ML
-
None
-
Python Drivers
Context
MongoDBVectorSearch.delete Incorrectly communicates that passing in "ids" will appropriately delete documents when, in actually it deletes values by the text_key. This function needs to be refactored to be clearer and also allow for MongoDB ObjectIds to be deleted as well. We should also document the types we can take for delete.
I.e. [str(ObjectId), ObjectId, \{"$oid": str(ObjectId)}] are all valid types
MongoDBVectorSearch.add_texts Returns a list of ObjectIds. Since the RAG Chain cannot serialize bson ObjectIds, we should return a list of dictionaries specified as `{"$oid": str(ObjectId) }`.
Definition of done
Above functions have been refactored
Pitfalls
The changes to add_texts can be seen as breaking API changes so we may have to do a versioning bump.
- depends on
-
INTPYTHON-325 LangChain: Add support for "Indexing"
- Closed
- related to
-
INTPYTHON-325 LangChain: Add support for "Indexing"
- Closed