-
Notifications
You must be signed in to change notification settings - Fork 119
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add default database * update * init tests * update test * bump version * removed unused imports
- Loading branch information
1 parent
8b72250
commit b217d1e
Showing
13 changed files
with
142 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
EPISODIC_EDGE_SAVE = """ | ||
MATCH (episode:Episodic {uuid: $episode_uuid}) | ||
MATCH (node:Entity {uuid: $entity_uuid}) | ||
MERGE (episode)-[r:MENTIONS {uuid: $uuid}]->(node) | ||
SET r = {uuid: $uuid, group_id: $group_id, created_at: $created_at} | ||
RETURN r.uuid AS uuid""" | ||
|
||
ENTITY_EDGE_SAVE = """ | ||
MATCH (source:Entity {uuid: $source_uuid}) | ||
MATCH (target:Entity {uuid: $target_uuid}) | ||
MERGE (source)-[r:RELATES_TO {uuid: $uuid}]->(target) | ||
SET r = {uuid: $uuid, name: $name, group_id: $group_id, fact: $fact, episodes: $episodes, | ||
created_at: $created_at, expired_at: $expired_at, valid_at: $valid_at, invalid_at: $invalid_at} | ||
WITH r CALL db.create.setRelationshipVectorProperty(r, "fact_embedding", $fact_embedding) | ||
RETURN r.uuid AS uuid""" | ||
|
||
COMMUNITY_EDGE_SAVE = """ | ||
MATCH (community:Community {uuid: $community_uuid}) | ||
MATCH (node:Entity | Community {uuid: $entity_uuid}) | ||
MERGE (community)-[r:HAS_MEMBER {uuid: $uuid}]->(node) | ||
SET r = {uuid: $uuid, group_id: $group_id, created_at: $created_at} | ||
RETURN r.uuid AS uuid""" |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
EPISODIC_NODE_SAVE = """ | ||
MERGE (n:Episodic {uuid: $uuid}) | ||
SET n = {uuid: $uuid, name: $name, group_id: $group_id, source_description: $source_description, source: $source, content: $content, | ||
entity_edges: $entity_edges, created_at: $created_at, valid_at: $valid_at} | ||
RETURN n.uuid AS uuid""" | ||
|
||
ENTITY_NODE_SAVE = """ | ||
MERGE (n:Entity {uuid: $uuid}) | ||
SET n = {uuid: $uuid, name: $name, group_id: $group_id, summary: $summary, created_at: $created_at} | ||
WITH n CALL db.create.setNodeVectorProperty(n, "name_embedding", $name_embedding) | ||
RETURN n.uuid AS uuid""" | ||
|
||
COMMUNITY_NODE_SAVE = """ | ||
MERGE (n:Community {uuid: $uuid}) | ||
SET n = {uuid: $uuid, name: $name, group_id: $group_id, summary: $summary, created_at: $created_at} | ||
WITH n CALL db.create.setNodeVectorProperty(n, "name_embedding", $name_embedding) | ||
RETURN n.uuid AS uuid""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.