graphiti-core 0.8.3__py3-none-any.whl → 0.8.4__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/edges.py CHANGED
@@ -26,7 +26,7 @@ from pydantic import BaseModel, Field
26
26
  from typing_extensions import LiteralString
27
27
 
28
28
  from graphiti_core.embedder import EmbedderClient
29
- from graphiti_core.errors import EdgeNotFoundError, GroupsEdgesNotFoundError
29
+ from graphiti_core.errors import EdgeNotFoundError, EdgesNotFoundError, GroupsEdgesNotFoundError
30
30
  from graphiti_core.helpers import DEFAULT_DATABASE, parse_db_date
31
31
  from graphiti_core.models.edges.edge_db_queries import (
32
32
  COMMUNITY_EDGE_SAVE,
@@ -261,6 +261,9 @@ class EntityEdge(Edge):
261
261
 
262
262
  @classmethod
263
263
  async def get_by_uuids(cls, driver: AsyncDriver, uuids: list[str]):
264
+ if len(uuids) == 0:
265
+ return []
266
+
264
267
  records, _, _ = await driver.execute_query(
265
268
  """
266
269
  MATCH (n:Entity)-[e:RELATES_TO]->(m:Entity)
@@ -287,7 +290,7 @@ class EntityEdge(Edge):
287
290
  edges = [get_entity_edge_from_record(record) for record in records]
288
291
 
289
292
  if len(edges) == 0:
290
- raise EdgeNotFoundError(uuids[0])
293
+ raise EdgesNotFoundError(uuids)
291
294
  return edges
292
295
 
293
296
  @classmethod
graphiti_core/errors.py CHANGED
@@ -27,6 +27,14 @@ class EdgeNotFoundError(GraphitiError):
27
27
  super().__init__(self.message)
28
28
 
29
29
 
30
+ class EdgesNotFoundError(GraphitiError):
31
+ """Raised when a list of edges is not found."""
32
+
33
+ def __init__(self, uuids: list[str]):
34
+ self.message = f'None of the edges for {uuids} were found.'
35
+ super().__init__(self.message)
36
+
37
+
30
38
  class GroupsEdgesNotFoundError(GraphitiError):
31
39
  """Raised when no edges are found for a list of group ids."""
32
40
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: graphiti-core
3
- Version: 0.8.3
3
+ Version: 0.8.4
4
4
  Summary: A temporal graph building library
5
5
  License: Apache-2.0
6
6
  Author: Paul Paliychuk
@@ -3,12 +3,12 @@ graphiti_core/cross_encoder/__init__.py,sha256=hry59vz21x-AtGZ0MJ7ugw0HTwJkXiddp
3
3
  graphiti_core/cross_encoder/bge_reranker_client.py,sha256=xgXZqB_qoaWQPjnmuf1ne38YPyhhvApySKcQDaHc9R4,1435
4
4
  graphiti_core/cross_encoder/client.py,sha256=KLsbfWKOEaAV3adFe3XZlAeb-gje9_sVKCVZTaJP3ac,1441
5
5
  graphiti_core/cross_encoder/openai_reranker_client.py,sha256=e-QCftckZ7GLQgJ-ijljw6vzVa6H417cZ3cISB70M5g,4377
6
- graphiti_core/edges.py,sha256=WXJcJp4fhdlgL4sAsh3YBqkMRAvHKmmaC_7uCPLzePI,15680
6
+ graphiti_core/edges.py,sha256=aopSSb3vG260TlW5DbbjlCosmgN6fty8guVdcQMudQo,15749
7
7
  graphiti_core/embedder/__init__.py,sha256=eWd-0sPxflnYXLoWNT9sxwCIFun5JNO9Fk4E-ZXXf8Y,164
8
8
  graphiti_core/embedder/client.py,sha256=HKIlpPLnzFT81jurPkry6z8F8nxfZVfejdcfxHVUSFU,995
9
9
  graphiti_core/embedder/openai.py,sha256=23BnPA10eiaa1HkxHKYSj75-0PymczPK2FNNIz8Txbc,1910
10
10
  graphiti_core/embedder/voyage.py,sha256=7kqrLG75J3Q6cdA2Nlx1JSYtpk2141ckdl3OtDDw0vU,1882
11
- graphiti_core/errors.py,sha256=ddHrHGQxhwkVAtSph4AV84UoOlgwZufMczXPwB7uqPo,1795
11
+ graphiti_core/errors.py,sha256=cSOXXkydihNd6OHXzkwJvciRmR7EoFMq57AzUYVg0gc,2040
12
12
  graphiti_core/graphiti.py,sha256=DP2hd1aXIYh-nXVfxugHvw7Tbax50w83IKMZf9Z5BeI,29128
13
13
  graphiti_core/helpers.py,sha256=7BQzUBFmoBDA2OIDdFtoN4W-vXOhPRIsF0uDb7PsNi0,2913
14
14
  graphiti_core/llm_client/__init__.py,sha256=PA80TSMeX-sUXITXEAxMDEt3gtfZgcJrGJUcyds1mSo,207
@@ -55,7 +55,7 @@ graphiti_core/utils/maintenance/graph_data_operations.py,sha256=qds9ALk9PhpQs1CN
55
55
  graphiti_core/utils/maintenance/node_operations.py,sha256=KR8pbQJm8ZyTlQp3sT9kKK7hZaAJ07ZM2Z9Pu7EKZts,15390
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.8.3.dist-info/LICENSE,sha256=KCUwCyDXuVEgmDWkozHyniRyWjnWUWjkuDHfU6o3JlA,11325
59
- graphiti_core-0.8.3.dist-info/METADATA,sha256=HL5XQrF5-Rva-pVEGcQjwTg97PaB3LpmV0zaUpIRTvo,14351
60
- graphiti_core-0.8.3.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
61
- graphiti_core-0.8.3.dist-info/RECORD,,
58
+ graphiti_core-0.8.4.dist-info/LICENSE,sha256=KCUwCyDXuVEgmDWkozHyniRyWjnWUWjkuDHfU6o3JlA,11325
59
+ graphiti_core-0.8.4.dist-info/METADATA,sha256=keHu8L-gbL0gAzbpqfdRaSXDgZPF8cuvTpfMKrP5LoU,14351
60
+ graphiti_core-0.8.4.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
61
+ graphiti_core-0.8.4.dist-info/RECORD,,