lionagi 0.2.10__py3-none-any.whl → 0.2.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.
- lionagi/core/unit/unit.py +46 -0
- lionagi/version.py +1 -1
- {lionagi-0.2.10.dist-info → lionagi-0.2.11.dist-info}/METADATA +2 -2
- {lionagi-0.2.10.dist-info → lionagi-0.2.11.dist-info}/RECORD +6 -6
- {lionagi-0.2.10.dist-info → lionagi-0.2.11.dist-info}/LICENSE +0 -0
- {lionagi-0.2.10.dist-info → lionagi-0.2.11.dist-info}/WHEEL +0 -0
lionagi/core/unit/unit.py
CHANGED
@@ -2,6 +2,7 @@ from typing import Callable
|
|
2
2
|
|
3
3
|
from lionagi.core.collections import iModel
|
4
4
|
from lionagi.core.collections.abc import Directive
|
5
|
+
from lionagi.core.report.form import Form
|
5
6
|
from lionagi.core.validator.validator import Validator
|
6
7
|
from lionagi.libs.ln_func_call import rcall
|
7
8
|
|
@@ -361,3 +362,48 @@ class Unit(Directive, DirectiveMixin):
|
|
361
362
|
)
|
362
363
|
|
363
364
|
raise ValueError(f"invalid directive: {directive}")
|
365
|
+
|
366
|
+
async def ReactInstruct(
|
367
|
+
self,
|
368
|
+
instruction: str | dict,
|
369
|
+
context: str | dict,
|
370
|
+
form_cls: type[Form],
|
371
|
+
branch=None,
|
372
|
+
tools: list = None,
|
373
|
+
imodel1: iModel = None,
|
374
|
+
imodel2: iModel = None,
|
375
|
+
allow_extension1: bool = False,
|
376
|
+
allow_extension2: bool = False,
|
377
|
+
max_extension1: int = None,
|
378
|
+
max_extension2: int = None,
|
379
|
+
form_kwargs: dict = {},
|
380
|
+
**kwargs,
|
381
|
+
):
|
382
|
+
"""
|
383
|
+
kwargs for direct
|
384
|
+
"""
|
385
|
+
|
386
|
+
kwargs.pop("allow_action", None)
|
387
|
+
|
388
|
+
direct_form: UnitForm = await self.direct(
|
389
|
+
instruction=instruction,
|
390
|
+
context=context,
|
391
|
+
branch=branch,
|
392
|
+
allow_extension=allow_extension1,
|
393
|
+
tools=tools if tools else True,
|
394
|
+
max_extension=max_extension1,
|
395
|
+
imodel=imodel1,
|
396
|
+
allow_action=True,
|
397
|
+
**kwargs,
|
398
|
+
)
|
399
|
+
|
400
|
+
form: Form = await self.direct(
|
401
|
+
form=form_cls(**form_kwargs),
|
402
|
+
imodel=imodel2,
|
403
|
+
branch=branch,
|
404
|
+
allow_extension=allow_extension2,
|
405
|
+
max_extension=max_extension2,
|
406
|
+
**kwargs,
|
407
|
+
)
|
408
|
+
|
409
|
+
return direct_form, form
|
lionagi/version.py
CHANGED
@@ -1 +1 @@
|
|
1
|
-
__version__ = "0.2.
|
1
|
+
__version__ = "0.2.11"
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: lionagi
|
3
|
-
Version: 0.2.
|
3
|
+
Version: 0.2.11
|
4
4
|
Summary: Towards automated general intelligence.
|
5
5
|
Author: HaiyangLi
|
6
6
|
Author-email: quantocean.li@gmail.com
|
@@ -11,7 +11,7 @@ Classifier: Programming Language :: Python :: 3.11
|
|
11
11
|
Classifier: Programming Language :: Python :: 3.12
|
12
12
|
Requires-Dist: aiocache (>=0.12.3,<0.13.0)
|
13
13
|
Requires-Dist: ipython (>=8.27.0,<9.0.0)
|
14
|
-
Requires-Dist: lion-core (>=0.3.
|
14
|
+
Requires-Dist: lion-core (>=0.3.9,<0.4.0)
|
15
15
|
Requires-Dist: lion-openai (>=0.1.4,<0.2.0)
|
16
16
|
Requires-Dist: python-dotenv (>=1.0.1,<2.0.0)
|
17
17
|
Description-Content-Type: text/markdown
|
@@ -105,7 +105,7 @@ lionagi/core/unit/template/plan.py,sha256=i4FmKEB8eRsRCsTanvfoX-2RZ8SaM1qvLBluuY
|
|
105
105
|
lionagi/core/unit/template/predict.py,sha256=5unb8YjZ_z8uaINJ-eh8luDioDbgpLgzN73gY_Fva-4,3146
|
106
106
|
lionagi/core/unit/template/score.py,sha256=ReUaIIr-NLjunSy4NNXQpIsH28NNceGBAUuPCRptzMc,3809
|
107
107
|
lionagi/core/unit/template/select.py,sha256=diYFXp0UfZMlBGMUrz72i8lSfdZmmNrYi3_7Xn8OocM,3046
|
108
|
-
lionagi/core/unit/unit.py,sha256=
|
108
|
+
lionagi/core/unit/unit.py,sha256=mJZTtKF5J45dgL78LiNkh6urq1EdMCgEFiTV3-DruKI,14027
|
109
109
|
lionagi/core/unit/unit_form.py,sha256=ZLlJerMomWpYPx7v6BXrewNRuGjBiBNnhwezf-jmcPg,11014
|
110
110
|
lionagi/core/unit/unit_mixin.py,sha256=W0lQSNfd6Zk4RSdtjF77WMXLwNJnjMkHn_U9pc6y1fs,38584
|
111
111
|
lionagi/core/unit/util.py,sha256=2OBjHvTXbyHmxZDnDarSTIy_oNXPWQ1OG8M-94297cA,1995
|
@@ -260,8 +260,8 @@ lionagi/tests/test_core/test_structure/test_base_structure.py,sha256=qsaYP745fFI
|
|
260
260
|
lionagi/tests/test_core/test_structure/test_graph.py,sha256=hLsTZmZMs9vCZW-KiOwYY3npk6WxaVU6zZSA9-ltDvQ,2162
|
261
261
|
lionagi/tests/test_core/test_structure/test_tree.py,sha256=PvMJXDsNPpJFgEQCan-5Q5JREgMrBOpYIaWcwHd-WDY,1944
|
262
262
|
lionagi/tests/test_core/test_validator.py,sha256=G8h3SMUuH9behQe0-c3-5fZ9s67vgTwlmwfcS0k6dtI,4234
|
263
|
-
lionagi/version.py,sha256=
|
264
|
-
lionagi-0.2.
|
265
|
-
lionagi-0.2.
|
266
|
-
lionagi-0.2.
|
267
|
-
lionagi-0.2.
|
263
|
+
lionagi/version.py,sha256=_MLx4ac1juJPWEEiC9kMQISX3x3jFBr507jM2P_hxMg,23
|
264
|
+
lionagi-0.2.11.dist-info/LICENSE,sha256=VXFWsdoN5AAknBCgFqQNgPWYx7OPp-PFEP961zGdOjc,11288
|
265
|
+
lionagi-0.2.11.dist-info/METADATA,sha256=20LVdBGfK4nLHsh6EDscgS3xHezPEcr-nxvdY8hJH7s,3152
|
266
|
+
lionagi-0.2.11.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
267
|
+
lionagi-0.2.11.dist-info/RECORD,,
|
File without changes
|
File without changes
|