Skip to content

v0.3.0

Choose a tag to compare

@nathan-young1 nathan-young1 released this 15 Feb 04:44
· 4 commits to main since this release
92aa038

Added

  • Graph Database:

    • get_all_user_memories is now sorted by most recent first and supports pagination with skip (default: 0) and/or limit (default: 1000) parameters.
    ...
    await memora.graph.get_all_user_memories(ORG_ID, USER_ID, skip=0, limit=30) # get the 30 most recent memories.

Changed

  • ⚠️ Breaking Changes:

    • Graph Database:

      • Migration Required: Users must call graph.migrate_to_schema_for_memora_v0_3_x() to migrate their graph schema to the version that works with Memora v0.3.x. Migration will do the following:

        • Drop :Interaction (updated_at) -> interaction_updated_timestamp_index index because Neo4j does not utilize it for index-backed sorting when retrieving interactions.
        • Link every Memory nodes to their respective Date nodes via :DATE_OBTAINED relationship.
        await graph.migrate_to_schema_for_memora_v0_3_x() # Migrate the graph schema to the version that works with Memora v0.3.x

Improvements

  • Optimized Graph Retrieval:
    • Introduced an efficient method to traverse from Date nodes to Interaction nodes during get_all_user_interactions, enabling sorted retrieval without sorting all user interactions in the graph unless needed.

    • Similarly, get_all_user_memories now uses the new DATE_OBTAINED link created during migration to traverse from Date nodes to Memory nodes, enabling sorted retrieval without sorting all user memories in the graph unless needed.