Skip to main contentCrate mem7_dedup
Source - 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.
- 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.