Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion graphiti_core/graphiti.py
Original file line number Diff line number Diff line change
Expand Up @@ -778,13 +778,17 @@ async def add_episode_endpoint(episode_data: EpisodeData):
communities = []
community_edges = []
if update_communities:
communities, community_edges = await semaphore_gather(
results = await semaphore_gather(
*[
update_community(self.driver, self.llm_client, self.embedder, node)
for node in nodes
],
max_coroutines=self.max_coroutines,
)
# Flatten results from multiple update_community calls
for community_list, edge_list in results:
communities.extend(community_list)
community_edges.extend(edge_list)

end = time()

Expand Down