mirror of
https://github.com/getzep/graphiti.git
synced 2025-06-27 02:00:02 +00:00
parent
299021173b
commit
a29c3557d3
@ -225,7 +225,8 @@ class EntityNode(Node):
|
||||
MATCH (n:Entity {uuid: $uuid})
|
||||
RETURN
|
||||
n.uuid As uuid,
|
||||
n.name AS name,
|
||||
n.name AS name,
|
||||
n.name_embedding AS name_embedding,
|
||||
n.created_at AS created_at,
|
||||
n.summary AS summary
|
||||
""",
|
||||
@ -239,6 +240,7 @@ class EntityNode(Node):
|
||||
EntityNode(
|
||||
uuid=record['uuid'],
|
||||
name=record['name'],
|
||||
name_embedding=record['name_embedding'],
|
||||
labels=['Entity'],
|
||||
created_at=record['created_at'].to_native(),
|
||||
summary=record['summary'],
|
||||
@ -248,3 +250,6 @@ class EntityNode(Node):
|
||||
logger.info(f'Found Node: {uuid}')
|
||||
|
||||
return nodes[0]
|
||||
|
||||
|
||||
# Node helpers
|
||||
|
@ -23,7 +23,8 @@ async def get_mentioned_nodes(driver: AsyncDriver, episodes: list[EpisodicNode])
|
||||
MATCH (episode:Episodic)-[:MENTIONS]->(n:Entity) WHERE episode.uuid IN $uuids
|
||||
RETURN DISTINCT
|
||||
n.uuid As uuid,
|
||||
n.name AS name,
|
||||
n.name AS name,
|
||||
n.name_embedding AS name_embedding
|
||||
n.created_at AS created_at,
|
||||
n.summary AS summary
|
||||
""",
|
||||
@ -37,6 +38,7 @@ async def get_mentioned_nodes(driver: AsyncDriver, episodes: list[EpisodicNode])
|
||||
EntityNode(
|
||||
uuid=record['uuid'],
|
||||
name=record['name'],
|
||||
name_embedding=record['name_embedding'],
|
||||
labels=['Entity'],
|
||||
created_at=record['created_at'].to_native(),
|
||||
summary=record['summary'],
|
||||
@ -221,7 +223,7 @@ async def entity_similarity_search(
|
||||
RETURN
|
||||
n.uuid As uuid,
|
||||
n.name AS name,
|
||||
n.name_embeddings AS name_embedding,
|
||||
n.name_embedding AS name_embedding,
|
||||
n.created_at AS created_at,
|
||||
n.summary AS summary
|
||||
ORDER BY score DESC
|
||||
@ -257,7 +259,7 @@ async def entity_fulltext_search(
|
||||
RETURN
|
||||
node.uuid AS uuid,
|
||||
node.name AS name,
|
||||
node.name_embeddings AS name_embedding,
|
||||
node.name_embedding AS name_embedding,
|
||||
node.created_at AS created_at,
|
||||
node.summary AS summary
|
||||
ORDER BY score DESC
|
||||
|
@ -1,6 +1,6 @@
|
||||
[tool.poetry]
|
||||
name = "graphiti-core"
|
||||
version = "0.2.1"
|
||||
version = "0.2.2"
|
||||
description = "A temporal graph building library"
|
||||
authors = [
|
||||
"Paul Paliychuk <paul@getzep.com>",
|
||||
|
Loading…
x
Reference in New Issue
Block a user