From 3b187168701c451c34ed2631a1bc6658d08a1797 Mon Sep 17 00:00:00 2001 From: prestonrasmussen Date: Wed, 18 Sep 2024 14:26:25 -0400 Subject: [PATCH] defaults episodes to empty list --- examples/podcast/podcast_runner.py | 1 + graphiti_core/edges.py | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/examples/podcast/podcast_runner.py b/examples/podcast/podcast_runner.py index ad49a71..22e1d90 100644 --- a/examples/podcast/podcast_runner.py +++ b/examples/podcast/podcast_runner.py @@ -83,6 +83,7 @@ async def main(use_bulk: bool = True): reference_time=message.actual_timestamp, source_description='Podcast Transcript', group_id='1', + update_communities=True, ) return diff --git a/graphiti_core/edges.py b/graphiti_core/edges.py index 13450cc..a535d94 100644 --- a/graphiti_core/edges.py +++ b/graphiti_core/edges.py @@ -137,8 +137,8 @@ class EntityEdge(Edge): name: str = Field(description='name of the edge, relation name') fact: str = Field(description='fact representing the edge and nodes that it connects') fact_embedding: list[float] | None = Field(default=None, description='embedding of the fact') - episodes: list[str] | None = Field( - default=None, + episodes: list[str] = Field( + default=[], description='list of episode ids that reference these entity edges', ) expired_at: datetime | None = Field(