graphiti-core 0.17.10__py3-none-any.whl → 0.17.11__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.

@@ -188,7 +188,12 @@ async def edge_search(
188
188
  config.sim_min_score,
189
189
  ),
190
190
  edge_bfs_search(
191
- driver, bfs_origin_node_uuids, config.bfs_max_depth, search_filter, 2 * limit
191
+ driver,
192
+ bfs_origin_node_uuids,
193
+ config.bfs_max_depth,
194
+ search_filter,
195
+ group_ids,
196
+ 2 * limit,
192
197
  ),
193
198
  ]
194
199
  )
@@ -198,7 +203,12 @@ async def edge_search(
198
203
  source_node_uuids = [edge.source_node_uuid for result in search_results for edge in result]
199
204
  search_results.append(
200
205
  await edge_bfs_search(
201
- driver, source_node_uuids, config.bfs_max_depth, search_filter, 2 * limit
206
+ driver,
207
+ source_node_uuids,
208
+ config.bfs_max_depth,
209
+ search_filter,
210
+ group_ids,
211
+ 2 * limit,
202
212
  )
203
213
  )
204
214
 
@@ -281,7 +291,12 @@ async def node_search(
281
291
  driver, query_vector, search_filter, group_ids, 2 * limit, config.sim_min_score
282
292
  ),
283
293
  node_bfs_search(
284
- driver, bfs_origin_node_uuids, search_filter, config.bfs_max_depth, 2 * limit
294
+ driver,
295
+ bfs_origin_node_uuids,
296
+ search_filter,
297
+ config.bfs_max_depth,
298
+ group_ids,
299
+ 2 * limit,
285
300
  ),
286
301
  ]
287
302
  )
