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

@@ -36,7 +36,7 @@ class BGERerankerClient(CrossEncoderClient):
36
36
  scores = await loop.run_in_executor(None, self.model.predict, input_pairs)
37
37
 
38
38
  ranked_passages = sorted(
39
- [(passage, float(score)) for passage, score in zip(passages, scores)],
39
+ [(passage, float(score)) for passage, score in zip(passages, scores, strict=False)],
40
40
  key=lambda x: x[1],
41
41
  reverse=True,
42
42
  )
@@ -111,7 +111,7 @@ class OpenAIRerankerClient(CrossEncoderClient):
111
111
  if bool(logprob.token):
112
112
  scores.append(logprob.logprob)
113
113
 
114
- results = [(passage, score) for passage, score in zip(passages, scores)]
114
+ results = [(passage, score) for passage, score in zip(passages, scores, strict=False)]
115
115
  results.sort(reverse=True, key=lambda x: x[1])
116
116
  return results
117
117
  except openai.RateLimitError as e:
@@ -15,7 +15,6 @@ limitations under the License.
15
15
  """
16
16
 
17
17
  from collections.abc import Iterable
18
- from typing import Union
19
18
 
20
19
  from openai import AsyncAzureOpenAI, AsyncOpenAI
21
20
  from openai.types import EmbeddingModel
@@ -41,7 +40,7 @@ class OpenAIEmbedder(EmbedderClient):
41
40
  def __init__(
42
41
  self,
43
42
  config: OpenAIEmbedderConfig | None = None,
44
- client: Union[AsyncOpenAI, AsyncAzureOpenAI, None] = None,
43
+ client: AsyncOpenAI | AsyncAzureOpenAI | None = None,
45
44
  ):
46
45
  if config is None:
47
46
  config = OpenAIEmbedderConfig()
graphiti_core/graphiti.py CHANGED
@@ -451,7 +451,7 @@ class Graphiti:
451
451
  existing_edges_list: list[list[EntityEdge]] = [
452
452
  source_lst + target_lst
453
453
  for source_lst, target_lst in zip(
454
- existing_source_edges_list, existing_target_edges_list
454
+ existing_source_edges_list, existing_target_edges_list, strict=False
455
455
  )
456
456
  ]
457
457
 
@@ -36,7 +36,7 @@ logger = logging.getLogger(__name__)
36
36
 
37
37
 
38
38
  def is_server_or_retry_error(exception):
39
- if isinstance(exception, (RateLimitError, json.decoder.JSONDecodeError)):
39
+ if isinstance(exception, RateLimitError | json.decoder.JSONDecodeError):
40
40
  return True
41
41
 
42
42
  return (
@@ -15,7 +15,7 @@ limitations under the License.
15
15
  """
16
16
 
17
17
  import json
18
- from typing import Any, Optional, Protocol, TypedDict
18
+ from typing import Any, Protocol, TypedDict
19
19
 
20
20
  from pydantic import BaseModel, Field
21
21
 
@@ -24,7 +24,7 @@ from .models import Message, PromptFunction, PromptVersion
24
24
 
25
25
  class EdgeDuplicate(BaseModel):
26
26
  is_duplicate: bool = Field(..., description='true or false')
