Fix Mem0 OSS (#2604)

* Fix Mem0 OSS

* add test

* fix lint and tests

* fix

* add tests

* drop test

* changed to class comparision

* fixed test cases

* Update src/crewai/memory/storage/mem0_storage.py

* Update src/crewai/memory/storage/mem0_storage.py

* fix

* fix lock file

---------

Co-authored-by: Vidit-Ostwal <viditostwal@gmail.com>
This commit is contained in:
Dev Khant
2025-04-28 20:07:31 +05:30
committed by GitHub
parent 566935fb94
commit a86a1213c7
5 changed files with 218 additions and 15 deletions

View File

@@ -1,4 +1,3 @@
from unittest.mock import MagicMock, patch
import pytest
@@ -65,4 +64,4 @@ def test_save_and_search(user_memory):
with patch.object(UserMemory, 'search', return_value=expected_result) as mock_search:
find = UserMemory.search("test value", score_threshold=0.01)[0]
mock_search.assert_called_once_with("test value", score_threshold=0.01)
assert find == expected_result[0]
assert find == expected_result[0]