发布

  • Add NotImplementedError fallback for GraphOperationsInterface methods (#1154)

    frostbyte_neo 发布于 2026-01-16 14:58:19 +00:00

    • Add NotImplementedError fallback for GraphOperationsInterface methods

    Allow GraphOperationsInterface to be used for selective method overriding
    by catching NotImplementedError and falling back to default behavior.

    This change wraps all GraphOperationsInterface calls in try/except blocks
    so that implementations can raise NotImplementedError for methods they
    don't need to customize, allowing the built-in default behavior to execute.

    Updated methods in nodes.py:

    • Node: delete, delete_by_group_id, delete_by_uuids
    • EpisodicNode: save, get_by_uuid, get_by_uuids, get_by_group_ids
    • EntityNode: load_name_embedding, save, get_by_uuid, get_by_uuids, get_by_group_ids
    • CommunityNode: save, get_by_uuid, get_by_uuids, get_by_group_ids
    • SagaNode: save, delete, get_by_uuid, get_by_uuids, get_by_group_ids

    Updated methods in edges.py:

    • Edge: delete, delete_by_uuids
    • EpisodicEdge: save, get_by_uuid, get_by_uuids, get_by_group_ids
    • EntityEdge: load_fact_embedding, save, get_by_uuid, get_by_uuids, get_by_group_ids
    • CommunityEdge: save, get_by_uuid, get_by_uuids, get_by_group_ids
    • HasEpisodeEdge: save, delete, get_by_uuid, get_by_uuids, get_by_group_ids
    • NextEpisodeEdge: save, delete, get_by_uuid, get_by_uuids, get_by_group_ids

    Co-Authored-By: Claude Opus 4.5 noreply@anthropic.com

    • Add missing GraphOperationsInterface method stubs

    Add method stubs for all node and edge CRUD operations that were missing
    from the interface:

    Node methods:

    • node_get_by_uuid, node_get_by_uuids, node_get_by_group_ids
    • episodic_node_get_by_uuid, episodic_node_get_by_uuids, episodic_node_get_by_group_ids
    • community_node_save, community_node_delete, community_node_save_bulk
    • community_node_delete_by_group_id, community_node_delete_by_uuids
    • community_node_get_by_uuid, community_node_get_by_uuids, community_node_get_by_group_ids
    • saga_node_save, saga_node_delete, saga_node_save_bulk
    • saga_node_delete_by_group_id, saga_node_delete_by_uuids
    • saga_node_get_by_uuid, saga_node_get_by_uuids, saga_node_get_by_group_ids

    Edge methods:

    • edge_get_by_uuid, edge_get_by_uuids, edge_get_by_group_ids
    • episodic_edge_save, episodic_edge_delete, episodic_edge_delete_by_uuids
    • episodic_edge_get_by_uuid, episodic_edge_get_by_uuids, episodic_edge_get_by_group_ids
    • community_edge_save, community_edge_delete, community_edge_delete_by_uuids
    • community_edge_get_by_uuid, community_edge_get_by_uuids, community_edge_get_by_group_ids
    • has_episode_edge_save, has_episode_edge_delete, has_episode_edge_save_bulk
    • has_episode_edge_delete_by_uuids, has_episode_edge_get_by_uuid
    • has_episode_edge_get_by_uuids, has_episode_edge_get_by_group_ids
    • next_episode_edge_save, next_episode_edge_delete, next_episode_edge_save_bulk
    • next_episode_edge_delete_by_uuids, next_episode_edge_get_by_uuid
    • next_episode_edge_get_by_uuids, next_episode_edge_get_by_group_ids

    Co-Authored-By: Claude Opus 4.5 noreply@anthropic.com

    • update

    Co-authored-by: Claude Opus 4.5 noreply@anthropic.com

    下载附件