graphiti-core 0.8.3__py3-none-any.whl → 0.8.5__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 +3 -2
- graphiti_core/errors.py +8 -0
- graphiti_core/utils/maintenance/node_operations.py +6 -1
- {graphiti_core-0.8.3.dist-info → graphiti_core-0.8.5.dist-info}/METADATA +1 -1
- {graphiti_core-0.8.3.dist-info → graphiti_core-0.8.5.dist-info}/RECORD +7 -7
- {graphiti_core-0.8.3.dist-info → graphiti_core-0.8.5.dist-info}/LICENSE +0 -0
- {graphiti_core-0.8.3.dist-info → graphiti_core-0.8.5.dist-info}/WHEEL +0 -0
graphiti_core/edges.py
CHANGED
|
@@ -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)
|
|
@@ -286,8 +289,6 @@ class EntityEdge(Edge):
|
|
|
286
289
|
|
|
287
290
|
edges = [get_entity_edge_from_record(record) for record in records]
|
|
288
291
|
|
|
289
|
-
if len(edges) == 0:
|
|
290
|
-
raise EdgeNotFoundError(uuids[0])
|
|
291
292
|
return edges
|
|
292
293
|
|
|
293
294
|
@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
|
|
|
@@ -15,6 +15,7 @@ limitations under the License.
|
|
|
15
15
|
"""
|
|
16
16
|
|
|
17
17
|
import logging
|
|
18
|
+
from contextlib import suppress
|
|
18
19
|
from time import time
|
|
19
20
|
|
|
20
21
|
import pydantic
|
|
@@ -365,9 +366,13 @@ async def resolve_extracted_node(
|
|
|
365
366
|
|
|
366
367
|
extracted_node.summary = node_attributes_response.get('summary', '')
|
|
367
368
|
node_attributes = {
|
|
368
|
-
key: value if value != 'None'
|
|
369
|
+
key: value if (value != 'None' or key == 'summary') else None
|
|
370
|
+
for key, value in node_attributes_response.items()
|
|
369
371
|
}
|
|
370
372
|
|
|
373
|
+
with suppress(KeyError):
|
|
374
|
+
del node_attributes['summary']
|
|
375
|
+
|
|
371
376
|
extracted_node.attributes.update(node_attributes)
|
|
372
377
|
|
|
373
378
|
is_duplicate: bool = llm_response.get('is_duplicate', False)
|
|
@@ -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=
|
|
6
|
+
graphiti_core/edges.py,sha256=pVaQUmxUH7ZwETdaTaoBsmmd5MMis1v7L-0tHBzUuHc,15657
|
|
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=
|
|
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
|
|
@@ -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=
|
|
55
|
+
graphiti_core/utils/maintenance/node_operations.py,sha256=yo5Qt7i5WN3J3rB_9RJ0TJ1ZG1cGFWUKGrktMDwmXyE,15521
|
|
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.
|
|
59
|
-
graphiti_core-0.8.
|
|
60
|
-
graphiti_core-0.8.
|
|
61
|
-
graphiti_core-0.8.
|
|
58
|
+
graphiti_core-0.8.5.dist-info/LICENSE,sha256=KCUwCyDXuVEgmDWkozHyniRyWjnWUWjkuDHfU6o3JlA,11325
|
|
59
|
+
graphiti_core-0.8.5.dist-info/METADATA,sha256=-2u5m8EU4at5d_knjbibnV2rSWWaoJ_QmYgkZeE5bv4,14351
|
|
60
|
+
graphiti_core-0.8.5.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
|
61
|
+
graphiti_core-0.8.5.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|