Changed the default value in Mem0 config (#3216)
Some checks failed
Notify Downstream / notify-downstream (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled

* Changed the default value in Mem0 config

* Added regression test for this

* Fixed Linting issues
This commit is contained in:
Vidit Ostwal
2025-07-24 22:50:18 +05:30
committed by GitHub
parent d3b45d197c
commit 864e9bfb76
3 changed files with 21 additions and 4 deletions

View File

@@ -270,3 +270,20 @@ def test_search_method_with_memory_client(mem0_storage_with_memory_client_using_
assert len(results) == 2
assert results[0]["content"] == "Result 1"
def test_mem0_storage_default_infer_value(mock_mem0_memory_client):
"""Test that Mem0Storage sets infer=True by default for short_term memory."""
with patch.object(MemoryClient, "__new__", return_value=mock_mem0_memory_client):
crew = MockCrew(
memory_config={
"provider": "mem0",
"config": {
"user_id": "test_user",
"api_key": "ABCDEFGH"
},
}
)
mem0_storage = Mem0Storage(type="short_term", crew=crew)
assert mem0_storage.infer is True