mirror of
https://github.com/getzep/graphiti.git
synced 2025-07-03 07:05:16 +00:00

* Makefile and format * fix podcast stuff * refactor: update import statement for transcript_parser in podcast_runner.py * format and linting * chore: Update import statements and remove unused code in maintenance module
24 lines
533 B
Python
24 lines
533 B
Python
import logging
|
|
|
|
from core.edges import EpisodicEdge
|
|
from core.nodes import EntityNode, EpisodicNode
|
|
|
|
logger = logging.getLogger(__name__)
|
|
|
|
|
|
def build_episodic_edges(
|
|
entity_nodes: list[EntityNode], episode: EpisodicNode
|
|
) -> list[EpisodicEdge]:
|
|
edges: list[EpisodicEdge] = []
|
|
|
|
for node in entity_nodes:
|
|
edges.append(
|
|
EpisodicEdge(
|
|
source_node_uuid=episode,
|
|
target_node_uuid=node,
|
|
created_at=episode.created_at,
|
|
)
|
|
)
|
|
|
|
return edges
|