getzep / graphiti

Build and query dynamic, temporally-aware Knowledge Graphs
https://help.getzep.com/graphiti
Apache License 2.0
1.39k stars 75 forks source link

add_fact endpoint #207

Closed prasmussen15 closed 2 weeks ago

prasmussen15 commented 2 weeks ago

[!IMPORTANT] Adds add_fact method to Graphiti class for adding facts between nodes, with corresponding test and version update.

  • Behavior:
    • Adds add_fact method to Graphiti class in graphiti.py to add facts between nodes.
    • Handles embedding generation for nodes and edges, resolves nodes, deduplicates edges, and adds nodes and edges in bulk.
  • Testing:
    • Adds test for add_fact in test_graphiti_int.py.
    • Test creates EntityNode instances for 'Alice' and 'Bob', and an EntityEdge between them.
    • Verifies addition by performing a search and logging results.
  • Misc:
    • Removes a comment about future optimization in add_episode_endpoint in graphiti.py.
    • Updates version to 0.4.0 in pyproject.toml.
    • Consistently uses timezone.utc for datetime operations across multiple files.

This description was created by Ellipsis for ac9f70acd9c358e818abd29de0fe580788b00700. It will automatically update as commits are pushed.