mirror of
https://github.com/getzep/graphiti.git
synced 2025-06-27 02:00:02 +00:00

* typing.Any and friends
* message
* chore: Import Message model in llm_client
* fix: 💄 mypy errors
* clean up mypy stuff
* mypy
* format
* mypy
* mypy
* mypy
---------
Co-authored-by: paulpaliychuk <pavlo.paliychuk.ca@gmail.com>
Co-authored-by: prestonrasmussen <prasmuss15@gmail.com>
24 lines
465 B
Python
24 lines
465 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.uuid,
|
|
target_node_uuid=node.uuid,
|
|
created_at=episode.created_at,
|
|
)
|
|
)
|
|
|
|
return edges
|