graphiti-core 0.21.0rc2__py3-none-any.whl → 0.21.0rc3__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.

@@ -136,12 +136,14 @@ async def add_nodes_and_edges_bulk_tx(
136
136
  entity_data: dict[str, Any] = {
137
137
  'uuid': node.uuid,
138
138
  'name': node.name,
139
- 'name_embedding': node.name_embedding,
140
139
  'group_id': node.group_id,
141
140
  'summary': node.summary,
142
141
  'created_at': node.created_at,
143
142
  }
144
143
 
144
+ if not bool(driver.aoss_client):
145
+ entity_data['name_embedding'] = node.name_embedding
146
+
145
147
  entity_data['labels'] = list(set(node.labels + ['Entity']))
146
148
  if driver.provider == GraphProvider.KUZU:
147
149
  attributes = convert_datetimes_to_strings(node.attributes) if node.attributes else {}
@@ -161,7 +163,6 @@ async def add_nodes_and_edges_bulk_tx(
161
163
  'target_node_uuid': edge.target_node_uuid,
162
164
  'name': edge.name,
163
165
  'fact': edge.fact,
164
- 'fact_embedding': edge.fact_embedding,
165
166
  'group_id': edge.group_id,
166
167
  'episodes': edge.episodes,
167
168
  'created_at': edge.created_at,
@@ -170,6 +171,9 @@ async def add_nodes_and_edges_bulk_tx(
170
171
  'invalid_at': edge.invalid_at,
171
172
  }
172
173
 
174
+ if not bool(driver.aoss_client):
175
+ edge_data['fact_embedding'] = edge.fact_embedding
176
+
173
177
  if driver.provider == GraphProvider.KUZU:
174
178
  attributes = convert_datetimes_to_strings(edge.attributes) if edge.attributes else {}
175
179
  edge_data['attributes'] = json.dumps(attributes)
@@ -195,21 +199,29 @@ async def add_nodes_and_edges_bulk_tx(
195
199
  else:
196
200
  await tx.run(get_episode_node_save_bulk_query(driver.provider), episodes=episodes)
197
201
  await tx.run(
198
- get_entity_node_save_bulk_query(driver.provider, nodes),
202
+ get_entity_node_save_bulk_query(
203
+ driver.provider, nodes, has_aoss=bool(driver.aoss_client)
204
+ ),
199
205
  nodes=nodes,
200
- has_aoss=bool(driver.aoss_client),
201
206
  )
202
207
  await tx.run(
203
208
  get_episodic_edge_save_bulk_query(driver.provider),
204
209
  episodic_edges=[edge.model_dump() for edge in episodic_edges],
205
210
  )
206
211
  await tx.run(
207
- get_entity_edge_save_bulk_query(driver.provider),
212
+ get_entity_edge_save_bulk_query(driver.provider, has_aoss=bool(driver.aoss_client)),
208
213
  entity_edges=edges,
209
- has_aoss=bool(driver.aoss_client),
210
214
  )
211
215
 
212
- if driver.aoss_client:
216
+ if bool(driver.aoss_client):
217
+ for node_data, entity_node in zip(nodes, entity_nodes, strict=True):
218
+ if node_data.get('uuid') == entity_node.uuid:
219
+ node_data['name_embedding'] = entity_node.name_embedding
220
+
221
+ for edge_data, entity_edge in zip(edges, entity_edges, strict=True):
222
+ if edge_data.get('uuid') == entity_edge.uuid:
223
+ edge_data['fact_embedding'] = entity_edge.fact_embedding
224
+
213
225
  await driver.save_to_aoss(EPISODE_INDEX_NAME, episodes)
214
226
  await driver.save_to_aoss(ENTITY_INDEX_NAME, nodes)
215
227
  await driver.save_to_aoss(ENTITY_EDGE_INDEX_NAME, edges)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: graphiti-core
3
- Version: 0.21.0rc2
3
+ Version: 0.21.0rc3
4
4
  Summary: A temporal graph building library
5
5
  Project-URL: Homepage, https://help.getzep.com/graphiti/graphiti/overview
6
6
  Project-URL: Repository, https://github.com/getzep/graphiti
@@ -64,7 +64,7 @@ graphiti_core/search/search_utils.py,sha256=HqNYbyQklAq5GoOUo_W8Xut1GMGVYlNv0kE0
64
64
  graphiti_core/telemetry/__init__.py,sha256=5kALLDlU9bb2v19CdN7qVANsJWyfnL9E60J6FFgzm3o,226
65
65
  graphiti_core/telemetry/telemetry.py,sha256=47LrzOVBCcZxsYPsnSxWFiztHoxYKKxPwyRX0hnbDGc,3230
66
66
  graphiti_core/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
67
- graphiti_core/utils/bulk_utils.py,sha256=XyjWg_S6sQ1hM8HfHHoDnDn5yAWO1Ja0fYGFMfS7XV8,17071
67
+ graphiti_core/utils/bulk_utils.py,sha256=9XWXqjxiu2ydKMLKQRTbvzO6cO1o1HRjjpmaf5Ym51k,17633
68
68
  graphiti_core/utils/datetime_utils.py,sha256=J-zYSq7-H-2n9hYOXNIun12kM10vNX9mMATGR_egTmY,1806
69
69
  graphiti_core/utils/maintenance/__init__.py,sha256=vW4H1KyapTl-OOz578uZABYcpND4wPx3Vt6aAPaXh78,301
70
70
  graphiti_core/utils/maintenance/community_operations.py,sha256=XMiokEemn96GlvjkOvbo9hIX04Fea3eVj408NHG5P4o,11042
@@ -74,7 +74,7 @@ graphiti_core/utils/maintenance/node_operations.py,sha256=r9ilkA01eq1z-nF8P_s1EX
74
74
  graphiti_core/utils/maintenance/temporal_operations.py,sha256=IIaVtShpVkOYe6haxz3a1x3v54-MzaEXG8VsxFUNeoY,3582
75
75
  graphiti_core/utils/maintenance/utils.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
76
76
  graphiti_core/utils/ontology_utils/entity_types_utils.py,sha256=4eVgxLWY6Q8k9cRJ5pW59IYF--U4nXZsZIGOVb_yHfQ,1285
77
- graphiti_core-0.21.0rc2.dist-info/METADATA,sha256=Pqw2f7ySYgCDyyuWDBvT4KLrL-SCJXa2aFHlNzIJzJo,26933
78
- graphiti_core-0.21.0rc2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
79
- graphiti_core-0.21.0rc2.dist-info/licenses/LICENSE,sha256=KCUwCyDXuVEgmDWkozHyniRyWjnWUWjkuDHfU6o3JlA,11325
80
- graphiti_core-0.21.0rc2.dist-info/RECORD,,
77
+ graphiti_core-0.21.0rc3.dist-info/METADATA,sha256=7a30OAvffGwDCJRWGF5Mr_AP3p-JXc1f1pQXVJcQ4RY,26933
78
+ graphiti_core-0.21.0rc3.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
79
+ graphiti_core-0.21.0rc3.dist-info/licenses/LICENSE,sha256=KCUwCyDXuVEgmDWkozHyniRyWjnWUWjkuDHfU6o3JlA,11325
80
+ graphiti_core-0.21.0rc3.dist-info/RECORD,,