File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -1013,6 +1013,9 @@ async def deduplicate_by_semantic_search(
1013
1013
1014
1014
vector_search_result = search_result .memories if search_result else []
1015
1015
1016
+ # Filter out the memory itself from the search results (avoid self-duplication)
1017
+ vector_search_result = [m for m in vector_search_result if m .id != memory .id ]
1018
+
1016
1019
if vector_search_result and len (vector_search_result ) > 0 :
1017
1020
# Found semantically similar memories
1018
1021
similar_memory_ids = [memory .id for memory in vector_search_result ]
@@ -1079,8 +1082,6 @@ async def promote_working_memory_to_long_term(
1079
1082
logger .debug (f"No working memory found for session { session_id } " )
1080
1083
return 0
1081
1084
1082
- print ("Current working memory: " , current_working_memory )
1083
-
1084
1085
# Find memories with no persisted_at (eligible for promotion)
1085
1086
unpersisted_memories = [
1086
1087
memory
You can’t perform that action at this time.
0 commit comments