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(
10131013
10141014 vector_search_result = search_result .memories if search_result else []
10151015
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+
10161019 if vector_search_result and len (vector_search_result ) > 0 :
10171020 # Found semantically similar memories
10181021 similar_memory_ids = [memory .id for memory in vector_search_result ]
@@ -1079,8 +1082,6 @@ async def promote_working_memory_to_long_term(
10791082 logger .debug (f"No working memory found for session { session_id } " )
10801083 return 0
10811084
1082- print ("Current working memory: " , current_working_memory )
1083-
10841085 # Find memories with no persisted_at (eligible for promotion)
10851086 unpersisted_memories = [
10861087 memory
You can’t perform that action at this time.
0 commit comments