graphiti-core 0.6.0__py3-none-any.whl → 0.6.1__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/graphiti.py CHANGED
@@ -724,7 +724,7 @@ class Graphiti:
724
724
  if edge.fact_embedding is None:
725
725
  await edge.generate_embedding(self.embedder)
726
726
 
727
- resolved_nodes, _ = await resolve_extracted_nodes(
727
+ resolved_nodes, uuid_map = await resolve_extracted_nodes(
728
728
  self.llm_client,
729
729
  [source_node, target_node],
730
730
  [
@@ -733,14 +733,16 @@ class Graphiti:
733
733
  ],
734
734
  )
735
735
 
736
+ updated_edge = resolve_edge_pointers([edge], uuid_map)[0]
737
+
736
738
  related_edges = await get_relevant_edges(
737
739
  self.driver,
738
- [edge],
740
+ [updated_edge],
739
741
  source_node_uuid=resolved_nodes[0].uuid,
740
742
  target_node_uuid=resolved_nodes[1].uuid,
741
743
  )
742
744
 
743
- resolved_edge = await dedupe_extracted_edge(self.llm_client, edge, related_edges)
745
+ resolved_edge = await dedupe_extracted_edge(self.llm_client, updated_edge, related_edges)
744
746
 
745
747
  contradicting_edges = await get_edge_contradictions(self.llm_client, edge, related_edges)
746
748
  invalidated_edges = resolve_edge_contradictions(resolved_edge, contradicting_edges)
@@ -79,8 +79,8 @@ def summarize_context(context: dict[str, Any]) -> list[Message]:
79
79
  {json.dumps(context['episode_content'], indent=2)}
80
80
  </MESSAGES>
81
81
 
82
- Given the above MESSAGES and the following ENTITY name, create a summary for the ENTITY. Your summary must only use
83
- information from the provided MESSAGES. Your summary should also only contain information relevant to the
82
+ Given the above MESSAGES and the following ENTITY name and ENTITY CONTEXT, create a summary for the ENTITY. Your summary must only use
83
+ information from the provided MESSAGES and from the ENTITY CONTEXT. Your summary should also only contain information relevant to the
84
84
  provided ENTITY.
85
85
 
86
86
  Summaries must be under 500 words.
@@ -88,6 +88,9 @@ def summarize_context(context: dict[str, Any]) -> list[Message]:
88
88
  <ENTITY>
89
89
  {context['node_name']}
90
90
  </ENTITY>
91
+ <ENTITY CONTEXT>
92
+ {context['node_summary']}
93
+ </ENTITY CONTEXT>
91
94
  """,
92
95
  ),
93
96
  ]
@@ -268,6 +268,7 @@ async def resolve_extracted_node(
268
268
 
269
269
  summary_context = {
270
270
  'node_name': extracted_node.name,
271
+ 'node_summary': extracted_node.summary,
271
272
  'episode_content': episode.content if episode is not None else '',
272
273
  'previous_episodes': [ep.content for ep in previous_episodes]
273
274
  if previous_episodes is not None
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: graphiti-core
3
- Version: 0.6.0
3
+ Version: 0.6.1
4
4
  Summary: A temporal graph building library
5
5
  License: Apache-2.0
6
6
  Author: Paul Paliychuk
@@ -9,7 +9,7 @@ graphiti_core/embedder/client.py,sha256=HKIlpPLnzFT81jurPkry6z8F8nxfZVfejdcfxHVU
9
9
  graphiti_core/embedder/openai.py,sha256=FzEM9rtSDK1wTb4iYKjNjjdFf8BEBTDxG2vM_E-5W-8,1621
10
10
  graphiti_core/embedder/voyage.py,sha256=7kqrLG75J3Q6cdA2Nlx1JSYtpk2141ckdl3OtDDw0vU,1882
11
11
  graphiti_core/errors.py,sha256=ddHrHGQxhwkVAtSph4AV84UoOlgwZufMczXPwB7uqPo,1795
12
- graphiti_core/graphiti.py,sha256=QN4YnAfpFPy6Cj5XCdab63yzgAHl-wGAEdVo2xwLxQU,28884
12
+ graphiti_core/graphiti.py,sha256=IaQ2xUM3Z1BG7ByJpznRAdg3FWtcOuIOq9YkY_JfiLE,28974
13
13
  graphiti_core/helpers.py,sha256=z7ApOgrm_J7hk5FN_XPAwkKyopEY943BgHjDJbSXr2s,2869
14
14
  graphiti_core/llm_client/__init__.py,sha256=PA80TSMeX-sUXITXEAxMDEt3gtfZgcJrGJUcyds1mSo,207
15
15
  graphiti_core/llm_client/anthropic_client.py,sha256=RlD6e49XvMJsTKU0krpq46gPSFm6-hfLkkq4Sfx27BE,2574
@@ -37,7 +37,7 @@ graphiti_core/prompts/invalidate_edges.py,sha256=DV2mEyIhhjc0hdKEMFLQMeG0FiUCkv_
37
37
  graphiti_core/prompts/lib.py,sha256=oxhlpGEgV15VOLEZiwirxmIJBIdfzfiyL58iyzFDskE,4254
38
38
  graphiti_core/prompts/models.py,sha256=cvx_Bv5RMFUD_5IUawYrbpOKLPHogai7_bm7YXrSz84,867
39
39
  graphiti_core/prompts/prompt_helpers.py,sha256=-9TABwIcIQUVHcNANx6wIZd-FT2DgYKyGTfx4IGYq2I,64
40
- graphiti_core/prompts/summarize_nodes.py,sha256=5J_IONG7fHYiQZWnCaUyw7w2zunEaN7V89nEluRP-qY,3461
40
+ graphiti_core/prompts/summarize_nodes.py,sha256=XOJykwT7LtzWk2bRquFgv4tRAU3JOkkNkWBg-mkYOKc,3593
41
41
  graphiti_core/py.typed,sha256=vlmmzQOt7bmeQl9L3XJP4W6Ry0iiELepnOrinKz5KQg,79
42
42
  graphiti_core/search/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
43
43
  graphiti_core/search/search.py,sha256=4DaeP5aRT7ZOByDO3H5UK0edxfwQ4mzAOdFjnjwaDJs,12454
@@ -52,10 +52,10 @@ graphiti_core/utils/maintenance/__init__.py,sha256=TRY3wWWu5kn3Oahk_KKhltrWnh0NA
52
52
  graphiti_core/utils/maintenance/community_operations.py,sha256=gIw1M5HGgc2c3TXag5ygPPpAv5WsG-yoC8Lhmfr6FMs,10011
53
53
  graphiti_core/utils/maintenance/edge_operations.py,sha256=tNw56vN586JYZMgie6RLRTiHZ680-kWzDIxW8ucL6SU,12780
54
54
  graphiti_core/utils/maintenance/graph_data_operations.py,sha256=qds9ALk9PhpQs1CNZTZGpi70mqJ93Y2KhIh9X2r8MUI,6533
55
- graphiti_core/utils/maintenance/node_operations.py,sha256=A-6H2ohqcGJRA_sg_-0m_AA7syiP_gVBsyY7VTTbfuA,12036
55
+ graphiti_core/utils/maintenance/node_operations.py,sha256=lrlp27clVhWrxy2BxofTjIISZpwqNG12evHO5wNwOY8,12084
56
56
  graphiti_core/utils/maintenance/temporal_operations.py,sha256=RdNtubCyYhOVrvcOIq2WppHls1Q-BEjtsN8r38l-Rtc,3691
57
57
  graphiti_core/utils/maintenance/utils.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
58
- graphiti_core-0.6.0.dist-info/LICENSE,sha256=KCUwCyDXuVEgmDWkozHyniRyWjnWUWjkuDHfU6o3JlA,11325
59
- graphiti_core-0.6.0.dist-info/METADATA,sha256=y9SsrlB4L8EVV0G9xYn39WenebenJFnlBvX_jikVh04,10242
60
- graphiti_core-0.6.0.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
61
- graphiti_core-0.6.0.dist-info/RECORD,,
58
+ graphiti_core-0.6.1.dist-info/LICENSE,sha256=KCUwCyDXuVEgmDWkozHyniRyWjnWUWjkuDHfU6o3JlA,11325
59
+ graphiti_core-0.6.1.dist-info/METADATA,sha256=T7rqCclsf8c92WTRWiYXFzWpQR36gy3whh_w-uXWjvA,10242
60
+ graphiti_core-0.6.1.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
61
+ graphiti_core-0.6.1.dist-info/RECORD,,