From c36652eb755cc1b01ade29fa0d47f60eae7ed51a Mon Sep 17 00:00:00 2001 From: Preston Rasmussen <109292228+prasmussen15@users.noreply.github.com> Date: Mon, 21 Apr 2025 10:52:10 -0400 Subject: [PATCH] remove redundant endpoint (#383) --- graphiti_core/nodes.py | 29 ++--------------------------- 1 file changed, 2 insertions(+), 27 deletions(-) diff --git a/graphiti_core/nodes.py b/graphiti_core/nodes.py index c20fdd5d..9dfea464 100644 --- a/graphiti_core/nodes.py +++ b/graphiti_core/nodes.py @@ -265,31 +265,6 @@ class EpisodicNode(Node): return episodes - @classmethod - async def get_by_entity_node_uuid(cls, driver: AsyncDriver, entity_node_uuid: str): - records, _, _ = await driver.execute_query( - """ - MATCH (e:Episodic)-[r:MENTIONS]->(n:Entity {uuid: $entity_node_uuid}) - RETURN DISTINCT - e.content AS content, - e.created_at AS created_at, - e.valid_at AS valid_at, - e.uuid AS uuid, - e.name AS name, - e.group_id AS group_id, - e.source_description AS source_description, - e.source AS source, - e.entity_edges AS entity_edges - """, - entity_node_uuid=entity_node_uuid, - database_=DEFAULT_DATABASE, - routing_='r', - ) - - episodes = [get_episodic_node_from_record(record) for record in records] - - return episodes - class EntityNode(Node): name_embedding: list[float] | None = Field(default=None, description='embedding of the name') @@ -337,8 +312,8 @@ class EntityNode(Node): async def get_by_uuid(cls, driver: AsyncDriver, uuid: str): query = ( """ - MATCH (n:Entity {uuid: $uuid}) - """ + MATCH (n:Entity {uuid: $uuid}) + """ + ENTITY_NODE_RETURN ) records, _, _ = await driver.execute_query(