lionagi 0.13.6__py3-none-any.whl → 0.14.0__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.
- lionagi/_types.py +1 -0
- lionagi/fields/base.py +0 -1
- lionagi/libs/concurrency/__init__.py +25 -0
- lionagi/libs/concurrency/cancel.py +134 -0
- lionagi/libs/concurrency/errors.py +35 -0
- lionagi/libs/concurrency/patterns.py +252 -0
- lionagi/libs/concurrency/primitives.py +242 -0
- lionagi/libs/concurrency/task.py +109 -0
- lionagi/operations/ReAct/ReAct.py +0 -2
- lionagi/operations/ReAct/utils.py +1 -9
- lionagi/operations/builder.py +46 -0
- lionagi/operations/flow.py +292 -383
- lionagi/operations/node.py +2 -1
- lionagi/operations/operate/operate.py +0 -3
- lionagi/protocols/graph/edge.py +1 -1
- lionagi/session/branch.py +0 -4
- lionagi/session/prompts.py +0 -1
- lionagi/session/session.py +2 -2
- lionagi/version.py +1 -1
- {lionagi-0.13.6.dist-info → lionagi-0.14.0.dist-info}/METADATA +1 -1
- {lionagi-0.13.6.dist-info → lionagi-0.14.0.dist-info}/RECORD +23 -17
- {lionagi-0.13.6.dist-info → lionagi-0.14.0.dist-info}/WHEEL +0 -0
- {lionagi-0.13.6.dist-info → lionagi-0.14.0.dist-info}/licenses/LICENSE +0 -0
lionagi/operations/node.py
CHANGED
@@ -45,7 +45,8 @@ class Operation(Node, Event):
|
|
45
45
|
|
46
46
|
@property
|
47
47
|
def graph_id(self) -> str | None:
|
48
|
-
|
48
|
+
if a := self.metadata.get("graph_id"):
|
49
|
+
return ID.get_id(a)
|
49
50
|
|
50
51
|
@graph_id.setter
|
51
52
|
def graph_id(self, value: str | UUID | IDType | None):
|
@@ -51,7 +51,6 @@ async def operate(
|
|
51
51
|
action_strategy: Literal[
|
52
52
|
"sequential", "concurrent", "batch"
|
53
53
|
] = "concurrent",
|
54
|
-
action_batch_size: int = None,
|
55
54
|
verbose_action: bool = False,
|
56
55
|
field_models: list[FieldModel] = None,
|
57
56
|
exclude_fields: list | dict | None = None,
|
@@ -194,8 +193,6 @@ async def operate(
|
|
194
193
|
if instruct.action_strategy
|
195
194
|
else action_kwargs.get("strategy", "concurrent")
|
196
195
|
)
|
197
|
-
if action_batch_size:
|
198
|
-
action_kwargs["batch_size"] = action_batch_size
|
199
196
|
|
200
197
|
action_response_models = await branch.act(
|
201
198
|
response_model.action_requests,
|
lionagi/protocols/graph/edge.py
CHANGED
lionagi/session/branch.py
CHANGED
@@ -920,7 +920,6 @@ class Branch(Element, Communicatable, Relational):
|
|
920
920
|
action_strategy: Literal[
|
921
921
|
"sequential", "concurrent", "batch"
|
922
922
|
] = "concurrent",
|
923
|
-
action_batch_size: int = None,
|
924
923
|
verbose_action: bool = False,
|
925
924
|
field_models: list[FieldModel] = None,
|
926
925
|
exclude_fields: list | dict | None = None,
|
@@ -990,8 +989,6 @@ class Branch(Element, Communicatable, Relational):
|
|
990
989
|
Additional parameters for the `branch.act()` call if tools are invoked.
|
991
990
|
action_strategy (Literal["sequential","concurrent","batch"], optional):
|
992
991
|
The strategy for invoking tools (default: "concurrent").
|
993
|
-
action_batch_size (int, optional):
|
994
|
-
The batch size for concurrent tool invocation if `action_strategy="batch"`.
|
995
992
|
verbose_action (bool, optional):
|
996
993
|
If `True`, logs detailed information about tool invocation.
|
997
994
|
field_models (list[FieldModel] | None, optional):
|
@@ -1041,7 +1038,6 @@ class Branch(Element, Communicatable, Relational):
|
|
1041
1038
|
reason=reason,
|
1042
1039
|
action_kwargs=action_kwargs,
|
1043
1040
|
action_strategy=action_strategy,
|
1044
|
-
action_batch_size=action_batch_size,
|
1045
1041
|
verbose_action=verbose_action,
|
1046
1042
|
field_models=field_models,
|
1047
1043
|
exclude_fields=exclude_fields,
|
lionagi/session/prompts.py
CHANGED
@@ -42,7 +42,6 @@ Actions are invoked by providing the tool function name and the required paramet
|
|
42
42
|
and choose the appropriate action strategy.
|
43
43
|
- 'sequential': execute actions in sequence
|
44
44
|
- 'concurrent': execute all actions concurrently
|
45
|
-
- 'batch': execute all actions in batch, each batch is concurrent
|
46
45
|
|
47
46
|
---
|
48
47
|
## Note:
|
lionagi/session/session.py
CHANGED
@@ -341,13 +341,13 @@ class Session(Node, Communicatable, Relational):
|
|
341
341
|
branch = self.branches[branch]
|
342
342
|
|
343
343
|
return await flow(
|
344
|
-
|
344
|
+
session=self,
|
345
345
|
graph=graph,
|
346
|
+
branch=branch,
|
346
347
|
context=context,
|
347
348
|
parallel=parallel,
|
348
349
|
max_concurrent=max_concurrent,
|
349
350
|
verbose=verbose,
|
350
|
-
session=self,
|
351
351
|
)
|
352
352
|
|
353
353
|
|
lionagi/version.py
CHANGED
@@ -1 +1 @@
|
|
1
|
-
__version__ = "0.
|
1
|
+
__version__ = "0.14.0"
|
@@ -1,15 +1,15 @@
|
|
1
1
|
lionagi/__init__.py,sha256=x_DLjvYZp15u2L3pjIKrUDvvdDBzf7VmrhYVzbsACjU,725
|
2
2
|
lionagi/_class_registry.py,sha256=pfUO1DjFZIqr3OwnNMkFqL_fiEBrrf8-swkGmP_KDLE,3112
|
3
3
|
lionagi/_errors.py,sha256=S02keQTY2IMkTvpLe00v7P7b8QNJ0PrZ1KWmQWCEQAA,500
|
4
|
-
lionagi/_types.py,sha256=
|
4
|
+
lionagi/_types.py,sha256=9cKKDMl0l5DLGhHzDAtnlKT2XqLv1IeynmhFYBno2_k,185
|
5
5
|
lionagi/config.py,sha256=Dxs5FA9UCv1YX5H54qOJcPsDrIF9wFokWEPZ212eH-k,3715
|
6
6
|
lionagi/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
7
7
|
lionagi/settings.py,sha256=HDuKCEJCpc4HudKodBnhoQUGuTGhRHdlIFhbtf3VBtY,1633
|
8
8
|
lionagi/utils.py,sha256=8zCdJHKbDJv2WSzAAiFnMSpvfyZb9RnmfSNaMEqdTJE,79003
|
9
|
-
lionagi/version.py,sha256=
|
9
|
+
lionagi/version.py,sha256=EVkhkQ4Bbkx92jXuCmt2_JDjQExgnrq2d3eBQIP9UAo,23
|
10
10
|
lionagi/fields/__init__.py,sha256=yrn9NDAM6_v73kK7aJeb-Pvqigeu8WASaV-My-6CDsc,939
|
11
11
|
lionagi/fields/action.py,sha256=OziEpbaUeEVo34KdtbzDxXJBgkf3QLxlcKIQAfHe4O0,5791
|
12
|
-
lionagi/fields/base.py,sha256=
|
12
|
+
lionagi/fields/base.py,sha256=mvgqxLonCROszMjnG8QWt00l-MvIr_mnGvCtaH-SQ_k,3814
|
13
13
|
lionagi/fields/code.py,sha256=TFym51obzaSfCmeRoHZJyBtjfDI4tvl9F-1sjFc9rMw,7713
|
14
14
|
lionagi/fields/file.py,sha256=DhQ_HE0RvTNzkvBGQHRgbMYSokDkzE8GEu814i6jw5Q,7297
|
15
15
|
lionagi/fields/instruct.py,sha256=sMbCxEv0HQLa31JkJDmdrWWEzIfeKbcmN2hYOehz3Q0,4773
|
@@ -17,6 +17,12 @@ lionagi/fields/reason.py,sha256=eTGI9jDaaZJInUjCR9lEpYvw2_1UUF-xzCVCFP3-JRI,1437
|
|
17
17
|
lionagi/fields/research.py,sha256=eEPKocx8eQy2E9FExRWVIo6MK_xvmwBAoRZciBY3RG0,1421
|
18
18
|
lionagi/libs/__init__.py,sha256=5y5joOZzfFWERl75auAcNcKC3lImVJ5ZZGvvHZUFCJM,112
|
19
19
|
lionagi/libs/parse.py,sha256=JRS3bql0InHJqATnAatl-hQv4N--XXw4P77JHhTFnrc,1011
|
20
|
+
lionagi/libs/concurrency/__init__.py,sha256=AZfvtBAnK4nNRQrqHU9NCMYm6_qjMEWnp4ylX3_hkso,658
|
21
|
+
lionagi/libs/concurrency/cancel.py,sha256=21KdFjLq9HIq6MpWVE-5KrrU0e1nehmK-ZETGNjTf6Y,4028
|
22
|
+
lionagi/libs/concurrency/errors.py,sha256=FhLgXGFSbKZYPNfXjdnkV-0ShPF_S34RBLyTO_Pk5C8,938
|
23
|
+
lionagi/libs/concurrency/patterns.py,sha256=1_o_UsYaWF38YzE6H29-bMdsyhtgzhdgMz9-9LRfdQE,7857
|
24
|
+
lionagi/libs/concurrency/primitives.py,sha256=k9YQAbO6SFFb2cI-PYRZiKN1FhtOADCtyZWdEH9s6to,6578
|
25
|
+
lionagi/libs/concurrency/task.py,sha256=zHtgzzenHVTfyk08azHlPBrHAv67onHO3p2DxwVLoiU,3122
|
20
26
|
lionagi/libs/file/__init__.py,sha256=5y5joOZzfFWERl75auAcNcKC3lImVJ5ZZGvvHZUFCJM,112
|
21
27
|
lionagi/libs/file/chunk.py,sha256=XeVMwM33JF0X1W6udz_nhlb3DCevA_EK6A50Hn_e5SY,9300
|
22
28
|
lionagi/libs/file/concat.py,sha256=YSauXVBL3WWx5Mvpn208Cj7q9TLt_aq-0M9J1fm-ins,3864
|
@@ -83,15 +89,15 @@ lionagi/models/note.py,sha256=okWJL4mGqt0bUVxHRyqsfJr7tEh6wwgYhF1CegxudIA,12202
|
|
83
89
|
lionagi/models/operable_model.py,sha256=fXbcpBjO-SoaeF8fn-F1_KIcYw9_L73VIUM1BDg5hj4,19905
|
84
90
|
lionagi/models/schema_model.py,sha256=ghRIM8aBNaToAknwNlhQKpuKXcwzyCw5pDE31bVKxs0,667
|
85
91
|
lionagi/operations/__init__.py,sha256=L22n8rRls9oVdzHoDlznHFGiKJMNw3ZhbwVQbm1Fn6M,584
|
86
|
-
lionagi/operations/builder.py,sha256=
|
87
|
-
lionagi/operations/flow.py,sha256=
|
92
|
+
lionagi/operations/builder.py,sha256=aj32b_sr4fDdx10RQ3hkxeBHpPRYLKqt5uSXzLPVY_k,22575
|
93
|
+
lionagi/operations/flow.py,sha256=xMvI6JHfsY9tU1s4qEI37oWhGQ98UM_npRGh3X_nkuA,12689
|
88
94
|
lionagi/operations/manager.py,sha256=7KD6NMWqYJHCPI2LumDRwGinF8WYKFjrr3bsNUi9xzI,564
|
89
|
-
lionagi/operations/node.py,sha256=
|
95
|
+
lionagi/operations/node.py,sha256=X_uHT_zmDKllfTjuhOHslC55j3Bv3NxVZO3bsimcedE,3100
|
90
96
|
lionagi/operations/types.py,sha256=fM8HphnbBifMzhoKKvdl3JxGCBHlEGPJEYkLWj9b7vE,704
|
91
97
|
lionagi/operations/utils.py,sha256=b8HmpF5vRgmf6PTzg3_fZCIKMnhoGa0HCyOlX6JCz7g,1263
|
92
|
-
lionagi/operations/ReAct/ReAct.py,sha256=
|
98
|
+
lionagi/operations/ReAct/ReAct.py,sha256=UzW3MClv9_w1AqrZIuATOZ9ASTb8HPD0Rlotlp0mYOg,13388
|
93
99
|
lionagi/operations/ReAct/__init__.py,sha256=5y5joOZzfFWERl75auAcNcKC3lImVJ5ZZGvvHZUFCJM,112
|
94
|
-
lionagi/operations/ReAct/utils.py,sha256=
|
100
|
+
lionagi/operations/ReAct/utils.py,sha256=mBKii3zIxVg-l18fXUfDqGTK0h0JX_DcM2jO_YwRRu4,4117
|
95
101
|
lionagi/operations/_act/__init__.py,sha256=5y5joOZzfFWERl75auAcNcKC3lImVJ5ZZGvvHZUFCJM,112
|
96
102
|
lionagi/operations/_act/act.py,sha256=LfN4UqTTHVvO1h9tqmDhVfVafVUOry4YGEivIZbmLqc,2810
|
97
103
|
lionagi/operations/brainstorm/__init__.py,sha256=5y5joOZzfFWERl75auAcNcKC3lImVJ5ZZGvvHZUFCJM,112
|
@@ -106,7 +112,7 @@ lionagi/operations/instruct/instruct.py,sha256=7pxhyP5jxwpgqjmQNb1rnGF4QAVlbMENp
|
|
106
112
|
lionagi/operations/interpret/__init__.py,sha256=5y5joOZzfFWERl75auAcNcKC3lImVJ5ZZGvvHZUFCJM,112
|
107
113
|
lionagi/operations/interpret/interpret.py,sha256=yl1NSp2iOm3dbycVLEcnV3absnqKoubfH15v6lQgySU,1500
|
108
114
|
lionagi/operations/operate/__init__.py,sha256=5y5joOZzfFWERl75auAcNcKC3lImVJ5ZZGvvHZUFCJM,112
|
109
|
-
lionagi/operations/operate/operate.py,sha256=
|
115
|
+
lionagi/operations/operate/operate.py,sha256=G-VGjvhKxxgQLyoxigOYcYHMOazyM1ESQMfbrM33SPM,7233
|
110
116
|
lionagi/operations/parse/__init__.py,sha256=5y5joOZzfFWERl75auAcNcKC3lImVJ5ZZGvvHZUFCJM,112
|
111
117
|
lionagi/operations/parse/parse.py,sha256=xS9uIxBzHLGD-1VpBVgGUhxF-tQDkF2KLmIpErM47RQ,6661
|
112
118
|
lionagi/operations/plan/__init__.py,sha256=yGBPll6lOqVjadbTvDLGrTlMx3FfBW-e00z7AMvg7Uo,156
|
@@ -137,7 +143,7 @@ lionagi/protocols/generic/pile.py,sha256=SVy4fk4pVDv3jS1GiLZo9fO_Nk53_ojfsQbUzM_
|
|
137
143
|
lionagi/protocols/generic/processor.py,sha256=GQ_j_5f4UE-jJeqIJ9L2NdicpZnu50DSP1mvxlc7O_4,10381
|
138
144
|
lionagi/protocols/generic/progression.py,sha256=qlITq1qzV119iR5qR__fBAzV489S7d4t20E8uDRicEw,15189
|
139
145
|
lionagi/protocols/graph/__init__.py,sha256=UPu3OmUpjSgX2aBuBJUdG2fppGlfqAH96hU0qIMBMp0,253
|
140
|
-
lionagi/protocols/graph/edge.py,sha256=
|
146
|
+
lionagi/protocols/graph/edge.py,sha256=YxSGj4w_fG7khm-zpKduuK5fJzhJDx23JhU1dZp29d8,5241
|
141
147
|
lionagi/protocols/graph/graph.py,sha256=fhPc_ogXkxbBrM0_En9QTDVM7fHA_LzURCdmDRuBlHE,10217
|
142
148
|
lionagi/protocols/graph/node.py,sha256=_bQ9h_s_X6dVyV4pueEfiKiFapOkDL-HuH2MboUekYI,4250
|
143
149
|
lionagi/protocols/mail/__init__.py,sha256=5y5joOZzfFWERl75auAcNcKC3lImVJ5ZZGvvHZUFCJM,112
|
@@ -193,16 +199,16 @@ lionagi/service/third_party/exa_models.py,sha256=G_hnekcy-DillPLzMoDQ8ZisVAL8Mp7
|
|
193
199
|
lionagi/service/third_party/openai_models.py,sha256=sF-fQ726CnaDBgLY_r2NdPqc3GicPKhZjh5F8IfjBO0,501904
|
194
200
|
lionagi/service/third_party/pplx_models.py,sha256=Nkm1ftESBa_NwP9ITBUNqLmAZ3Jh92aL732g_i6T8LQ,5947
|
195
201
|
lionagi/session/__init__.py,sha256=kDypY6L3kGPnatAw7YNQAykgg-9MlIBnlhHExaXvt-c,202
|
196
|
-
lionagi/session/branch.py,sha256=
|
197
|
-
lionagi/session/prompts.py,sha256=
|
198
|
-
lionagi/session/session.py,sha256=
|
202
|
+
lionagi/session/branch.py,sha256=bMNZQhCB7s_vWCOqQ3X1w2gZ9mhkDUMf21OvJGMWOyM,69713
|
203
|
+
lionagi/session/prompts.py,sha256=GPr0jibyAAqS3awDzGC8SoCL6aWJLLCCbXY0JUuxOC0,3170
|
204
|
+
lionagi/session/session.py,sha256=jAHkg9BQRxYdz0Biulj3Yt_Umo9ecr6PNKrgrR0OypA,10770
|
199
205
|
lionagi/tools/__init__.py,sha256=5y5joOZzfFWERl75auAcNcKC3lImVJ5ZZGvvHZUFCJM,112
|
200
206
|
lionagi/tools/base.py,sha256=cld32pyjaTUdyiqZ8hNyJjWKAhcJ8RQNhgImI7R8b-E,1940
|
201
207
|
lionagi/tools/types.py,sha256=XtJLY0m-Yi_ZLWhm0KycayvqMCZd--HxfQ0x9vFUYDE,230
|
202
208
|
lionagi/tools/file/__init__.py,sha256=5y5joOZzfFWERl75auAcNcKC3lImVJ5ZZGvvHZUFCJM,112
|
203
209
|
lionagi/tools/file/reader.py,sha256=0TdnfVGVCKuM58MmGM-NyVjhU9BFoitkNYEepdc0z_Y,9529
|
204
210
|
lionagi/tools/memory/tools.py,sha256=zTGBenVsF8Wuh303kWntmQSGlAFKonHNdh5ePuQ26KE,15948
|
205
|
-
lionagi-0.
|
206
|
-
lionagi-0.
|
207
|
-
lionagi-0.
|
208
|
-
lionagi-0.
|
211
|
+
lionagi-0.14.0.dist-info/METADATA,sha256=wPI0wwriFi7XMhCV6Qs05CFzYtdKYsby5cygItwdljM,20818
|
212
|
+
lionagi-0.14.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
213
|
+
lionagi-0.14.0.dist-info/licenses/LICENSE,sha256=VXFWsdoN5AAknBCgFqQNgPWYx7OPp-PFEP961zGdOjc,11288
|
214
|
+
lionagi-0.14.0.dist-info/RECORD,,
|
File without changes
|
File without changes
|