mem0 icon indicating copy to clipboard operation
mem0 copied to clipboard

feat: Add support for dbname configuration in Milvus

Open Zynoo71 opened this issue 7 months ago • 1 comments

Description

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

Fixes # (issue)

Type of change

Please delete options that are not relevant.

  • [x] New feature (non-breaking change which adds functionality)
  • [x] Refactor (does not change functionality, e.g. code style improvements, linting)
  • [x] Documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

Please delete options that are not relevant.

  • [x] Test Script (please provide)

Checklist:

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

Zynoo71 avatar May 20 '25 09:05 Zynoo71

`from mem0 import Memory

config = { "vector_store": { "provider": "milvus", "config": { "url": "http://127.0.0.1:19530", "token": "", "collection_name": "mem0_memories", "embedding_model_dims": 1024, "metric_type": "COSINE", "dbname": "mem0_db", }, }, ... }

memory = Memory.from_config(config)

def main(): memory.add( messages="i like apple", user_id="default_user", )

print(memory.search(query="What fruit do I like?", user_id="default_user"))

if name == "main": main() `

Zynoo71 avatar May 20 '25 09:05 Zynoo71

Closing as this is fixed.

parshvadaftari avatar Sep 05 '25 12:09 parshvadaftari