lionagi 0.14.10__py3-none-any.whl → 0.14.11__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.
@@ -2,8 +2,9 @@ from __future__ import annotations
2
2
 
3
3
  import asyncio
4
4
  import functools
5
+ from collections.abc import Callable
5
6
  from time import sleep, time
6
- from typing import Any, Callable, TypeVar
7
+ from typing import Any, TypeVar
7
8
 
8
9
  T = TypeVar("T")
9
10
 
@@ -28,7 +28,9 @@ logger = logging.getLogger("operation")
28
28
  class Operation(Node, Event):
29
29
  operation: BranchOperations
30
30
  parameters: dict[str, Any] | BaseModel = Field(
31
- default_factory=dict, description="Parameters for the operation"
31
+ default_factory=dict,
32
+ description="Parameters for the operation",
33
+ exclude=True,
32
34
  )
33
35
 
34
36
  @property
@@ -5,7 +5,7 @@
5
5
  from collections import deque
6
6
  from typing import Any, Literal
7
7
 
8
- from pydantic import Field, model_validator
8
+ from pydantic import Field, field_serializer, field_validator, model_validator
9
9
  from typing_extensions import Self
10
10
 
11
11
  from lionagi._errors import ItemExistsError, RelationError
@@ -47,6 +47,18 @@ class Graph(Element, Relational):
47
47
  self.node_edge_mapping[edge.tail]["in"][edge.id] = edge.head
48
48
  return self
49
49
 
50
+ @field_serializer("internal_nodes", "internal_edges")
51
+ def _serialize_nodes_edges(self, value: Pile):
52
+ """
53
+ Serialize the internal nodes and edges to a dictionary format.
54
+ This is used for serialization purposes.
55
+ """
56
+ return value.to_dict()
57
+
58
+ @field_validator("internal_nodes", "internal_edges", mode="before")
59
+ def _deserialize_nodes_edges(cls, value: Any):
60
+ return Pile.from_dict(value)
61
+
50
62
  def add_node(self, node: Relational) -> None:
51
63
  """Add a node to the graph."""
52
64
  if not isinstance(node, Relational):
lionagi/version.py CHANGED
@@ -1 +1 @@
1
- __version__ = "0.14.10"
1
+ __version__ = "0.14.11"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: lionagi
3
- Version: 0.14.10
3
+ Version: 0.14.11
4
4
  Summary: An Intelligence Operating System.
5
5
  Author-email: HaiyangLi <quantocean.li@gmail.com>, Liangbingyan Luo <llby_luo@outlook.com>
6
6
  License: Apache License
@@ -6,7 +6,7 @@ lionagi/config.py,sha256=W3JOC_TFad8hFkpTG8yv0-GNupa7x3wX4NAUfWpB59U,3763
6
6
  lionagi/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
7
7
  lionagi/settings.py,sha256=HDuKCEJCpc4HudKodBnhoQUGuTGhRHdlIFhbtf3VBtY,1633
8
8
  lionagi/utils.py,sha256=cUJntQ5FspE0JecFAZtrGJZqmSLDT65ymD-3hbj-xoE,51013
9
- lionagi/version.py,sha256=_bH9Cv7iwwqj9tsROJuuYU5lQLLsLNBzcIQgDLI_itM,24
9
+ lionagi/version.py,sha256=J3w7eNHM4lbOixnw2BIKBI2T-kM-_W7VoSV_1tn8HOs,24
10
10
  lionagi/adapters/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
11
11
  lionagi/adapters/async_postgres_adapter.py,sha256=Kf2YCzwRqKpEHY3GQCXEiMl201CCIkDvXcvddwZNkkE,12723
12
12
  lionagi/adapters/postgres_model_adapter.py,sha256=e_wfJNyihbpLCXuAs_W9tbLoMXAXbAXtkQDaHfqWz3o,4555
@@ -27,7 +27,7 @@ lionagi/libs/concurrency/patterns.py,sha256=dlC7nhIYE-D5VySNAPsd6PYYlORRAqNX50oK
27
27
  lionagi/libs/concurrency/primitives.py,sha256=fgml37nggaEGuvAJHQY6-rpSuAuei56YVSjTlIieM2o,8996
28
28
  lionagi/libs/concurrency/resource_tracker.py,sha256=52Rq7yMWK7DlebBW90imSjYeEAp8Gp9nL0dG2PD8Ivs,5464
29
29
  lionagi/libs/concurrency/task.py,sha256=nVts_yPylkZVSk3l3I4MkUdC7rhoN2qQeFfrsvekVgE,3146
30
- lionagi/libs/concurrency/throttle.py,sha256=VQjlY3o9t9qhFSrsaZ-GES99l_Rnt_Jwatrh2bp3asg,2171
30
+ lionagi/libs/concurrency/throttle.py,sha256=Ho5zh_3beSXi9cMDDj70xz447BLzBJVopnUlQ18k9Lc,2198
31
31
  lionagi/libs/file/__init__.py,sha256=5y5joOZzfFWERl75auAcNcKC3lImVJ5ZZGvvHZUFCJM,112
