graphiti-core 0.3.15__py3-none-any.whl → 0.3.17__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/cross_encoder/__init__.py +0 -0
- graphiti_core/cross_encoder/bge_reranker_client.py +45 -0
- graphiti_core/cross_encoder/client.py +41 -0
- graphiti_core/cross_encoder/openai_reranker_client.py +113 -0
- graphiti_core/edges.py +13 -13
- graphiti_core/graphiti.py +28 -3
- graphiti_core/nodes.py +13 -13
- graphiti_core/search/search.py +43 -15
- graphiti_core/search/search_config.py +13 -1
- graphiti_core/search/search_config_recipes.py +27 -1
- graphiti_core/search/search_utils.py +188 -113
- graphiti_core/utils/maintenance/community_operations.py +5 -5
- graphiti_core/utils/maintenance/graph_data_operations.py +1 -1
- {graphiti_core-0.3.15.dist-info → graphiti_core-0.3.17.dist-info}/METADATA +1 -2
- {graphiti_core-0.3.15.dist-info → graphiti_core-0.3.17.dist-info}/RECORD +17 -13
- {graphiti_core-0.3.15.dist-info → graphiti_core-0.3.17.dist-info}/LICENSE +0 -0
- {graphiti_core-0.3.15.dist-info → graphiti_core-0.3.17.dist-info}/WHEEL +0 -0
|
@@ -37,6 +37,7 @@ logger = logging.getLogger(__name__)
|
|
|
37
37
|
RELEVANT_SCHEMA_LIMIT = 3
|
|
38
38
|
DEFAULT_MIN_SCORE = 0.6
|
|
39
39
|
DEFAULT_MMR_LAMBDA = 0.5
|
|
40
|
+
MAX_SEARCH_DEPTH = 3
|
|
40
41
|
MAX_QUERY_LENGTH = 128
|
|
41
42
|
|
|
42
43
|
|
|
@@ -86,12 +87,13 @@ async def get_mentioned_nodes(
|
|
|
86
87
|
n.uuid As uuid,
|
|
87
88
|
n.group_id AS group_id,
|
|
88
89
|
n.name AS name,
|
|
89
|
-
n.name_embedding AS name_embedding
|
|
90
|
+
n.name_embedding AS name_embedding,
|
|
90
91
|
n.created_at AS created_at,
|
|
91
92
|
n.summary AS summary
|
|
92
93
|
""",
|
|
93
94
|
uuids=episode_uuids,
|
|
94
|
-
|
|
95
|
+
database_=DEFAULT_DATABASE,
|
|
96
|
+
routing_='r',
|
|
95
97
|
)
|
|
96
98
|
|
|
97
99
|
nodes = [get_entity_node_from_record(record) for record in records]
|
|
@@ -105,17 +107,18 @@ async def get_communities_by_nodes(
|
|
|
105
107
|
node_uuids = [node.uuid for node in nodes]
|
|
106
108
|
records, _, _ = await driver.execute_query(
|
|
107
109
|
"""
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
110
|
+
MATCH (c:Community)-[:HAS_MEMBER]->(n:Entity) WHERE n.uuid IN $uuids
|
|
111
|
+
RETURN DISTINCT
|
|
112
|
+
c.uuid As uuid,
|
|
113
|
+
c.group_id AS group_id,
|
|
114
|
+
c.name AS name,
|
|
115
|
+
c.name_embedding AS name_embedding
|
|
116
|
+
c.created_at AS created_at,
|
|
117
|
+
c.summary AS summary
|
|
118
|
+
""",
|
|
117
119
|
uuids=node_uuids,
|
|
118
|
-
|
|
120
|
+
database_=DEFAULT_DATABASE,
|
|
121
|
+
routing_='r',
|
|
119
122
|
)
|
|
120
123
|
|
|
121
124
|
communities = [get_community_node_from_record(record) for record in records]
|
|
@@ -139,8 +142,10 @@ async def edge_fulltext_search(
|
|
|
139
142
|
cypher_query = Query("""
|
|
140
143
|
CALL db.index.fulltext.queryRelationships("edge_name_and_fact", $query)
|
|
141
144
|
YIELD relationship AS rel, score
|
|
142
|
-
MATCH (n:Entity)-[r {uuid: rel.uuid}]
|
|
143
|
-
|
|
145
|
+
MATCH (n:Entity)-[r {uuid: rel.uuid}]->(m:Entity)
|
|
146
|
+
WHERE ($source_uuid IS NULL OR n.uuid IN [$source_uuid, $target_uuid])
|
|
147
|
+
AND ($target_uuid IS NULL OR m.uuid IN [$source_uuid, $target_uuid])
|
|
148
|
+
RETURN
|
|
144
149
|
r.uuid AS uuid,
|
|
145
150
|
r.group_id AS group_id,
|
|
146
151
|
n.uuid AS source_node_uuid,
|
|
@@ -163,7 +168,8 @@ async def edge_fulltext_search(
|
|
|
163
168
|
target_uuid=target_node_uuid,
|
|
164
169
|
group_ids=group_ids,
|
|
165
170
|
limit=limit,
|
|
166
|
-
|
|
171
|
+
database_=DEFAULT_DATABASE,
|
|
172
|
+
routing_='r',
|
|
167
173
|
)
|
|
168
174
|
|
|
169
175
|
edges = [get_entity_edge_from_record(record) for record in records]
|
|
@@ -183,17 +189,17 @@ async def edge_similarity_search(
|
|
|
183
189
|
# vector similarity search over embedded facts
|
|
184
190
|
query = Query("""
|
|
185
191
|
CYPHER runtime = parallel parallelRuntimeSupport=all
|
|
186
|
-
MATCH (n:Entity)-[r:RELATES_TO]
|
|
192
|
+
MATCH (n:Entity)-[r:RELATES_TO]->(m:Entity)
|
|
187
193
|
WHERE ($group_ids IS NULL OR r.group_id IN $group_ids)
|
|
188
|
-
AND ($source_uuid IS NULL OR n.uuid
|
|
189
|
-
AND ($target_uuid IS NULL OR m.uuid
|
|
190
|
-
WITH
|
|
194
|
+
AND ($source_uuid IS NULL OR n.uuid IN [$source_uuid, $target_uuid])
|
|
195
|
+
AND ($target_uuid IS NULL OR m.uuid IN [$source_uuid, $target_uuid])
|
|
196
|
+
WITH DISTINCT r, vector.similarity.cosine(r.fact_embedding, $search_vector) AS score
|
|
191
197
|
WHERE score > $min_score
|
|
192
198
|
RETURN
|
|
193
199
|
r.uuid AS uuid,
|
|
194
200
|
r.group_id AS group_id,
|
|
195
|
-
|
|
196
|
-
|
|
201
|
+
startNode(r).uuid AS source_node_uuid,
|
|
202
|
+
endNode(r).uuid AS target_node_uuid,
|
|
197
203
|
r.created_at AS created_at,
|
|
198
204
|
r.name AS name,
|
|
199
205
|
r.fact AS fact,
|
|
@@ -214,7 +220,50 @@ async def edge_similarity_search(
|
|
|
214
220
|
group_ids=group_ids,
|
|
215
221
|
limit=limit,
|
|
216
222
|
min_score=min_score,
|
|
217
|
-
|
|
223
|
+
database_=DEFAULT_DATABASE,
|
|
224
|
+
routing_='r',
|
|
225
|
+
)
|
|
226
|
+
|
|
227
|
+
edges = [get_entity_edge_from_record(record) for record in records]
|
|
228
|
+
|
|
229
|
+
return edges
|
|
230
|
+
|
|
231
|
+
|
|
232
|
+
async def edge_bfs_search(
|
|
233
|
+
driver: AsyncDriver,
|
|
234
|
+
bfs_origin_node_uuids: list[str] | None,
|
|
235
|
+
bfs_max_depth: int,
|
|
236
|
+
) -> list[EntityEdge]:
|
|
237
|
+
# vector similarity search over embedded facts
|
|
238
|
+
if bfs_origin_node_uuids is None:
|
|
239
|
+
return []
|
|
240
|
+
|
|
241
|
+
query = Query("""
|
|
242
|
+
UNWIND $bfs_origin_node_uuids AS origin_uuid
|
|
243
|
+
MATCH path = (origin:Entity|Episodic {uuid: origin_uuid})-[:RELATES_TO|MENTIONS]->{1,3}(n:Entity)
|
|
244
|
+
UNWIND relationships(path) AS rel
|
|
245
|
+
MATCH ()-[r:RELATES_TO {uuid: rel.uuid}]-()
|
|
246
|
+
RETURN DISTINCT
|
|
247
|
+
r.uuid AS uuid,
|
|
248
|
+
r.group_id AS group_id,
|
|
249
|
+
startNode(r).uuid AS source_node_uuid,
|
|
250
|
+
endNode(r).uuid AS target_node_uuid,
|
|
251
|
+
r.created_at AS created_at,
|
|
252
|
+
r.name AS name,
|
|
253
|
+
r.fact AS fact,
|
|
254
|
+
r.fact_embedding AS fact_embedding,
|
|
255
|
+
r.episodes AS episodes,
|
|
256
|
+
r.expired_at AS expired_at,
|
|
257
|
+
r.valid_at AS valid_at,
|
|
258
|
+
r.invalid_at AS invalid_at
|
|
259
|
+
""")
|
|
260
|
+
|
|
261
|
+
records, _, _ = await driver.execute_query(
|
|
262
|
+
query,
|
|
263
|
+
bfs_origin_node_uuids=bfs_origin_node_uuids,
|
|
264
|
+
depth=bfs_max_depth,
|
|
265
|
+
database_=DEFAULT_DATABASE,
|
|
266
|
+
routing_='r',
|
|
218
267
|
)
|
|
219
268
|
|
|
220
269
|
edges = [get_entity_edge_from_record(record) for record in records]
|
|
@@ -235,22 +284,23 @@ async def node_fulltext_search(
|
|
|
235
284
|
|
|
236
285
|
records, _, _ = await driver.execute_query(
|
|
237
286
|
"""
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
287
|
+
CALL db.index.fulltext.queryNodes("node_name_and_summary", $query)
|
|
288
|
+
YIELD node AS n, score
|
|
289
|
+
RETURN
|
|
290
|
+
n.uuid AS uuid,
|
|
291
|
+
n.group_id AS group_id,
|
|
292
|
+
n.name AS name,
|
|
293
|
+
n.name_embedding AS name_embedding,
|
|
294
|
+
n.created_at AS created_at,
|
|
295
|
+
n.summary AS summary
|
|
296
|
+
ORDER BY score DESC
|
|
297
|
+
LIMIT $limit
|
|
298
|
+
""",
|
|
250
299
|
query=fuzzy_query,
|
|
251
300
|
group_ids=group_ids,
|
|
252
301
|
limit=limit,
|
|
253
|
-
|
|
302
|
+
database_=DEFAULT_DATABASE,
|
|
303
|
+
routing_='r',
|
|
254
304
|
)
|
|
255
305
|
nodes = [get_entity_node_from_record(record) for record in records]
|
|
256
306
|
|
|
@@ -267,26 +317,59 @@ async def node_similarity_search(
|
|
|
267
317
|
# vector similarity search over entity names
|
|
268
318
|
records, _, _ = await driver.execute_query(
|
|
269
319
|
"""
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
320
|
+
CYPHER runtime = parallel parallelRuntimeSupport=all
|
|
321
|
+
MATCH (n:Entity)
|
|
322
|
+
WHERE $group_ids IS NULL OR n.group_id IN $group_ids
|
|
323
|
+
WITH n, vector.similarity.cosine(n.name_embedding, $search_vector) AS score
|
|
324
|
+
WHERE score > $min_score
|
|
325
|
+
RETURN
|
|
326
|
+
n.uuid As uuid,
|
|
327
|
+
n.group_id AS group_id,
|
|
328
|
+
n.name AS name,
|
|
329
|
+
n.name_embedding AS name_embedding,
|
|
330
|
+
n.created_at AS created_at,
|
|
331
|
+
n.summary AS summary
|
|
332
|
+
ORDER BY score DESC
|
|
333
|
+
LIMIT $limit
|
|
334
|
+
""",
|
|
285
335
|
search_vector=search_vector,
|
|
286
336
|
group_ids=group_ids,
|
|
287
337
|
limit=limit,
|
|
288
338
|
min_score=min_score,
|
|
289
|
-
|
|
339
|
+
database_=DEFAULT_DATABASE,
|
|
340
|
+
routing_='r',
|
|
341
|
+
)
|
|
342
|
+
nodes = [get_entity_node_from_record(record) for record in records]
|
|
343
|
+
|
|
344
|
+
return nodes
|
|
345
|
+
|
|
346
|
+
|
|
347
|
+
async def node_bfs_search(
|
|
348
|
+
driver: AsyncDriver,
|
|
349
|
+
bfs_origin_node_uuids: list[str] | None,
|
|
350
|
+
bfs_max_depth: int,
|
|
351
|
+
) -> list[EntityNode]:
|
|
352
|
+
# vector similarity search over entity names
|
|
353
|
+
if bfs_origin_node_uuids is None:
|
|
354
|
+
return []
|
|
355
|
+
|
|
356
|
+
records, _, _ = await driver.execute_query(
|
|
357
|
+
"""
|
|
358
|
+
UNWIND $bfs_origin_node_uuids AS origin_uuid
|
|
359
|
+
MATCH (origin:Entity|Episodic {uuid: origin_uuid})-[:RELATES_TO|MENTIONS]->{1,3}(n:Entity)
|
|
360
|
+
RETURN DISTINCT
|
|
361
|
+
n.uuid As uuid,
|
|
362
|
+
n.group_id AS group_id,
|
|
363
|
+
n.name AS name,
|
|
364
|
+
n.name_embedding AS name_embedding,
|
|
365
|
+
n.created_at AS created_at,
|
|
366
|
+
n.summary AS summary
|
|
367
|
+
LIMIT $limit
|
|
368
|
+
""",
|
|
369
|
+
bfs_origin_node_uuids=bfs_origin_node_uuids,
|
|
370
|
+
depth=bfs_max_depth,
|
|
371
|
+
database_=DEFAULT_DATABASE,
|
|
372
|
+
routing_='r',
|
|
290
373
|
)
|
|
291
374
|
nodes = [get_entity_node_from_record(record) for record in records]
|
|
292
375
|
|
|
@@ -306,22 +389,23 @@ async def community_fulltext_search(
|
|
|
306
389
|
|
|
307
390
|
records, _, _ = await driver.execute_query(
|
|
308
391
|
"""
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
392
|
+
CALL db.index.fulltext.queryNodes("community_name", $query)
|
|
393
|
+
YIELD node AS comm, score
|
|
394
|
+
RETURN
|
|
395
|
+
comm.uuid AS uuid,
|
|
396
|
+
comm.group_id AS group_id,
|
|
397
|
+
comm.name AS name,
|
|
398
|
+
comm.name_embedding AS name_embedding,
|
|
399
|
+
comm.created_at AS created_at,
|
|
400
|
+
comm.summary AS summary
|
|
401
|
+
ORDER BY score DESC
|
|
402
|
+
LIMIT $limit
|
|
403
|
+
""",
|
|
321
404
|
query=fuzzy_query,
|
|
322
405
|
group_ids=group_ids,
|
|
323
406
|
limit=limit,
|
|
324
|
-
|
|
407
|
+
database_=DEFAULT_DATABASE,
|
|
408
|
+
routing_='r',
|
|
325
409
|
)
|
|
326
410
|
communities = [get_community_node_from_record(record) for record in records]
|
|
327
411
|
|
|
@@ -338,26 +422,27 @@ async def community_similarity_search(
|
|
|
338
422
|
# vector similarity search over entity names
|
|
339
423
|
records, _, _ = await driver.execute_query(
|
|
340
424
|
"""
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
425
|
+
CYPHER runtime = parallel parallelRuntimeSupport=all
|
|
426
|
+
MATCH (comm:Community)
|
|
427
|
+
WHERE ($group_ids IS NULL OR comm.group_id IN $group_ids)
|
|
428
|
+
WITH comm, vector.similarity.cosine(comm.name_embedding, $search_vector) AS score
|
|
429
|
+
WHERE score > $min_score
|
|
430
|
+
RETURN
|
|
431
|
+
comm.uuid As uuid,
|
|
432
|
+
comm.group_id AS group_id,
|
|
433
|
+
comm.name AS name,
|
|
434
|
+
comm.name_embedding AS name_embedding,
|
|
435
|
+
comm.created_at AS created_at,
|
|
436
|
+
comm.summary AS summary
|
|
437
|
+
ORDER BY score DESC
|
|
438
|
+
LIMIT $limit
|
|
439
|
+
""",
|
|
356
440
|
search_vector=search_vector,
|
|
357
441
|
group_ids=group_ids,
|
|
358
442
|
limit=limit,
|
|
359
443
|
min_score=min_score,
|
|
360
|
-
|
|
444
|
+
database_=DEFAULT_DATABASE,
|
|
445
|
+
routing_='r',
|
|
361
446
|
)
|
|
362
447
|
communities = [get_community_node_from_record(record) for record in records]
|
|
363
448
|
|
|
@@ -534,32 +619,27 @@ async def node_distance_reranker(
|
|
|
534
619
|
driver: AsyncDriver, node_uuids: list[str], center_node_uuid: str
|
|
535
620
|
) -> list[str]:
|
|
536
621
|
# filter out node_uuid center node node uuid
|
|
537
|
-
filtered_uuids = list(filter(lambda
|
|
622
|
+
filtered_uuids = list(filter(lambda node_uuid: node_uuid != center_node_uuid, node_uuids))
|
|
538
623
|
scores: dict[str, float] = {}
|
|
539
624
|
|
|
540
625
|
# Find the shortest path to center node
|
|
541
626
|
query = Query("""
|
|
542
|
-
|
|
543
|
-
|
|
627
|
+
UNWIND $node_uuids AS node_uuid
|
|
628
|
+
MATCH p = SHORTEST 1 (center:Entity {uuid: $center_uuid})-[:RELATES_TO]-+(n:Entity {uuid: node_uuid})
|
|
629
|
+
RETURN length(p) AS score, node_uuid AS uuid
|
|
544
630
|
""")
|
|
545
631
|
|
|
546
|
-
path_results = await
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
center_uuid=center_node_uuid,
|
|
552
|
-
_database=DEFAULT_DATABASE,
|
|
553
|
-
)
|
|
554
|
-
for uuid in filtered_uuids
|
|
555
|
-
]
|
|
632
|
+
path_results, _, _ = await driver.execute_query(
|
|
633
|
+
query,
|
|
634
|
+
node_uuids=filtered_uuids,
|
|
635
|
+
center_uuid=center_node_uuid,
|
|
636
|
+
database_=DEFAULT_DATABASE,
|
|
556
637
|
)
|
|
557
638
|
|
|
558
|
-
for
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
scores[uuid] = distance
|
|
639
|
+
for result in path_results:
|
|
640
|
+
uuid = result['uuid']
|
|
641
|
+
score = result['score'] if 'score' in result else float('inf')
|
|
642
|
+
scores[uuid] = score
|
|
563
643
|
|
|
564
644
|
# rerank on shortest distance
|
|
565
645
|
filtered_uuids.sort(key=lambda cur_uuid: scores[cur_uuid])
|
|
@@ -576,25 +656,20 @@ async def episode_mentions_reranker(driver: AsyncDriver, node_uuids: list[list[s
|
|
|
576
656
|
scores: dict[str, float] = {}
|
|
577
657
|
|
|
578
658
|
# Find the shortest path to center node
|
|
579
|
-
query = Query("""
|
|
580
|
-
|
|
581
|
-
|
|
659
|
+
query = Query("""
|
|
660
|
+
UNWIND $node_uuids AS node_uuid
|
|
661
|
+
MATCH (episode:Episodic)-[r:MENTIONS]->(n:Entity {uuid: node_uuid})
|
|
662
|
+
RETURN count(*) AS score, n.uuid AS uuid
|
|
582
663
|
""")
|
|
583
664
|
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
node_uuid=uuid,
|
|
589
|
-
_database=DEFAULT_DATABASE,
|
|
590
|
-
)
|
|
591
|
-
for uuid in sorted_uuids
|
|
592
|
-
]
|
|
665
|
+
results, _, _ = await driver.execute_query(
|
|
666
|
+
query,
|
|
667
|
+
node_uuids=sorted_uuids,
|
|
668
|
+
database_=DEFAULT_DATABASE,
|
|
593
669
|
)
|
|
594
670
|
|
|
595
|
-
for
|
|
596
|
-
|
|
597
|
-
scores[uuid] = record['score']
|
|
671
|
+
for result in results:
|
|
672
|
+
scores[result['uuid']] = result['score']
|
|
598
673
|
|
|
599
674
|
# rerank on shortest distance
|
|
600
675
|
sorted_uuids.sort(key=lambda cur_uuid: scores[cur_uuid])
|
|
@@ -40,7 +40,7 @@ async def get_community_clusters(
|
|
|
40
40
|
RETURN
|
|
41
41
|
collect(DISTINCT n.group_id) AS group_ids
|
|
42
42
|
""",
|
|
43
|
-
|
|
43
|
+
database_=DEFAULT_DATABASE,
|
|
44
44
|
)
|
|
45
45
|
|
|
46
46
|
group_ids = group_id_values[0]['group_ids']
|
|
@@ -59,7 +59,7 @@ async def get_community_clusters(
|
|
|
59
59
|
""",
|
|
60
60
|
uuid=node.uuid,
|
|
61
61
|
group_id=group_id,
|
|
62
|
-
|
|
62
|
+
database_=DEFAULT_DATABASE,
|
|
63
63
|
)
|
|
64
64
|
|
|
65
65
|
projection[node.uuid] = [
|
|
@@ -223,7 +223,7 @@ async def remove_communities(driver: AsyncDriver):
|
|
|
223
223
|
MATCH (c:Community)
|
|
224
224
|
DETACH DELETE c
|
|
225
225
|
""",
|
|
226
|
-
|
|
226
|
+
database_=DEFAULT_DATABASE,
|
|
227
227
|
)
|
|
228
228
|
|
|
229
229
|
|
|
@@ -243,7 +243,7 @@ async def determine_entity_community(
|
|
|
243
243
|
c.summary AS summary
|
|
244
244
|
""",
|
|
245
245
|
entity_uuid=entity.uuid,
|
|
246
|
-
|
|
246
|
+
database_=DEFAULT_DATABASE,
|
|
247
247
|
)
|
|
248
248
|
|
|
249
249
|
if len(records) > 0:
|
|
@@ -262,7 +262,7 @@ async def determine_entity_community(
|
|
|
262
262
|
c.summary AS summary
|
|
263
263
|
""",
|
|
264
264
|
entity_uuid=entity.uuid,
|
|
265
|
-
|
|
265
|
+
database_=DEFAULT_DATABASE,
|
|
266
266
|
)
|
|
267
267
|
|
|
268
268
|
communities: list[CommunityNode] = [
|
|
@@ -35,7 +35,7 @@ async def build_indices_and_constraints(driver: AsyncDriver, delete_existing: bo
|
|
|
35
35
|
"""
|
|
36
36
|
SHOW INDEXES YIELD name
|
|
37
37
|
""",
|
|
38
|
-
|
|
38
|
+
database_=DEFAULT_DATABASE,
|
|
39
39
|
)
|
|
40
40
|
index_names = [record['name'] for record in records]
|
|
41
41
|
await asyncio.gather(
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: graphiti-core
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.17
|
|
4
4
|
Summary: A temporal graph building library
|
|
5
5
|
License: Apache-2.0
|
|
6
6
|
Author: Paul Paliychuk
|
|
@@ -17,7 +17,6 @@ Requires-Dist: numpy (>=1.0.0)
|
|
|
17
17
|
Requires-Dist: openai (>=1.50.2,<2.0.0)
|
|
18
18
|
Requires-Dist: pydantic (>=2.8.2,<3.0.0)
|
|
19
19
|
Requires-Dist: tenacity (<9.0.0)
|
|
20
|
-
Requires-Dist: voyageai (>=0.2.3,<0.3.0)
|
|
21
20
|
Description-Content-Type: text/markdown
|
|
22
21
|
|
|
23
22
|
<div align="center">
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
graphiti_core/__init__.py,sha256=e5SWFkRiaUwfprYIeIgVIh7JDedNiloZvd3roU-0aDY,55
|
|
2
|
-
graphiti_core/
|
|
2
|
+
graphiti_core/cross_encoder/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
3
|
+
graphiti_core/cross_encoder/bge_reranker_client.py,sha256=jsXBUHfFpGsNASHaRnfz1_miQ3x070DdU8QS4J3DciI,1466
|
|
4
|
+
graphiti_core/cross_encoder/client.py,sha256=PyFYYsALQAD9wu0gL5uquPsulmaBZ0AZkJmLq2DFA-c,1472
|
|
5
|
+
graphiti_core/cross_encoder/openai_reranker_client.py,sha256=ij1E1Y5G9GNP3h3h8nSUF-ZJrQ921B54uudZUsCUaDc,4063
|
|
6
|
+
graphiti_core/edges.py,sha256=KgH1f-nwexEX3PCRaQHPqbD033EeiKo_s39mqZn43zk,13082
|
|
3
7
|
graphiti_core/embedder/__init__.py,sha256=eWd-0sPxflnYXLoWNT9sxwCIFun5JNO9Fk4E-ZXXf8Y,164
|
|
4
8
|
graphiti_core/embedder/client.py,sha256=Sd9CyYXaqRazdOH8opKackrTx-y9y-T54M78XTVMzxs,1006
|
|
5
9
|
graphiti_core/embedder/openai.py,sha256=28cl4qQCQeu6EGxVVPw3lPesA-Z_Cpvuhozyc1jdqVg,1586
|
|
6
10
|
graphiti_core/embedder/voyage.py,sha256=pGrSquGnSiYl4nXGnutbdWchtYgZb0Fi_yW3c90dPlI,1497
|
|
7
11
|
graphiti_core/errors.py,sha256=ddHrHGQxhwkVAtSph4AV84UoOlgwZufMczXPwB7uqPo,1795
|
|
8
|
-
graphiti_core/graphiti.py,sha256=
|
|
12
|
+
graphiti_core/graphiti.py,sha256=c9Rh777TrHYffPF6qvFAfm-m-PA4kD8a3ZW_ShsZGxE,27714
|
|
9
13
|
graphiti_core/helpers.py,sha256=kqC2TD8Auwty4sG7KH4BuRMX413oTChGaAT_XUt9ZjU,2108
|
|
10
14
|
graphiti_core/llm_client/__init__.py,sha256=PA80TSMeX-sUXITXEAxMDEt3gtfZgcJrGJUcyds1mSo,207
|
|
11
15
|
graphiti_core/llm_client/anthropic_client.py,sha256=4l2PbCjIoeRr7UJ2DUh2grYLTtE2vNaWlo72IIRQDeI,2405
|
|
@@ -20,7 +24,7 @@ graphiti_core/models/edges/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJ
|
|
|
20
24
|
graphiti_core/models/edges/edge_db_queries.py,sha256=gUC5AZeXvobsIzG8Zqxj4Sa-j0PKV4CuEPHWupFTXQs,1145
|
|
21
25
|
graphiti_core/models/nodes/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
22
26
|
graphiti_core/models/nodes/node_db_queries.py,sha256=HxZIjVLqVRnG7OJHeZv7t3KCEWFTWvdNOBJyLSN-1Ts,918
|
|
23
|
-
graphiti_core/nodes.py,sha256=
|
|
27
|
+
graphiti_core/nodes.py,sha256=ZFid7j_affdcfdHFIpzphUE0cPwg-YvC31OQuAZWJWQ,13834
|
|
24
28
|
graphiti_core/prompts/__init__.py,sha256=EA-x9xUki9l8wnu2l8ek_oNf75-do5tq5hVq7Zbv8Kw,101
|
|
25
29
|
graphiti_core/prompts/dedupe_edges.py,sha256=DUNHdIudj50FAjkla4nc68tSFSD2yjmYHBw-Bb7ph20,6529
|
|
26
30
|
graphiti_core/prompts/dedupe_nodes.py,sha256=BZ9S-PB9SSGjc5Oo8ivdgA6rZx3OGOFhKtwrBlQ0bm0,7269
|
|
@@ -34,20 +38,20 @@ graphiti_core/prompts/models.py,sha256=cvx_Bv5RMFUD_5IUawYrbpOKLPHogai7_bm7YXrSz
|
|
|
34
38
|
graphiti_core/prompts/summarize_nodes.py,sha256=FLuZpGTABgcxuIDkx_IKH115nHEw0rIaFhcGlWveAMc,2357
|
|
35
39
|
graphiti_core/py.typed,sha256=vlmmzQOt7bmeQl9L3XJP4W6Ry0iiELepnOrinKz5KQg,79
|
|
36
40
|
graphiti_core/search/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
37
|
-
graphiti_core/search/search.py,sha256=
|
|
38
|
-
graphiti_core/search/search_config.py,sha256=
|
|
39
|
-
graphiti_core/search/search_config_recipes.py,sha256=
|
|
40
|
-
graphiti_core/search/search_utils.py,sha256=
|
|
41
|
+
graphiti_core/search/search.py,sha256=jhYIb7ERK-zGT9N0M8wXjIdFMyU0pUKzpnHmmBxdG3A,10710
|
|
42
|
+
graphiti_core/search/search_config.py,sha256=UZN8jFA4pBlw2O5N1cuhVRBdTwMLR9N3Oyo6sQ4MDVw,3117
|
|
43
|
+
graphiti_core/search/search_config_recipes.py,sha256=20jS7veJExDnXA-ovJSUJfyDHKt7GW-nng-eoiT7ATA,5810
|
|
44
|
+
graphiti_core/search/search_utils.py,sha256=gakgUHtWQ1hqtbtFXbZn59P0-v12PcBut72UiTL6ivs,22437
|
|
41
45
|
graphiti_core/utils/__init__.py,sha256=cJAcMnBZdHBQmWrZdU1PQ1YmaL75bhVUkyVpIPuOyns,260
|
|
42
46
|
graphiti_core/utils/bulk_utils.py,sha256=JtoYTZPCigPa3n2E43Oe7QhFZRTA_QKNGy1jVgklHag,12614
|
|
43
47
|
graphiti_core/utils/maintenance/__init__.py,sha256=TRY3wWWu5kn3Oahk_KKhltrWnh0NACw0FskjqF6OtlA,314
|
|
44
|
-
graphiti_core/utils/maintenance/community_operations.py,sha256=
|
|
48
|
+
graphiti_core/utils/maintenance/community_operations.py,sha256=Ltx8cQJcFDXcQs17lHDkh2r3qmJalzpRdA3Azl2U3m8,9804
|
|
45
49
|
graphiti_core/utils/maintenance/edge_operations.py,sha256=htG9h32u0O1g7ZdR-jFSHuzDgiO4MChYJsNuvrRMTu8,11270
|
|
46
|
-
graphiti_core/utils/maintenance/graph_data_operations.py,sha256=
|
|
50
|
+
graphiti_core/utils/maintenance/graph_data_operations.py,sha256=w66_SLlvPapuG91YGGfR3bG2sM6cJ2XPHIaxM0slAdE,6526
|
|
47
51
|
graphiti_core/utils/maintenance/node_operations.py,sha256=h5nlRojbXOGJs-alpv6z6WnZ1UCixVGlAQYBQUqz8Bs,9030
|
|
48
52
|
graphiti_core/utils/maintenance/temporal_operations.py,sha256=MvaRLWrBlDeYw8CQrKish1xbYcY5ovpfdqA2hSX7v5k,3367
|
|
49
53
|
graphiti_core/utils/maintenance/utils.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
50
|
-
graphiti_core-0.3.
|
|
51
|
-
graphiti_core-0.3.
|
|
52
|
-
graphiti_core-0.3.
|
|
53
|
-
graphiti_core-0.3.
|
|
54
|
+
graphiti_core-0.3.17.dist-info/LICENSE,sha256=KCUwCyDXuVEgmDWkozHyniRyWjnWUWjkuDHfU6o3JlA,11325
|
|
55
|
+
graphiti_core-0.3.17.dist-info/METADATA,sha256=bguHVSkpKofqo_zp-R195rg64568tOKJB0iaqyeKUHg,9396
|
|
56
|
+
graphiti_core-0.3.17.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
|
57
|
+
graphiti_core-0.3.17.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|