langchain/libs/community/langchain_community
Jib 72bfc1d3db
mongodb[minor]: MongoDB Partner Package -- Porting MongoDBAtlasVectorSearch (#17652)
This PR migrates the existing MongoDBAtlasVectorSearch abstraction from
the `langchain_community` section to the partners package section of the
codebase.
- [x] Run the partner package script as advised in the partner-packages
documentation.
- [x] Add Unit Tests
- [x] Migrate Integration Tests
- [x] Refactor `MongoDBAtlasVectorStore` (autogenerated) to
`MongoDBAtlasVectorSearch`
- [x] ~Remove~ deprecate the old `langchain_community` VectorStore
references.

## Additional Callouts
- Implemented the `delete` method
- Included any missing async function implementations
  - `amax_marginal_relevance_search_by_vector`
  - `adelete` 
- Added new Unit Tests that test for functionality of
`MongoDBVectorSearch` methods
- Removed [`del
res[self._embedding_key]`](e0c81e1cb0/libs/community/langchain_community/vectorstores/mongodb_atlas.py (L218))
in `_similarity_search_with_score` function as it would make the
`maximal_marginal_relevance` function fail otherwise. The `Document`
needs to store the embedding key in metadata to work.

Checklist:

- [x] PR title: Please title your PR "package: description", where
"package" is whichever of langchain, community, core, experimental, etc.
is being modified. Use "docs: ..." for purely docs changes, "templates:
..." for template changes, "infra: ..." for CI changes.
  - Example: "community: add foobar LLM"
- [x] PR message
- [x] Pass lint and test: Run `make format`, `make lint` and `make test`
from the root of the package(s) you've modified to check that you're
passing lint and testing. See contribution guidelines for more
information on how to write/run tests, lint, etc:
https://python.langchain.com/docs/contributing/
- [x] Add tests and docs: If you're adding a new integration, please
include
1. Existing tests supplied in docs/docs do not change. Updated
docstrings for new functions like `delete`
2. an example notebook showing its use. It lives in
`docs/docs/integrations` directory. (This already exists)

If no one reviews your PR within a few days, please @-mention one of
baskaryan, efriis, eyurtsev, hwchase17.

---------

Co-authored-by: Steven Silvester <steven.silvester@ieee.org>
Co-authored-by: Erick Friis <erick@langchain.dev>
2024-02-29 23:09:48 +00:00
..
adapters docs: added community modules descriptions (#17827) 2024-02-21 16:18:36 -08:00
agent_toolkits community: Add PolygonFinancials Tool (#18324) 2024-02-29 10:56:05 -08:00
callbacks community[minor] : adds callback handler for Fiddler AI (#17708) 2024-02-25 18:17:03 -08:00
chat_loaders
chat_message_histories astradb: Add AstraDBChatMessageHistory to langchain-astradb package (#17732) 2024-02-25 18:14:49 -08:00
chat_models ollama[patch]: delete suffix slash to avoid redirect (#18260) 2024-02-28 16:44:48 -05:00
docstore
document_compressors community[feat]: Adds LLMLingua as a document compressor (#17711) 2024-02-27 19:23:56 -08:00
document_loaders community[minor]: Add SQLDatabaseLoader document loader (#18281) 2024-02-28 21:02:28 +00:00
document_transformers
embeddings community: Add Laser Embedding Integration (#18111) 2024-02-26 12:16:37 -08:00
example_selectors docs: added community modules descriptions (#17827) 2024-02-21 16:18:36 -08:00
graphs community[patch]: Fix GraphSparqlQAChain so that it works with Ontotext GraphDB (#15009) 2024-02-25 19:05:21 -08:00
indexes community: Add document manager and mongo document manager (#17320) 2024-02-23 21:32:52 -05:00
llms community[patch]: Invoke callback prior to yielding token (#18288) 2024-02-28 21:40:53 +00:00
output_parsers
retrievers community[patch]: Fixing embedchain document mapping (#18255) 2024-02-29 14:54:37 -08:00
storage docs: Add docstring to AstraDBStore (#17793) 2024-02-21 16:41:47 -08:00
tools community: Add PolygonFinancials Tool (#18324) 2024-02-29 10:56:05 -08:00
utilities community: Add PolygonFinancials Tool (#18324) 2024-02-29 10:56:05 -08:00
utils
vectorstores mongodb[minor]: MongoDB Partner Package -- Porting MongoDBAtlasVectorSearch (#17652) 2024-02-29 23:09:48 +00:00
__init__.py
cache.py community[patch]: Graceful handling of redis errors in RedisCache and AsyncRedisCache (#17171) 2024-02-21 12:15:19 -05:00
py.typed