32
32
  lionagi/libs/file/chunk.py,sha256=XeVMwM33JF0X1W6udz_nhlb3DCevA_EK6A50Hn_e5SY,9300
33
33
  lionagi/libs/file/concat.py,sha256=YSauXVBL3WWx5Mvpn208Cj7q9TLt_aq-0M9J1fm-ins,3864
@@ -105,7 +105,7 @@ lionagi/operations/__init__.py,sha256=L22n8rRls9oVdzHoDlznHFGiKJMNw3ZhbwVQbm1Fn6
105
105
  lionagi/operations/builder.py,sha256=_fIW5OqPTTond1VUapMMtEwsWmIuTAKy34K24uuK6EQ,22790
106
106
  lionagi/operations/flow.py,sha256=MC1g4vyhrFPUCUsL4_SZZBPrp0q5SMgk72ECrTowk2Q,17567
107
107
  lionagi/operations/manager.py,sha256=7KD6NMWqYJHCPI2LumDRwGinF8WYKFjrr3bsNUi9xzI,564
108
- lionagi/operations/node.py,sha256=X_uHT_zmDKllfTjuhOHslC55j3Bv3NxVZO3bsimcedE,3100
108
+ lionagi/operations/node.py,sha256=_PAN7qdGGdzyh97wRYEoTcZzD3giN7f5yuyKNP_snyk,3131
109
109
  lionagi/operations/types.py,sha256=fM8HphnbBifMzhoKKvdl3JxGCBHlEGPJEYkLWj9b7vE,704
110
110
  lionagi/operations/utils.py,sha256=b8HmpF5vRgmf6PTzg3_fZCIKMnhoGa0HCyOlX6JCz7g,1263
111
111
  lionagi/operations/ReAct/ReAct.py,sha256=UzW3MClv9_w1AqrZIuATOZ9ASTb8HPD0Rlotlp0mYOg,13388
@@ -157,7 +157,7 @@ lionagi/protocols/generic/processor.py,sha256=c_a7HB9WAaCY-HoI19YyStef8WOXcDj9Ue
157
157
  lionagi/protocols/generic/progression.py,sha256=qlITq1qzV119iR5qR__fBAzV489S7d4t20E8uDRicEw,15189
158
158
  lionagi/protocols/graph/__init__.py,sha256=UPu3OmUpjSgX2aBuBJUdG2fppGlfqAH96hU0qIMBMp0,253
159
159
  lionagi/protocols/graph/edge.py,sha256=YxSGj4w_fG7khm-zpKduuK5fJzhJDx23JhU1dZp29d8,5241
160
- lionagi/protocols/graph/graph.py,sha256=fhPc_ogXkxbBrM0_En9QTDVM7fHA_LzURCdmDRuBlHE,10217
160
+ lionagi/protocols/graph/graph.py,sha256=u7qoEPXh4Tpp-O6ciEGJkzzQyA7weJmE2spnWrEYZqs,10698
161
161
  lionagi/protocols/graph/node.py,sha256=cfPay0iPdt8PKAptpMXdCOqpv6EWgp_ZKNsvlrDEJwE,3460
162
162
  lionagi/protocols/mail/__init__.py,sha256=5y5joOZzfFWERl75auAcNcKC3lImVJ5ZZGvvHZUFCJM,112
163
163
  lionagi/protocols/mail/exchange.py,sha256=P1PcrFylIBeiQa8kox9H1qyJ4kjhUlbLiTUT8rs1OXg,7041
@@ -228,7 +228,7 @@ lionagi/tools/types.py,sha256=XtJLY0m-Yi_ZLWhm0KycayvqMCZd--HxfQ0x9vFUYDE,230
228
228
  lionagi/tools/file/__init__.py,sha256=5y5joOZzfFWERl75auAcNcKC3lImVJ5ZZGvvHZUFCJM,112
229
229
  lionagi/tools/file/reader.py,sha256=jnSHVSQ66AHZXQrgRuGmlbwKT5JHYoo-1zv1hKgTEfc,9544
230
230
  lionagi/tools/memory/tools.py,sha256=earYkKxSOz_iXkqVZYTEDfE3dwZYIWPXZrqQ1DYGz4I,15941
231
- lionagi-0.14.10.dist-info/METADATA,sha256=dSmotUPRf80FXZ2fDMp16hEGp0Y5rovlXfCs8Cysk9s,22955
232
- lionagi-0.14.10.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
233
- lionagi-0.14.10.dist-info/licenses/LICENSE,sha256=VXFWsdoN5AAknBCgFqQNgPWYx7OPp-PFEP961zGdOjc,11288
234
- lionagi-0.14.10.dist-info/RECORD,,
231
+ lionagi-0.14.11.dist-info/METADATA,sha256=U8Vn3oHSbi4q3h03gfTUN4ddtIxaNaiLW-Y2PB22x7k,22955
232
+ lionagi-0.14.11.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
233
+ lionagi-0.14.11.dist-info/licenses/LICENSE,sha256=VXFWsdoN5AAknBCgFqQNgPWYx7OPp-PFEP961zGdOjc,11288
234
+ lionagi-0.14.11.dist-info/RECORD,,