graphiti-core 0.11.6rc6__py3-none-any.whl → 0.11.6rc7__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.

@@ -458,14 +458,10 @@ async def community_search(
458
458
  config.mmr_lambda,
459
459
  )
460
460
  elif config.reranker == CommunityReranker.cross_encoder:
461
- summary_to_uuid_map = {
462
- node.summary: node.uuid for result in search_results for node in result
463
- }
464
- reranked_summaries = await cross_encoder.rank(query, list(summary_to_uuid_map.keys()))
461
+ name_to_uuid_map = {node.name: node.uuid for result in search_results for node in result}
462
+ reranked_nodes = await cross_encoder.rank(query, list(name_to_uuid_map.keys()))
465
463
  reranked_uuids = [
466
- summary_to_uuid_map[fact]
467
- for fact, score in reranked_summaries
468
- if score >= reranker_min_score
464
+ name_to_uuid_map[name] for name, score in reranked_nodes if score >= reranker_min_score
469
465
  ]
470
466
 
471
467
  reranked_communities = [community_uuid_map[uuid] for uuid in reranked_uuids]
@@ -18,6 +18,7 @@ import logging
18
18
  from contextlib import suppress
19
19
  from time import time
20
20
  from typing import Any
21
+ from uuid import uuid4
21
22
 
22
23
  import pydantic
23
24
  from pydantic import BaseModel, Field
@@ -395,7 +396,8 @@ async def extract_attributes_from_node(
395
396
  Field(description=field_info.description),
396
397
  )
397
398
 
398
- entity_attributes_model = pydantic.create_model('EntityAttributes', **attributes_definitions)
399
+ unique_model_name = f'EntityAttributes_{uuid4().hex}'
400
+ entity_attributes_model = pydantic.create_model(unique_model_name, **attributes_definitions)
399
401
 
400
402
  summary_context: dict[str, Any] = {
401
403
  'node': node_context,
@@ -411,12 +413,10 @@ async def extract_attributes_from_node(
411
413
  )
412
414
 
413
415
  node.summary = llm_response.get('summary', node.summary)
414
- node.name = llm_response.get('name', node.name)
415
416
  node_attributes = {key: value for key, value in llm_response.items()}
416
417
 
417
418
  with suppress(KeyError):
418
419
  del node_attributes['summary']
419
- del node_attributes['name']
420
420
 
421
421
  node.attributes.update(node_attributes)
422
422
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: graphiti-core
3
- Version: 0.11.6rc6
3
+ Version: 0.11.6rc7
4
4
  Summary: A temporal graph building library
5
5
  License: Apache-2.0
6
6
  Author: Paul Paliychuk
@@ -43,7 +43,7 @@ graphiti_core/prompts/prompt_helpers.py,sha256=-9TABwIcIQUVHcNANx6wIZd-FT2DgYKyG
43
43
  graphiti_core/prompts/summarize_nodes.py,sha256=tbg-AgWlzgFBeImKkZ28h2SpmqfPPqvN2Ol1Q71VF9Y,4146
44
44
  graphiti_core/py.typed,sha256=vlmmzQOt7bmeQl9L3XJP4W6Ry0iiELepnOrinKz5KQg,79
45
45
  graphiti_core/search/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
46
- graphiti_core/search/search.py,sha256=coBT4SItmkmvtYqF6WPwXLgAA_8dk34bGWEV_X4N5fE,16275
46
+ graphiti_core/search/search.py,sha256=0VTvRNncQIfavhOBYl4p1A9Ielzb3eieKvrhz7Ka_SE,16209
47
47
  graphiti_core/search/search_config.py,sha256=VvKg6AB_RPhoe56DBBXHRBXHThAVJ_OLFCyq_yKof-A,3765
48
48
  graphiti_core/search/search_config_recipes.py,sha256=4GquRphHhJlpXQhAZOySYnCzBWYoTwxlJj44eTOavZQ,7443
49
49
  graphiti_core/search/search_filters.py,sha256=JkP7NbM4Dor27dne5vAuxbJic12dIJDtWJxNqmVuRec,5884
@@ -56,11 +56,11 @@ graphiti_core/utils/maintenance/__init__.py,sha256=vW4H1KyapTl-OOz578uZABYcpND4w
56
56
  graphiti_core/utils/maintenance/community_operations.py,sha256=TF-4eHuvMe_jMqvWg3swxK80zLLtOR0t1pmUUQlNulM,10067
57
57
  graphiti_core/utils/maintenance/edge_operations.py,sha256=vjeCUt_WlKZ3SRIIgaF9pqc8Na6ajLOzUIo2pWo7NyU,14756
58
58
  graphiti_core/utils/maintenance/graph_data_operations.py,sha256=BIJKc8tbvU4IjWxLgeotw57b1eE3Iw8YtV74j6eo4RQ,7493
59
- graphiti_core/utils/maintenance/node_operations.py,sha256=VMiDrzXryUV7-_btDVw87K3OawYeC9-9UqNQbfC5Bbo,15316
59
+ graphiti_core/utils/maintenance/node_operations.py,sha256=-gHQH2_jaAg6XYH33tC5Pna1B4VcGHyPTpaK0NY3xow,15308
60
60
  graphiti_core/utils/maintenance/temporal_operations.py,sha256=mJkw9xLB4W2BsLfC5POr0r-PHWL9SIfNj_l_xu0B5ug,3410
61
61
  graphiti_core/utils/maintenance/utils.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
62
62
  graphiti_core/utils/ontology_utils/entity_types_utils.py,sha256=QJX5cG0GSSNF_Mm_yrldr69wjVAbN_MxLhOSznz85Hk,1279
63
- graphiti_core-0.11.6rc6.dist-info/LICENSE,sha256=KCUwCyDXuVEgmDWkozHyniRyWjnWUWjkuDHfU6o3JlA,11325
64
- graphiti_core-0.11.6rc6.dist-info/METADATA,sha256=kpR2OKGYOpTt1EnVoD6cWhLOI0vXOGyWdeY9JgjQn7g,15301
65
- graphiti_core-0.11.6rc6.dist-info/WHEEL,sha256=fGIA9gx4Qxk2KDKeNJCbOEwSrmLtjWCwzBz351GyrPQ,88
66
- graphiti_core-0.11.6rc6.dist-info/RECORD,,
63
+ graphiti_core-0.11.6rc7.dist-info/LICENSE,sha256=KCUwCyDXuVEgmDWkozHyniRyWjnWUWjkuDHfU6o3JlA,11325
64
+ graphiti_core-0.11.6rc7.dist-info/METADATA,sha256=Cni7Rvx1hdKkfI7590--qjIR8YA3Ht4yN71H0sNqeSw,15301
65
+ graphiti_core-0.11.6rc7.dist-info/WHEEL,sha256=fGIA9gx4Qxk2KDKeNJCbOEwSrmLtjWCwzBz351GyrPQ,88
66
+ graphiti_core-0.11.6rc7.dist-info/RECORD,,