We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fdf70ab commit d7a0ddbCopy full SHA for d7a0ddb
tests/test_memory_compaction.py
@@ -30,9 +30,9 @@ def test_generate_memory_hash():
30
session_id="s1",
31
memory_type=MemoryTypeEnum.SEMANTIC,
32
)
33
- # MemoryRecord objects with different IDs will produce different hashes
34
- # since model_dump_json() includes all fields including the ID
35
- assert generate_memory_hash(memory1) != generate_memory_hash(memory2)
+ # MemoryRecord objects with different IDs but same content will produce the same hash
+ # since generate_memory_hash() only uses content fields for deduplication
+ assert generate_memory_hash(memory1) == generate_memory_hash(memory2)
36
memory3 = MemoryRecord(
37
id="test-id-3",
38
text="Paris is the capital of France",
0 commit comments