27
- uuid: Optional[str] = Field(
27
+ uuid: str | None = Field(
28
28
  None,
29
29
  description="uuid of the existing edge like '5d643020624c42fa9de13f97b1b3fa39' or null",
30
30
  )
@@ -15,7 +15,7 @@ limitations under the License.
15
15
  """
16
16
 
17
17
  import json
18
- from typing import Any, Optional, Protocol, TypedDict
18
+ from typing import Any, Protocol, TypedDict
19
19
 
20
20
  from pydantic import BaseModel, Field
21
21
 
@@ -24,7 +24,7 @@ from .models import Message, PromptFunction, PromptVersion
24
24
 
25
25
  class NodeDuplicate(BaseModel):
26
26
  is_duplicate: bool = Field(..., description='true or false')
27
- uuid: Optional[str] = Field(
27
+ uuid: str | None = Field(
28
28
  None,
29
29
  description="uuid of the existing node like '5d643020624c42fa9de13f97b1b3fa39' or null",
30
30
  )
@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
14
14
  limitations under the License.
15
15
  """
16
16
 
17
- from typing import Any, Optional, Protocol, TypedDict
17
+ from typing import Any, Protocol, TypedDict
18
18
 
19
19
  from pydantic import BaseModel, Field
20
20
 
@@ -22,11 +22,11 @@ from .models import Message, PromptFunction, PromptVersion
22
22
 
23
23
 
24
24
  class EdgeDates(BaseModel):
25
- valid_at: Optional[str] = Field(
25
+ valid_at: str | None = Field(
26
26
  None,
27
27
  description='The date and time when the relationship described by the edge fact became true or was established. YYYY-MM-DDTHH:MM:SS.SSSSSSZ or null.',
28
28
  )
29
- invalid_at: Optional[str] = Field(
29
+ invalid_at: str | None = Field(
30
30
  None,
31
31
  description='The date and time when the relationship described by the edge fact stopped being true or ended. YYYY-MM-DDTHH:MM:SS.SSSSSSZ or null.',
32
32
  )
@@ -14,7 +14,8 @@ See the License for the specific language governing permissions and
14
14
  limitations under the License.
15
15
  """
16
16
 
17
- from typing import Any, Callable, Protocol
17
+ from collections.abc import Callable
18
+ from typing import Any, Protocol
18
19
 
19
20
  from pydantic import BaseModel
20
21
 
@@ -164,7 +164,7 @@ async def build_community(
164
164
  *[
165
165
  summarize_pair(llm_client, (str(left_summary), str(right_summary)))
166
166
  for left_summary, right_summary in zip(
167
- summaries[: int(length / 2)], summaries[int(length / 2) :]
167
+ summaries[: int(length / 2)], summaries[int(length / 2) :], strict=False
168
168
  )
169
169
  ]
170
170
  )
@@ -213,7 +213,7 @@ async def resolve_extracted_edges(
213
213
  previous_episodes,
214
214
  )
215
215
  for extracted_edge, related_edges, existing_edges in zip(
216
- extracted_edges, related_edges_lists, existing_edges_lists
216
+ extracted_edges, related_edges_lists, existing_edges_lists, strict=False
217
217
  )
218
218
  ]
219
219
  )
@@ -279,7 +279,9 @@ async def resolve_extracted_nodes(
279
279
  previous_episodes,
280
280
  entity_types,
281
281
  )
282
- for extracted_node, existing_nodes in zip(extracted_nodes, existing_nodes_lists)
282
+ for extracted_node, existing_nodes in zip(
283
+ extracted_nodes, existing_nodes_lists, strict=False
284
+ )
283
285
  ]
284
286
  )
285
287
  )
@@ -1,26 +1,32 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.3
2
2
  Name: graphiti-core
3
- Version: 0.9.1
3
+ Version: 0.9.3
4
4
  Summary: A temporal graph building library
5
5
  License: Apache-2.0
6
6
  Author: Paul Paliychuk
7
7
  Author-email: paul@getzep.com
8
- Requires-Python: >=3.10,<4.0
8
+ Requires-Python: >=3.10
9
9
  Classifier: License :: OSI Approved :: Apache Software License
10
10
  Classifier: Programming Language :: Python :: 3
11
11
  Classifier: Programming Language :: Python :: 3.10
12
12
  Classifier: Programming Language :: Python :: 3.11
13
13
  Classifier: Programming Language :: Python :: 3.12
14
+ Classifier: Programming Language :: Python :: 3.13
14
15
  Provides-Extra: anthropic
15
16
  Provides-Extra: google-genai
16
17
  Provides-Extra: groq
17
- Requires-Dist: diskcache (>=5.6.3,<6.0.0)
18
- Requires-Dist: neo4j (>=5.23.0,<6.0.0)
18
+ Requires-Dist: anthropic (>=0.49.0) ; extra == "anthropic"
19
+ Requires-Dist: diskcache (>=5.6.3)
20
+ Requires-Dist: google-genai (>=1.8.0) ; extra == "google-genai"
21
+ Requires-Dist: groq (>=0.2.0) ; extra == "groq"
22
+ Requires-Dist: neo4j (>=5.23.0)
19
23
  Requires-Dist: numpy (>=1.0.0)
20
- Requires-Dist: openai (>=1.53.0,<2.0.0)
21
- Requires-Dist: pydantic (>=2.8.2,<3.0.0)
22
- Requires-Dist: python-dotenv (>=1.0.1,<2.0.0)
23
- Requires-Dist: tenacity (==9.0.0)
24
+ Requires-Dist: openai (>=1.53.0)
25
+ Requires-Dist: pydantic (>=2.8.2)
26
+ Requires-Dist: python-dotenv (>=1.0.1)
27
+ Requires-Dist: tenacity (>=9.0.0)
28
+ Project-URL: Homepage, https://help.getzep.com/graphiti/graphiti/overview
29
+ Project-URL: Repository, https://github.com/getzep/graphiti
24
30
  Description-Content-Type: text/markdown
25
31
 
26
32
  <p align="center">
@@ -286,8 +292,6 @@ graphiti = Graphiti(
286
292
  # Now you can use Graphiti with Google Gemini
287
293
  ```
288
294
 
289
- Make sure to replace the placeholder value with your actual Google API key. You can find more details in the example file at `examples/gemini_example.py`.
290
-
291
295
  ## Documentation
292
296
 
293
297
  - [Guides and API documentation](https://help.getzep.com/graphiti).
@@ -1,20 +1,20 @@
1
1
  graphiti_core/__init__.py,sha256=e5SWFkRiaUwfprYIeIgVIh7JDedNiloZvd3roU-0aDY,55
2
2
  graphiti_core/cross_encoder/__init__.py,sha256=hry59vz21x-AtGZ0MJ7ugw0HTwJkXiddpp_Yqnwsen0,723
3
- graphiti_core/cross_encoder/bge_reranker_client.py,sha256=xgXZqB_qoaWQPjnmuf1ne38YPyhhvApySKcQDaHc9R4,1435
3
+ graphiti_core/cross_encoder/bge_reranker_client.py,sha256=sY7RKsCp90vTjYxv6vmIHT4p3oCsFCRYWH-H0Ia0vN0,1449
4
4
  graphiti_core/cross_encoder/client.py,sha256=KLsbfWKOEaAV3adFe3XZlAeb-gje9_sVKCVZTaJP3ac,1441
5
- graphiti_core/cross_encoder/openai_reranker_client.py,sha256=e-QCftckZ7GLQgJ-ijljw6vzVa6H417cZ3cISB70M5g,4377
5
+ graphiti_core/cross_encoder/openai_reranker_client.py,sha256=y-nTd9zjRR3OZHmxJcJntU2BrbCukfL1OYoH-M-xkdE,4391
6
6
  graphiti_core/edges.py,sha256=-D7Q6xXh9lut6Y0Yhzc9nVbWUYuoNCZzAhmkQfrCvzY,15597
7
7
  graphiti_core/embedder/__init__.py,sha256=EL564ZuE-DZjcuKNUK_exMn_XHXm2LdO9fzdXePVKL4,179
8
8
  graphiti_core/embedder/client.py,sha256=HKIlpPLnzFT81jurPkry6z8F8nxfZVfejdcfxHVUSFU,995
9
9
  graphiti_core/embedder/gemini.py,sha256=nE0XH8wYVGcPSO7DaNQ7kdsQLFSoH4FQOu2HMQUy2ss,2200
10
- graphiti_core/embedder/openai.py,sha256=23BnPA10eiaa1HkxHKYSj75-0PymczPK2FNNIz8Txbc,1910
10
+ graphiti_core/embedder/openai.py,sha256=fcU63koSRI-OjDuEcBfUKgXu8XV_-8EF6HpVrYa1_8I,1880
11
11
  graphiti_core/embedder/voyage.py,sha256=7kqrLG75J3Q6cdA2Nlx1JSYtpk2141ckdl3OtDDw0vU,1882
12
12
  graphiti_core/errors.py,sha256=Nib1uQx2cO_VOizupmRjpFfmuRg-hFAVqTtZAuBehR8,2405
13
- graphiti_core/graphiti.py,sha256=hygm_1MPbi4jlAplAoLjrzC_45_0VKcIrZ3ll3Fi3bo,29712
13
+ graphiti_core/graphiti.py,sha256=Jztk1PGsr15FkJhf-mFYgFGF40tTMQHPUq96kdWz6c8,29726
14
14
  graphiti_core/helpers.py,sha256=7BQzUBFmoBDA2OIDdFtoN4W-vXOhPRIsF0uDb7PsNi0,2913
15
15
  graphiti_core/llm_client/__init__.py,sha256=PA80TSMeX-sUXITXEAxMDEt3gtfZgcJrGJUcyds1mSo,207
16
16
  graphiti_core/llm_client/anthropic_client.py,sha256=dTM8rKhk9TZAU4O-0jFMivOwJvWM-gHpp5gLmuJHiGQ,2723
17
- graphiti_core/llm_client/client.py,sha256=sqtdkySL_QnlZUyMhLvtbSPzGI1y8Ryq5a0IqOPZ2Ps,5252
17
+ graphiti_core/llm_client/client.py,sha256=Ma6-13JK3OYw9oFab2Dsqm-rR8VWMzQQAp5cW7o5FH8,5251
18
18
  graphiti_core/llm_client/config.py,sha256=PxbjQWNjYQJKA7Pws28jJ0TsSZijOUds8GD9Yvu7xUE,2338
19
19
  graphiti_core/llm_client/errors.py,sha256=Vk0mj2SgNDg8E8p7m1UyUaerqLPNLCDKPVsMEnOSBdQ,1028
20
20
  graphiti_core/llm_client/gemini_client.py,sha256=uibmwppDgkEv60FsIhS-oakuafTUFgpu3qr5Kdcbhz4,7321
@@ -29,15 +29,15 @@ graphiti_core/models/nodes/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJ
29
29
  graphiti_core/models/nodes/node_db_queries.py,sha256=AQgRGVO-GgFWfLq1G6k8s86WItwpXruy3Mj4DBli-vM,2145
30
30
  graphiti_core/nodes.py,sha256=L_sAXuS-Hbj1I_kmln_y3dBiu_UDMKu64oWTB3ecFss,16938
31
31
  graphiti_core/prompts/__init__.py,sha256=EA-x9xUki9l8wnu2l8ek_oNf75-do5tq5hVq7Zbv8Kw,101
32
- graphiti_core/prompts/dedupe_edges.py,sha256=EuX8ngeItBzrlMBOgeHrpExzxIFHD2aoDyaX1ZniF6I,3556
33
- graphiti_core/prompts/dedupe_nodes.py,sha256=1MHYuqi-eXPnTQd_jEcVKfljSC_F_r5SdVRm_dpdOiI,4645
32
+ graphiti_core/prompts/dedupe_edges.py,sha256=GrLKEHPrEsjK31wQf7AnMJDXaVCrCuJWaNlVAxEd4ks,3543
33
+ graphiti_core/prompts/dedupe_nodes.py,sha256=YTJPsbeldHDVbBG1p9JTRZMKQxXa72EZl44YUL9gkbs,4632
34
34
  graphiti_core/prompts/eval.py,sha256=csW494kKBMvWSm2SYLIRuGgNghhwNR3YwGn3veo3g_Y,3691
35
- graphiti_core/prompts/extract_edge_dates.py,sha256=td2yx2wnX-nLioMa0mtla3WcRyO71_wSjemT79YZGQ0,4096
35
+ graphiti_core/prompts/extract_edge_dates.py,sha256=hcQ2rUyrshExIlTWxg8RNeso3FOPRlKZ27_TcqcXDh8,4080
36
36
  graphiti_core/prompts/extract_edges.py,sha256=vyEdW7JAPOT_eLWUi6nRmxbvucyVoyoYX2SxXfknRUg,3467
37
37
  graphiti_core/prompts/extract_nodes.py,sha256=fSi07hGnlo7L5t9c0Q5zcBxDSki7QQKWhex9DFsVWW8,7048
38
38
  graphiti_core/prompts/invalidate_edges.py,sha256=DV2mEyIhhjc0hdKEMFLQMeG0FiUCkv_X0ctCliYjQ2c,3577
39
39
  graphiti_core/prompts/lib.py,sha256=DCyHePM4_q-CptTpEXGO_dBv9k7xDtclEaB1dGu7EcI,4092
40
- graphiti_core/prompts/models.py,sha256=cvx_Bv5RMFUD_5IUawYrbpOKLPHogai7_bm7YXrSz84,867
40
+ graphiti_core/prompts/models.py,sha256=NgxdbPHJpBEcpbXovKyScgpBc73Q-GIW-CBDlBtDjto,894
41
41
  graphiti_core/prompts/prompt_helpers.py,sha256=-9TABwIcIQUVHcNANx6wIZd-FT2DgYKyGTfx4IGYq2I,64
42
42
  graphiti_core/prompts/summarize_nodes.py,sha256=PeA1Taov5KBNNBKgrCPeF1tLg4_SMgT-Ilz2P6xbx-M,4051
43
43
  graphiti_core/py.typed,sha256=vlmmzQOt7bmeQl9L3XJP4W6Ry0iiELepnOrinKz5KQg,79
@@ -51,14 +51,14 @@ graphiti_core/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSu
51
51
  graphiti_core/utils/bulk_utils.py,sha256=P4LKO46Yle4tBdNcQ3hDHcSQFaR8UBLfoL-z1M2Wua0,14690
52
52
  graphiti_core/utils/datetime_utils.py,sha256=Ti-2tnrDFRzBsbfblzsHybsM3jaDLP4-VT2t0VhpIzU,1357
53
53
  graphiti_core/utils/maintenance/__init__.py,sha256=vW4H1KyapTl-OOz578uZABYcpND4wPx3Vt6aAPaXh78,301
54
- graphiti_core/utils/maintenance/community_operations.py,sha256=KV5TmpQoBLHDAE5BatUPdzjWYr-DG3ypfXKgbZUMSAA,9994
55
- graphiti_core/utils/maintenance/edge_operations.py,sha256=tNw56vN586JYZMgie6RLRTiHZ680-kWzDIxW8ucL6SU,12780
54
+ graphiti_core/utils/maintenance/community_operations.py,sha256=pQUv0pfInC1Pho7C4BN8gC3_bks7wRAZpJn2bmw6gT8,10008
55
+ graphiti_core/utils/maintenance/edge_operations.py,sha256=9i0PBgaW3dLPTLmx-9j1W86Rb4sPc1bG4Y3TjPn07Gg,12794
56
56
  graphiti_core/utils/maintenance/graph_data_operations.py,sha256=UJlIAawswJ7eO70oS5ueX-zjGHSaTWLsMbeYje67WTY,6895
57
- graphiti_core/utils/maintenance/node_operations.py,sha256=gtc5EhEUqC57VPBMOLsRFsJITyM2Sxsn0fJ99JMBWio,15504
57
+ graphiti_core/utils/maintenance/node_operations.py,sha256=WhZQixx05dAFFQAd5KTXJ8Gc8YCahCAAW9uPCucjyBw,15556
58
58
  graphiti_core/utils/maintenance/temporal_operations.py,sha256=RdNtubCyYhOVrvcOIq2WppHls1Q-BEjtsN8r38l-Rtc,3691
59
59
  graphiti_core/utils/maintenance/utils.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
60
60
  graphiti_core/utils/ontology_utils/entity_types_utils.py,sha256=QJX5cG0GSSNF_Mm_yrldr69wjVAbN_MxLhOSznz85Hk,1279
61
- graphiti_core-0.9.1.dist-info/LICENSE,sha256=KCUwCyDXuVEgmDWkozHyniRyWjnWUWjkuDHfU6o3JlA,11325
62
- graphiti_core-0.9.1.dist-info/METADATA,sha256=9BDAF1CUprJ05Wz3DNd-NU0HVvSXYHo_aO89yZYu994,14064
63
- graphiti_core-0.9.1.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
64
- graphiti_core-0.9.1.dist-info/RECORD,,
61
+ graphiti_core-0.9.3.dist-info/LICENSE,sha256=KCUwCyDXuVEgmDWkozHyniRyWjnWUWjkuDHfU6o3JlA,11325
62
+ graphiti_core-0.9.3.dist-info/METADATA,sha256=Aa5QrNkSRsXnuYShlNnCi3L83ySgNABW4QgCZQ2coG4,14224
63
+ graphiti_core-0.9.3.dist-info/WHEEL,sha256=fGIA9gx4Qxk2KDKeNJCbOEwSrmLtjWCwzBz351GyrPQ,88
64
+ graphiti_core-0.9.3.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: poetry-core 1.9.0
2
+ Generator: poetry-core 2.1.2
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any