You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
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>
2 months ago
..
__init__.py mongodb[patch]: include LLM caches in toplevel library import (#18601) 7 months ago
cache.py mongodb[patch]: Added scoring threshold to caching (#19286) 6 months ago
chat_message_histories.py partners: add custom options to MongoDBChatMessageHistory (#22944) 3 months ago
index.py LangChain-MongoDB: [Experimental] Driver-side index creation helper (#19359) 3 months ago
py.typed mongodb[minor]: MongoDB Partner Package -- Porting MongoDBAtlasVectorSearch (#17652) 7 months ago
utils.py partners/mongodb : Significant MongoDBVectorSearch ID enhancements (#23535) 2 months ago
vectorstores.py partners/mongodb : Significant MongoDBVectorSearch ID enhancements (#23535) 2 months ago