graphiti-core 0.18.9__py3-none-any.whl → 0.19.0rc1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of graphiti-core might be problematic. Click here for more details.
- graphiti_core/driver/driver.py +1 -0
- graphiti_core/driver/neptune_driver.py +299 -0
- graphiti_core/edges.py +35 -7
- graphiti_core/graphiti.py +2 -0
- graphiti_core/llm_client/config.py +1 -1
- graphiti_core/llm_client/openai_base_client.py +12 -2
- graphiti_core/llm_client/openai_client.py +10 -2
- graphiti_core/migrations/__init__.py +0 -0
- graphiti_core/migrations/neo4j_node_group_labels.py +53 -0
- graphiti_core/models/edges/edge_db_queries.py +104 -54
- graphiti_core/models/nodes/node_db_queries.py +165 -65
- graphiti_core/nodes.py +121 -51
- graphiti_core/search/search_utils.py +878 -267
- graphiti_core/utils/bulk_utils.py +6 -3
- graphiti_core/utils/maintenance/edge_operations.py +36 -13
- graphiti_core/utils/maintenance/graph_data_operations.py +59 -7
- {graphiti_core-0.18.9.dist-info → graphiti_core-0.19.0rc1.dist-info}/METADATA +44 -6
- {graphiti_core-0.18.9.dist-info → graphiti_core-0.19.0rc1.dist-info}/RECORD +20 -17
- {graphiti_core-0.18.9.dist-info → graphiti_core-0.19.0rc1.dist-info}/WHEEL +0 -0
- {graphiti_core-0.18.9.dist-info → graphiti_core-0.19.0rc1.dist-info}/licenses/LICENSE +0 -0
|
@@ -43,47 +43,70 @@ EPISODIC_EDGE_RETURN = """
|
|
|
43
43
|
|
|
44
44
|
|
|
45
45
|
def get_entity_edge_save_query(provider: GraphProvider) -> str:
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
46
|
+
match provider:
|
|
47
|
+
case GraphProvider.FALKORDB:
|
|
48
|
+
return """
|
|
49
|
+
MATCH (source:Entity {uuid: $edge_data.source_uuid})
|
|
50
|
+
MATCH (target:Entity {uuid: $edge_data.target_uuid})
|
|
51
|
+
MERGE (source)-[e:RELATES_TO {uuid: $edge_data.uuid}]->(target)
|
|
52
|
+
SET e = $edge_data
|
|
53
|
+
RETURN e.uuid AS uuid
|
|
54
|
+
"""
|
|
55
|
+
case GraphProvider.NEPTUNE:
|
|
56
|
+
return """
|
|
57
|
+
MATCH (source:Entity {uuid: $edge_data.source_uuid})
|
|
58
|
+
MATCH (target:Entity {uuid: $edge_data.target_uuid})
|
|
59
|
+
MERGE (source)-[e:RELATES_TO {uuid: $edge_data.uuid}]->(target)
|
|
60
|
+
SET e = removeKeyFromMap(removeKeyFromMap($edge_data, "fact_embedding"), "episodes")
|
|
61
|
+
SET e.fact_embedding = join([x IN coalesce($edge_data.fact_embedding, []) | toString(x) ], ",")
|
|
62
|
+
SET e.episodes = join($edge_data.episodes, ",")
|
|
63
|
+
RETURN $edge_data.uuid AS uuid
|
|
64
|
+
"""
|
|
65
|
+
case _: # Neo4j
|
|
66
|
+
return """
|
|
67
|
+
MATCH (source:Entity {uuid: $edge_data.source_uuid})
|
|
68
|
+
MATCH (target:Entity {uuid: $edge_data.target_uuid})
|
|
69
|
+
MERGE (source)-[e:RELATES_TO {uuid: $edge_data.uuid}]->(target)
|
|
70
|
+
SET e = $edge_data
|
|
71
|
+
WITH e CALL db.create.setRelationshipVectorProperty(e, "fact_embedding", $edge_data.fact_embedding)
|
|
72
|
+
RETURN e.uuid AS uuid
|
|
73
|
+
"""
|
|
63
74
|
|
|
64
75
|
|
|
65
76
|
def get_entity_edge_save_bulk_query(provider: GraphProvider) -> str:
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
77
|
+
match provider:
|
|
78
|
+
case GraphProvider.FALKORDB:
|
|
79
|
+
return """
|
|
80
|
+
UNWIND $entity_edges AS edge
|
|
81
|
+
MATCH (source:Entity {uuid: edge.source_node_uuid})
|
|
82
|
+
MATCH (target:Entity {uuid: edge.target_node_uuid})
|
|
83
|
+
MERGE (source)-[r:RELATES_TO {uuid: edge.uuid}]->(target)
|
|
84
|
+
SET r = {uuid: edge.uuid, name: edge.name, group_id: edge.group_id, fact: edge.fact, episodes: edge.episodes,
|
|
85
|
+
created_at: edge.created_at, expired_at: edge.expired_at, valid_at: edge.valid_at, invalid_at: edge.invalid_at, fact_embedding: vecf32(edge.fact_embedding)}
|
|
86
|
+
WITH r, edge
|
|
87
|
+
RETURN edge.uuid AS uuid
|
|
88
|
+
"""
|
|
89
|
+
case GraphProvider.NEPTUNE:
|
|
90
|
+
return """
|
|
91
|
+
UNWIND $entity_edges AS edge
|
|
92
|
+
MATCH (source:Entity {uuid: edge.source_node_uuid})
|
|
93
|
+
MATCH (target:Entity {uuid: edge.target_node_uuid})
|
|
94
|
+
MERGE (source)-[r:RELATES_TO {uuid: edge.uuid}]->(target)
|
|
95
|
+
SET r = removeKeyFromMap(removeKeyFromMap(edge, "fact_embedding"), "episodes")
|
|
96
|
+
SET r.fact_embedding = join([x IN coalesce(edge.fact_embedding, []) | toString(x) ], ",")
|
|
97
|
+
SET r.episodes = join(edge.episodes, ",")
|
|
98
|
+
RETURN edge.uuid AS uuid
|
|
99
|
+
"""
|
|
100
|
+
case _:
|
|
101
|
+
return """
|
|
102
|
+
UNWIND $entity_edges AS edge
|
|
103
|
+
MATCH (source:Entity {uuid: edge.source_node_uuid})
|
|
104
|
+
MATCH (target:Entity {uuid: edge.target_node_uuid})
|
|
105
|
+
MERGE (source)-[e:RELATES_TO {uuid: edge.uuid}]->(target)
|
|
106
|
+
SET e = edge
|
|
107
|
+
WITH e, edge CALL db.create.setRelationshipVectorProperty(e, "fact_embedding", edge.fact_embedding)
|
|
108
|
+
RETURN edge.uuid AS uuid
|
|
109
|
+
"""
|
|
87
110
|
|
|
88
111
|
|
|
89
112
|
ENTITY_EDGE_RETURN = """
|
|
@@ -101,24 +124,51 @@ ENTITY_EDGE_RETURN = """
|
|
|
101
124
|
properties(e) AS attributes
|
|
102
125
|
"""
|
|
103
126
|
|
|
127
|
+
ENTITY_EDGE_RETURN_NEPTUNE = """
|
|
128
|
+
e.uuid AS uuid,
|
|
129
|
+
n.uuid AS source_node_uuid,
|
|
130
|
+
m.uuid AS target_node_uuid,
|
|
131
|
+
e.group_id AS group_id,
|
|
132
|
+
e.name AS name,
|
|
133
|
+
e.fact AS fact,
|
|
134
|
+
split(e.episodes, ',') AS episodes,
|
|
135
|
+
e.created_at AS created_at,
|
|
136
|
+
e.expired_at AS expired_at,
|
|
137
|
+
e.valid_at AS valid_at,
|
|
138
|
+
e.invalid_at AS invalid_at,
|
|
139
|
+
properties(e) AS attributes
|
|
140
|
+
"""
|
|
141
|
+
|
|
104
142
|
|
|
105
143
|
def get_community_edge_save_query(provider: GraphProvider) -> str:
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
144
|
+
match provider:
|
|
145
|
+
case GraphProvider.FALKORDB:
|
|
146
|
+
return """
|
|
147
|
+
MATCH (community:Community {uuid: $community_uuid})
|
|
148
|
+
MATCH (node {uuid: $entity_uuid})
|
|
149
|
+
MERGE (community)-[e:HAS_MEMBER {uuid: $uuid}]->(node)
|
|
150
|
+
SET e = {uuid: $uuid, group_id: $group_id, created_at: $created_at}
|
|
151
|
+
RETURN e.uuid AS uuid
|
|
152
|
+
"""
|
|
153
|
+
case GraphProvider.NEPTUNE:
|
|
154
|
+
return """
|
|
155
|
+
MATCH (community:Community {uuid: $community_uuid})
|
|
156
|
+
MATCH (node {uuid: $entity_uuid})
|
|
157
|
+
WHERE node:Entity OR node:Community
|
|
158
|
+
MERGE (community)-[r:HAS_MEMBER {uuid: $uuid}]->(node)
|
|
159
|
+
SET r.uuid= $uuid
|
|
160
|
+
SET r.group_id= $group_id
|
|
161
|
+
SET r.created_at= $created_at
|
|
162
|
+
RETURN r.uuid AS uuid
|
|
163
|
+
"""
|
|
164
|
+
case _: # Neo4j
|
|
165
|
+
return """
|
|
166
|
+
MATCH (community:Community {uuid: $community_uuid})
|
|
167
|
+
MATCH (node:Entity | Community {uuid: $entity_uuid})
|
|
168
|
+
MERGE (community)-[e:HAS_MEMBER {uuid: $uuid}]->(node)
|
|
169
|
+
SET e = {uuid: $uuid, group_id: $group_id, created_at: $created_at}
|
|
170
|
+
RETURN e.uuid AS uuid
|
|
171
|
+
"""
|
|
122
172
|
|
|
123
173
|
|
|
124
174
|
COMMUNITY_EDGE_RETURN = """
|
|
@@ -18,21 +18,62 @@ from typing import Any
|
|
|
18
18
|
|
|
19
19
|
from graphiti_core.driver.driver import GraphProvider
|
|
20
20
|
|
|
21
|
-
EPISODIC_NODE_SAVE = """
|
|
22
|
-
MERGE (n:Episodic {uuid: $uuid})
|
|
23
|
-
SET n = {uuid: $uuid, name: $name, group_id: $group_id, source_description: $source_description, source: $source, content: $content,
|
|
24
|
-
entity_edges: $entity_edges, created_at: $created_at, valid_at: $valid_at}
|
|
25
|
-
RETURN n.uuid AS uuid
|
|
26
|
-
"""
|
|
27
21
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
22
|
+
def get_episode_node_save_query(provider: GraphProvider) -> str:
|
|
23
|
+
match provider:
|
|
24
|
+
case GraphProvider.NEPTUNE:
|
|
25
|
+
return """
|
|
26
|
+
MERGE (n:Episodic {uuid: $uuid})
|
|
27
|
+
SET n = {uuid: $uuid, name: $name, group_id: $group_id, source_description: $source_description, source: $source, content: $content,
|
|
28
|
+
entity_edges: join([x IN coalesce($entity_edges, []) | toString(x) ], '|'), created_at: $created_at, valid_at: $valid_at}
|
|
29
|
+
RETURN n.uuid AS uuid
|
|
30
|
+
"""
|
|
31
|
+
case GraphProvider.FALKORDB:
|
|
32
|
+
return """
|
|
33
|
+
MERGE (n:Episodic {uuid: $uuid})
|
|
34
|
+
SET n = {uuid: $uuid, name: $name, group_id: $group_id, source_description: $source_description, source: $source, content: $content,
|
|
35
|
+
entity_edges: $entity_edges, created_at: $created_at, valid_at: $valid_at}
|
|
36
|
+
RETURN n.uuid AS uuid
|
|
37
|
+
"""
|
|
38
|
+
case _: # Neo4j
|
|
39
|
+
return """
|
|
40
|
+
MERGE (n:Episodic {uuid: $uuid})
|
|
41
|
+
SET n:$($group_label)
|
|
42
|
+
SET n = {uuid: $uuid, name: $name, group_id: $group_id, source_description: $source_description, source: $source, content: $content,
|
|
43
|
+
entity_edges: $entity_edges, created_at: $created_at, valid_at: $valid_at}
|
|
44
|
+
RETURN n.uuid AS uuid
|
|
45
|
+
"""
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
def get_episode_node_save_bulk_query(provider: GraphProvider) -> str:
|
|
49
|
+
match provider:
|
|
50
|
+
case GraphProvider.NEPTUNE:
|
|
51
|
+
return """
|
|
52
|
+
UNWIND $episodes AS episode
|
|
53
|
+
MERGE (n:Episodic {uuid: episode.uuid})
|
|
54
|
+
SET n = {uuid: episode.uuid, name: episode.name, group_id: episode.group_id, source_description: episode.source_description,
|
|
55
|
+
source: episode.source, content: episode.content,
|
|
56
|
+
entity_edges: join([x IN coalesce(episode.entity_edges, []) | toString(x) ], '|'), created_at: episode.created_at, valid_at: episode.valid_at}
|
|
57
|
+
RETURN n.uuid AS uuid
|
|
58
|
+
"""
|
|
59
|
+
case GraphProvider.FALKORDB:
|
|
60
|
+
return """
|
|
61
|
+
UNWIND $episodes AS episode
|
|
62
|
+
MERGE (n:Episodic {uuid: episode.uuid})
|
|
63
|
+
SET n = {uuid: episode.uuid, name: episode.name, group_id: episode.group_id, source_description: episode.source_description, source: episode.source, content: episode.content,
|
|
64
|
+
entity_edges: episode.entity_edges, created_at: episode.created_at, valid_at: episode.valid_at}
|
|
65
|
+
RETURN n.uuid AS uuid
|
|
66
|
+
"""
|
|
67
|
+
case _: # Neo4j
|
|
68
|
+
return """
|
|
69
|
+
UNWIND $episodes AS episode
|
|
70
|
+
MERGE (n:Episodic {uuid: episode.uuid})
|
|
71
|
+
SET n:$(episode.group_label)
|
|
72
|
+
SET n = {uuid: episode.uuid, name: episode.name, group_id: episode.group_id, source_description: episode.source_description, source: episode.source, content: episode.content,
|
|
73
|
+
entity_edges: episode.entity_edges, created_at: episode.created_at, valid_at: episode.valid_at}
|
|
74
|
+
RETURN n.uuid AS uuid
|
|
75
|
+
"""
|
|
76
|
+
|
|
36
77
|
|
|
37
78
|
EPISODIC_NODE_RETURN = """
|
|
38
79
|
e.content AS content,
|
|
@@ -46,54 +87,96 @@ EPISODIC_NODE_RETURN = """
|
|
|
46
87
|
e.entity_edges AS entity_edges
|
|
47
88
|
"""
|
|
48
89
|
|
|
90
|
+
EPISODIC_NODE_RETURN_NEPTUNE = """
|
|
91
|
+
e.content AS content,
|
|
92
|
+
e.created_at AS created_at,
|
|
93
|
+
e.valid_at AS valid_at,
|
|
94
|
+
e.uuid AS uuid,
|
|
95
|
+
e.name AS name,
|
|
96
|
+
e.group_id AS group_id,
|
|
97
|
+
e.source_description AS source_description,
|
|
98
|
+
e.source AS source,
|
|
99
|
+
split(e.entity_edges, ",") AS entity_edges
|
|
100
|
+
"""
|
|
101
|
+
|
|
49
102
|
|
|
50
103
|
def get_entity_node_save_query(provider: GraphProvider, labels: str) -> str:
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
104
|
+
match provider:
|
|
105
|
+
case GraphProvider.FALKORDB:
|
|
106
|
+
return f"""
|
|
107
|
+
MERGE (n:Entity {{uuid: $entity_data.uuid}})
|
|
108
|
+
SET n:{labels}
|
|
109
|
+
SET n = $entity_data
|
|
110
|
+
RETURN n.uuid AS uuid
|
|
111
|
+
"""
|
|
112
|
+
case GraphProvider.NEPTUNE:
|
|
113
|
+
label_subquery = ''
|
|
114
|
+
for label in labels.split(':'):
|
|
115
|
+
label_subquery += f' SET n:{label}\n'
|
|
116
|
+
return f"""
|
|
117
|
+
MERGE (n:Entity {{uuid: $entity_data.uuid}})
|
|
118
|
+
{label_subquery}
|
|
119
|
+
SET n = removeKeyFromMap(removeKeyFromMap($entity_data, "labels"), "name_embedding")
|
|
120
|
+
SET n.name_embedding = join([x IN coalesce($entity_data.name_embedding, []) | toString(x) ], ",")
|
|
121
|
+
RETURN n.uuid AS uuid
|
|
122
|
+
"""
|
|
123
|
+
case _:
|
|
124
|
+
return f"""
|
|
125
|
+
MERGE (n:Entity {{uuid: $entity_data.uuid}})
|
|
126
|
+
SET n:{labels}
|
|
127
|
+
SET n = $entity_data
|
|
128
|
+
WITH n CALL db.create.setNodeVectorProperty(n, "name_embedding", $entity_data.name_embedding)
|
|
129
|
+
RETURN n.uuid AS uuid
|
|
130
|
+
"""
|
|
66
131
|
|
|
67
132
|
|
|
68
133
|
def get_entity_node_save_bulk_query(provider: GraphProvider, nodes: list[dict]) -> str | Any:
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
for
|
|
134
|
+
match provider:
|
|
135
|
+
case GraphProvider.FALKORDB:
|
|
136
|
+
queries = []
|
|
137
|
+
for node in nodes:
|
|
138
|
+
for label in node['labels']:
|
|
139
|
+
queries.append(
|
|
140
|
+
(
|
|
141
|
+
f"""
|
|
142
|
+
UNWIND $nodes AS node
|
|
143
|
+
MERGE (n:Entity {{uuid: node.uuid}})
|
|
144
|
+
SET n:{label}
|
|
145
|
+
SET n = node
|
|
146
|
+
WITH n, node
|
|
147
|
+
SET n.name_embedding = vecf32(node.name_embedding)
|
|
148
|
+
RETURN n.uuid AS uuid
|
|
149
|
+
""",
|
|
150
|
+
{'nodes': [node]},
|
|
151
|
+
)
|
|
152
|
+
)
|
|
153
|
+
return queries
|
|
154
|
+
case GraphProvider.NEPTUNE:
|
|
155
|
+
queries = []
|
|
156
|
+
for node in nodes:
|
|
157
|
+
labels = ''
|
|
158
|
+
for label in node['labels']:
|
|
159
|
+
labels += f' SET n:{label}\n'
|
|
73
160
|
queries.append(
|
|
74
|
-
|
|
75
|
-
f"""
|
|
161
|
+
f"""
|
|
76
162
|
UNWIND $nodes AS node
|
|
77
163
|
MERGE (n:Entity {{uuid: node.uuid}})
|
|
78
|
-
|
|
79
|
-
SET n = node
|
|
80
|
-
|
|
81
|
-
SET n.name_embedding = vecf32(node.name_embedding)
|
|
164
|
+
{labels}
|
|
165
|
+
SET n = removeKeyFromMap(removeKeyFromMap(node, "labels"), "name_embedding")
|
|
166
|
+
SET n.name_embedding = join([x IN coalesce(node.name_embedding, []) | toString(x) ], ",")
|
|
82
167
|
RETURN n.uuid AS uuid
|
|
83
|
-
|
|
84
|
-
{'nodes': [node]},
|
|
85
|
-
)
|
|
168
|
+
"""
|
|
86
169
|
)
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
170
|
+
return queries
|
|
171
|
+
case _: # Neo4j
|
|
172
|
+
return """
|
|
173
|
+
UNWIND $nodes AS node
|
|
174
|
+
MERGE (n:Entity {uuid: node.uuid})
|
|
175
|
+
SET n:$(node.labels)
|
|
176
|
+
SET n = node
|
|
177
|
+
WITH n, node CALL db.create.setNodeVectorProperty(n, "name_embedding", node.name_embedding)
|
|
178
|
+
RETURN n.uuid AS uuid
|
|
179
|
+
"""
|
|
97
180
|
|
|
98
181
|
|
|
99
182
|
ENTITY_NODE_RETURN = """
|
|
@@ -108,19 +191,27 @@ ENTITY_NODE_RETURN = """
|
|
|
108
191
|
|
|
109
192
|
|
|
110
193
|
def get_community_node_save_query(provider: GraphProvider) -> str:
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
194
|
+
match provider:
|
|
195
|
+
case GraphProvider.FALKORDB:
|
|
196
|
+
return """
|
|
197
|
+
MERGE (n:Community {uuid: $uuid})
|
|
198
|
+
SET n = {uuid: $uuid, name: $name, group_id: $group_id, summary: $summary, created_at: $created_at, name_embedding: vecf32($name_embedding)}
|
|
199
|
+
RETURN n.uuid AS uuid
|
|
200
|
+
"""
|
|
201
|
+
case GraphProvider.NEPTUNE:
|
|
202
|
+
return """
|
|
203
|
+
MERGE (n:Community {uuid: $uuid})
|
|
204
|
+
SET n = {uuid: $uuid, name: $name, group_id: $group_id, summary: $summary, created_at: $created_at}
|
|
205
|
+
SET n.name_embedding = join([x IN coalesce($name_embedding, []) | toString(x) ], ",")
|
|
206
|
+
RETURN n.uuid AS uuid
|
|
207
|
+
"""
|
|
208
|
+
case _: # Neo4j
|
|
209
|
+
return """
|
|
210
|
+
MERGE (n:Community {uuid: $uuid})
|
|
211
|
+
SET n = {uuid: $uuid, name: $name, group_id: $group_id, summary: $summary, created_at: $created_at}
|
|
212
|
+
WITH n CALL db.create.setNodeVectorProperty(n, "name_embedding", $name_embedding)
|
|
213
|
+
RETURN n.uuid AS uuid
|
|
214
|
+
"""
|
|
124
215
|
|
|
125
216
|
|
|
126
217
|
COMMUNITY_NODE_RETURN = """
|
|
@@ -131,3 +222,12 @@ COMMUNITY_NODE_RETURN = """
|
|
|
131
222
|
n.summary AS summary,
|
|
132
223
|
n.created_at AS created_at
|
|
133
224
|
"""
|
|
225
|
+
|
|
226
|
+
COMMUNITY_NODE_RETURN_NEPTUNE = """
|
|
227
|
+
n.uuid AS uuid,
|
|
228
|
+
n.name AS name,
|
|
229
|
+
[x IN split(n.name_embedding, ",") | toFloat(x)] AS name_embedding,
|
|
230
|
+
n.group_id AS group_id,
|
|
231
|
+
n.summary AS summary,
|
|
232
|
+
n.created_at AS created_at
|
|
233
|
+
"""
|