fix: address reviewer bugs — metadata mutation, test args, embedding dict, output_format
1. Fix _create_procedural_memory metadata mutation: use spread operator
instead of in-place dict assignment (sync + async)
2. Fix test_add assertion: remove trailing None arg that doesn't match
_add_to_vector_store(messages, metadata, filters, infer) signature
3. Restore output_format: "v1.1" in TS client search payload as fallback
4. Fix infer=False path: pass {text: embedding} dict to _create_memory
instead of raw embedding list to avoid redundant embed() calls (sync + async)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
163444e33b
commit
66446bd118
+1
-1
@@ -86,7 +86,7 @@ def test_add(memory_instance, version, enable_graph):
|
||||
assert result["results"] == [{"memory": "Test memory", "event": "ADD"}]
|
||||
|
||||
memory_instance._add_to_vector_store.assert_called_once_with(
|
||||
[{"role": "user", "content": "Test message"}], {"user_id": "test_user"}, {"user_id": "test_user"}, True, None
|
||||
[{"role": "user", "content": "Test message"}], {"user_id": "test_user"}, {"user_id": "test_user"}, True
|
||||
)
|
||||
|
||||
# Remove the conditional assertion for _add_to_graph
|
||||
|
||||
Reference in New Issue
Block a user