-
Notifications
You must be signed in to change notification settings - Fork 2.8k
feat(mongodb): add MongoDB LLM cache #8251
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
a0b3193
to
4ec1f1f
Compare
4ec1f1f
to
66b6c00
Compare
The current remaining task is to update docs by moving the in-text code examples to the examples folder, and some minor document adjustments as part of that task. I believe the changes are ready for review. |
Moved sample codes to examples/ |
@YasharF thanks for your contribution 🙏 our team has been focused on working on LangChain v1 and unfortunately couldn't give PRs as much attention as they need. We are in an effort to picking up where we left off. I will take this PR and discuss it with the team. Please stay tuned! |
e2b4789
to
13c49e6
Compare
|
Squashed and rebased. I saw a comment in another one of my PRs, that docs are now in https://github.com/langchain-ai/docs/tree/main/src/oss/javascript . Do you want me to take my doc updates out of this PR and just update the docs there, and have the two repos be out of sync, or should I do something else like update the other doc repo and delete the mongodb doc files from this repo entirely? |
- Add `MongoDBCache` and `MongoDBAtlasSemanticCache` classes to `@langchain/mongodb` for key-value and semantic LLM caching. - Implement integration tests for both cache types. - Update documentation: - Add guide for using MongoDB as a key-value cache. - Add guide for using MongoDB Atlas as semantic cache. - Added additional information and clarification on semantic vs. key-value caching. - Fix test issues - DB usage to consistently use `langchain_test` collection for all MongoDB tests. - Use namespace for db naming for all MongoDB tests - Improve test error msg if there is no docker - Always create a search index for a test vector store since the test may fail under some setups otherwise
13c49e6
to
bac2a64
Compare
Let's land this first and then raise a PR for docs.
All good so far, let me discuss this with the team and get back to you. |
This PR is adds
MongoDBCache
andMongoDBAtlasSemanticCache
functionality for feature parity with Python LangChain.MongoDBCache
andMongoDBAtlasSemanticCache
classes to@langchain/mongodb
for key-value and semantic LLM caching.langchain_test
collection for all MongoDB tests and clean up the DB after running the tests when not using a container.Partial Fix for #7048 (fixes the mongoDB use case)
x: YasharF3
linkedin.com/in/yasharf