langchain/libs/partners/mongodb/langchain_mongodb
Casey Clements a47f69a120
partners/mongodb : Significant MongoDBVectorSearch ID enhancements (#23535)
## Description

This pull-request improves the treatment of document IDs in
`MongoDBAtlasVectorSearch`.

Class method signatures of add_documents, add_texts, delete, and
from_texts
now include an `ids:Optional[List[str]]` keyword argument permitting the
user
greater control. 
Note that, as before, IDs may also be inferred from
`Document.metadata['_id']`
if present, but this is no longer required,
IDs can also optionally be returned from searches.

This PR closes the following JIRA issues.

* [PYTHON-4446](https://jira.mongodb.org/browse/PYTHON-4446)
MongoDBVectorSearch delete / add_texts function rework
* [PYTHON-4435](https://jira.mongodb.org/browse/PYTHON-4435) Add support
for "Indexing"
* [PYTHON-4534](https://jira.mongodb.org/browse/PYTHON-4534) Ensure
datetimes are json-serializable

---------

Co-authored-by: Erick Friis <erick@langchain.dev>
2024-07-17 13:26:20 -07:00
..
__init__.py
cache.py mongodb[patch]: Added scoring threshold to caching (#19286) 2024-03-19 11:30:02 -07:00
chat_message_histories.py partners: add custom options to MongoDBChatMessageHistory (#22944) 2024-06-24 19:42:56 +00:00
index.py LangChain-MongoDB: [Experimental] Driver-side index creation helper (#19359) 2024-06-26 15:07:28 -04:00
py.typed
utils.py partners/mongodb : Significant MongoDBVectorSearch ID enhancements (#23535) 2024-07-17 13:26:20 -07:00
vectorstores.py partners/mongodb : Significant MongoDBVectorSearch ID enhancements (#23535) 2024-07-17 13:26:20 -07:00