mem0 icon indicating copy to clipboard operation
mem0 copied to clipboard

+MongoDB Vector Support [WIP]

Open ranfysvalle02 opened this issue 10 months ago • 4 comments

Description

Add MongoDB as a VectorDB.

Fixes # (issue)

https://github.com/mem0ai/mem0/issues/1166

Type of change

Please delete options that are not relevant.

  • [ ] Bug fix (non-breaking change which fixes an issue)
  • [X] New feature (non-breaking change which adds functionality)
  • [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • [ ] Refactor (does not change functionality, e.g. code style improvements, linting)
  • [ ] Documentation update

How Has This Been Tested?

There is working code that highlights how to use, and the output.

Please delete options that are not relevant.

  • [ ] Unit Test
  • [X] Test Script
config = {
    "vector_store": {
        "provider": "mongodb",
        "config": {
            "mdb_uri": "mongodb://0.0.0.0/?directConnection=true",
            "dbname": "DEMO",
            "collection_name": "TEST",
            "get_embedding": get_embedding,
            "embedding_model_dims": len(get_embedding("0")),
        }
    }
}
m = Memory.from_config(config)

Checklist:

  • [ ] My code follows the style guidelines of this project
  • [ ] I have performed a self-review of my own code
  • [ ] I have commented my code, particularly in hard-to-understand areas
  • [ ] I have made corresponding changes to the documentation
  • [ ] My changes generate no new warnings
  • [ ] I have added tests that prove my fix is effective or that my feature works
  • [ ] New and existing unit tests pass locally with my changes
  • [ ] Any dependent changes have been merged and published in downstream modules
  • [ ] I have checked my code and corrected any misspellings

Maintainer Checklist

  • [ ] closes #xxxx (Replace xxxx with the GitHub issue number)
  • [ ] Made sure Checks passed

ranfysvalle02 avatar Jan 26 '25 00:01 ranfysvalle02

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


Fabian seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

CLAassistant avatar Jan 26 '25 00:01 CLAassistant

Hey @ranfysvalle02 Can you please resolve the merge conflicts and sign the CLA?

Dev-Khant avatar Feb 21 '25 07:02 Dev-Khant

@Dev-Khant - Sorry, been away due to a family emergency. Will get this going again!

ranfysvalle02 avatar Mar 07 '25 15:03 ranfysvalle02

Hey @ranfysvalle02 Hope everything is good now, take your time. No rush.

Dev-Khant avatar Mar 08 '25 17:03 Dev-Khant

@Dev-Khant --

https://github.com/mem0ai/mem0/pull/2347 contains the signed CLA and all that good stuff.... Let me know if any issues :)

ranfysvalle02 avatar Mar 10 '25 06:03 ranfysvalle02