Skip to main content

Crate mem7_dedup

Crate mem7_dedup 

Source

Structs§

IdMapping
Maps integer IDs (used by LLM) back to real UUIDs. The LLM receives integer IDs to avoid hallucinating UUIDs.
MemoryDecision
A single memory decision from the LLM’s response.
MemoryUpdateResponse
Parsed LLM memory-update response.

Functions§

build_existing_memory_dict
Build the “existing memory” dict that gets sent to the LLM for comparison. Maps each existing memory to an integer ID for stability.
deduplicate_memories
Deduplicate a list of existing memories retrieved for multiple facts. Returns a deduplicated list of (uuid, text) pairs.
parse_memory_update_response
Parse the LLM’s JSON response for memory update decisions.