@@ -291,7 +306,12 @@ async def node_search(
291
306
  origin_node_uuids = [node.uuid for result in search_results for node in result]
292
307
  search_results.append(
293
308
  await node_bfs_search(
294
- driver, origin_node_uuids, search_filter, config.bfs_max_depth, 2 * limit
309
+ driver,
310
+ origin_node_uuids,
311
+ search_filter,
312
+ config.bfs_max_depth,
313
+ group_ids,
314
+ 2 * limit,
295
315
  )
296
316
  )
297
317
 
@@ -283,7 +283,8 @@ async def edge_bfs_search(
283
283
  bfs_origin_node_uuids: list[str] | None,
284
284
  bfs_max_depth: int,
285
285
  search_filter: SearchFilters,
286
- limit: int,
286
+ group_ids: list[str] | None = None,
287
+ limit: int = RELEVANT_SCHEMA_LIMIT,
287
288
  ) -> list[EntityEdge]:
288
289
  # vector similarity search over embedded facts
289
290
  if bfs_origin_node_uuids is None:
@@ -293,12 +294,13 @@ async def edge_bfs_search(
293
294
 
294
295
  query = (
295
296
  """
296
- UNWIND $bfs_origin_node_uuids AS origin_uuid
297
- MATCH path = (origin:Entity|Episodic {uuid: origin_uuid})-[:RELATES_TO|MENTIONS]->{1,3}(n:Entity)
298
- UNWIND relationships(path) AS rel
299
- MATCH (n:Entity)-[r:RELATES_TO]-(m:Entity)
300
- WHERE r.uuid = rel.uuid
301
- """
297
+ UNWIND $bfs_origin_node_uuids AS origin_uuid
298
+ MATCH path = (origin:Entity|Episodic {uuid: origin_uuid})-[:RELATES_TO|MENTIONS]->{1,3}(n:Entity)
299
+ UNWIND relationships(path) AS rel
300
+ MATCH (n:Entity)-[r:RELATES_TO]-(m:Entity)
301
+ WHERE r.uuid = rel.uuid
302
+ AND r.group_id IN $group_ids
303
+ """
302
304
  + filter_query
303
305
  + """
304
306
  RETURN DISTINCT
@@ -323,6 +325,7 @@ async def edge_bfs_search(
323
325
  params=filter_params,
324
326
  bfs_origin_node_uuids=bfs_origin_node_uuids,
325
327
  depth=bfs_max_depth,
328
+ group_ids=group_ids,
326
329
  limit=limit,
327
330
  routing_='r',
328
331
  )
@@ -431,7 +434,8 @@ async def node_bfs_search(
431
434
  bfs_origin_node_uuids: list[str] | None,
432
435
  search_filter: SearchFilters,
433
436
  bfs_max_depth: int,
434
- limit: int,
437
+ group_ids: list[str] | None = None,
438
+ limit: int = RELEVANT_SCHEMA_LIMIT,
435
439
  ) -> list[EntityNode]:
436
440
  # vector similarity search over entity names
437
441
  if bfs_origin_node_uuids is None:
@@ -441,10 +445,11 @@ async def node_bfs_search(
441
445
 
442
446
  query = (
443
447
  """
444
- UNWIND $bfs_origin_node_uuids AS origin_uuid
445
- MATCH (origin:Entity|Episodic {uuid: origin_uuid})-[:RELATES_TO|MENTIONS]->{1,3}(n:Entity)
446
- WHERE n.group_id = origin.group_id
447
- """
448
+ UNWIND $bfs_origin_node_uuids AS origin_uuid
449
+ MATCH (origin:Entity|Episodic {uuid: origin_uuid})-[:RELATES_TO|MENTIONS]->{1,3}(n:Entity)
450
+ WHERE n.group_id = origin.group_id
451
+ AND origin.group_id IN $group_ids
452
+ """
448
453
  + filter_query
449
454
  + ENTITY_NODE_RETURN
450
455
  + """
@@ -456,6 +461,7 @@ async def node_bfs_search(
456
461
  params=filter_params,
457
462
  bfs_origin_node_uuids=bfs_origin_node_uuids,
458
463
  depth=bfs_max_depth,
464
+ group_ids=group_ids,
459
465
  limit=limit,
460
466
  routing_='r',
461
467
  )
@@ -482,6 +488,7 @@ async def episode_fulltext_search(
482
488
  YIELD node AS episode, score
483
489
  MATCH (e:Episodic)
484
490
  WHERE e.uuid = episode.uuid
491
+ AND e.group_id IN $group_ids
485
492
  RETURN
486
493
  e.content AS content,
487
494
  e.created_at AS created_at,
@@ -524,6 +531,7 @@ async def community_fulltext_search(
524
531
  get_nodes_query(driver.provider, 'community_name', '$query')
525
532
  + """
526
533
  YIELD node AS comm, score
534
+ WHERE comm.group_id IN $group_ids
527
535
  RETURN
528
536
  comm.uuid AS uuid,
529
537
  comm.group_id AS group_id,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: graphiti-core
3
- Version: 0.17.10
3
+ Version: 0.17.11
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
@@ -52,12 +52,12 @@ graphiti_core/prompts/models.py,sha256=NgxdbPHJpBEcpbXovKyScgpBc73Q-GIW-CBDlBtDj
52
52
  graphiti_core/prompts/prompt_helpers.py,sha256=-9TABwIcIQUVHcNANx6wIZd-FT2DgYKyGTfx4IGYq2I,64
53
53
  graphiti_core/prompts/summarize_nodes.py,sha256=tbg-AgWlzgFBeImKkZ28h2SpmqfPPqvN2Ol1Q71VF9Y,4146
54
54
  graphiti_core/search/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
55
- graphiti_core/search/search.py,sha256=bJCFaNApu5396pXTa-xciu8ORDdRFJqfE3j2ieRVd7Y,15162
55
+ graphiti_core/search/search.py,sha256=ZWDZAghEma9jNfIOwQ-dDMpii3VeVzKkvHFih3kSQ68,15570
56
56
  graphiti_core/search/search_config.py,sha256=VvKg6AB_RPhoe56DBBXHRBXHThAVJ_OLFCyq_yKof-A,3765
57
57
  graphiti_core/search/search_config_recipes.py,sha256=4GquRphHhJlpXQhAZOySYnCzBWYoTwxlJj44eTOavZQ,7443
58
58
  graphiti_core/search/search_filters.py,sha256=cxiFkqB-r7QzVMh8nmujECLhzgsbeCpBHUQqDXnCQ3A,6383
59
59
  graphiti_core/search/search_helpers.py,sha256=G5Ceaq5Pfgx0Weelqgeylp_pUHwiBnINaUYsDbURJbE,2636
60
- graphiti_core/search/search_utils.py,sha256=-EmzUbjy3qxVAkn6V3hIJNWyHkpKiSWz4cVoYw7VnbM,34461
60
+ graphiti_core/search/search_utils.py,sha256=FknN1cfITOzH3S4Mt6aIVVvznZvgVjwoYHRWDskhvO8,34357
61
61
  graphiti_core/telemetry/__init__.py,sha256=5kALLDlU9bb2v19CdN7qVANsJWyfnL9E60J6FFgzm3o,226
62
62
  graphiti_core/telemetry/telemetry.py,sha256=47LrzOVBCcZxsYPsnSxWFiztHoxYKKxPwyRX0hnbDGc,3230
63
63
  graphiti_core/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -71,7 +71,7 @@ graphiti_core/utils/maintenance/node_operations.py,sha256=ZnopNRTNdBjBotQ2uQiI7E
71
71
  graphiti_core/utils/maintenance/temporal_operations.py,sha256=mJkw9xLB4W2BsLfC5POr0r-PHWL9SIfNj_l_xu0B5ug,3410
72
72
  graphiti_core/utils/maintenance/utils.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
73
73
  graphiti_core/utils/ontology_utils/entity_types_utils.py,sha256=QJX5cG0GSSNF_Mm_yrldr69wjVAbN_MxLhOSznz85Hk,1279
74
- graphiti_core-0.17.10.dist-info/METADATA,sha256=EFiNjoh3V_rDczmpKgccKJ_tc1nHKZ7XborF4GheWN4,23813
75
- graphiti_core-0.17.10.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
76
- graphiti_core-0.17.10.dist-info/licenses/LICENSE,sha256=KCUwCyDXuVEgmDWkozHyniRyWjnWUWjkuDHfU6o3JlA,11325
77
- graphiti_core-0.17.10.dist-info/RECORD,,
74
+ graphiti_core-0.17.11.dist-info/METADATA,sha256=ZhBODyNSgWtzQzfSJm7GvlyCGGa0AMxuYS_4BChQ8mM,23813
75
+ graphiti_core-0.17.11.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
76
+ graphiti_core-0.17.11.dist-info/licenses/LICENSE,sha256=KCUwCyDXuVEgmDWkozHyniRyWjnWUWjkuDHfU6o3JlA,11325
77
+ graphiti_core-0.17.11.dist-info/RECORD,,