lionagi 0.15.1__py3-none-any.whl → 0.15.2__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.
@@ -86,6 +86,31 @@ class Session(Node, Communicatable, Relational):
86
86
  ):
87
87
  self._operation_manager.register(operation, func, update=update)
88
88
 
89
+ def operation(self, name: str = None, *, update: bool = False):
90
+ """
91
+ Decorator to automatically register functions as operations.
92
+
93
+ Args:
94
+ name: Operation name. If None, uses the function's __name__.
95
+ update: Whether to update if operation already exists.
96
+
97
+ Usage:
98
+ @session.operation()
99
+ async def read_issue():
100
+ ...
101
+
102
+ @session.operation("custom_name")
103
+ async def some_function():
104
+ ...
105
+ """
106
+
107
+ def decorator(func: Callable) -> Callable:
108
+ operation_name = name if name is not None else func.__name__
109
+ self.register_operation(operation_name, func, update=update)
110
+ return func
111
+
112
+ return decorator
113
+
89
114
  @model_validator(mode="after")
90
115
  def _add_mail_sources(self) -> Self:
91
116
  if self.default_branch is None:
lionagi/version.py CHANGED
@@ -1 +1 @@
1
- __version__ = "0.15.1"
1
+ __version__ = "0.15.2"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: lionagi
3
- Version: 0.15.1
3
+ Version: 0.15.2
4
4
  Summary: An Intelligence Operating System.
5
5
  Author-email: HaiyangLi <quantocean.li@gmail.com>
6
6
  License: Apache License
@@ -497,7 +497,7 @@ We welcome issues, ideas, and pull requests:
497
497
 
498
498
  ```
499
499
  @software{Li_LionAGI_2023,
500
- author = {Haiyang Li, Liangbingyan Luo},
500
+ author = {Haiyang Li},
501
501
  month = {12},
502
502
  year = {2023},
503
503
  title = {LionAGI: Towards Automated General Intelligence},
@@ -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=Adtr1wyrU9Ra-HfHDoHLWasD6V88Z8sqkg2CQ8i8nzI,38686
9
- lionagi/version.py,sha256=PQVflpJdJDETGf2g1BB5OHCS_5KtgteERschfoSBtss,23
9
+ lionagi/version.py,sha256=BOC5JUFbzkhCG96hrOtH7kEDXF3aNOg4kZ97OzGzruI,23
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
@@ -227,14 +227,14 @@ lionagi/service/third_party/pplx_models.py,sha256=-EhyJgOWR6rzSv3zczUtk80X6c19p1
227
227
  lionagi/session/__init__.py,sha256=kDypY6L3kGPnatAw7YNQAykgg-9MlIBnlhHExaXvt-c,202
228
228
  lionagi/session/branch.py,sha256=yfOtMITbtKzGAcxwZ5JjkXrKtb2PBGRPt53xqbR0lAs,68329
229
229
  lionagi/session/prompts.py,sha256=GPr0jibyAAqS3awDzGC8SoCL6aWJLLCCbXY0JUuxOC0,3170
230
- lionagi/session/session.py,sha256=C66yzISZh7r6reAIOOCg3JxQuSKYDHos7b_skNRpO2s,12481
230
+ lionagi/session/session.py,sha256=FzsUsqEQ6cnGd57E4HmEucftz5nMKsfj9kemRDqsXwU,13257
231
231
  lionagi/tools/__init__.py,sha256=5y5joOZzfFWERl75auAcNcKC3lImVJ5ZZGvvHZUFCJM,112
232
232
  lionagi/tools/base.py,sha256=hEGnE4MD0CM4UqnF0xsDRKB0aM-pyrTFHl8utHhyJLU,1897
233
233
  lionagi/tools/types.py,sha256=XtJLY0m-Yi_ZLWhm0KycayvqMCZd--HxfQ0x9vFUYDE,230
234
234
  lionagi/tools/file/__init__.py,sha256=5y5joOZzfFWERl75auAcNcKC3lImVJ5ZZGvvHZUFCJM,112
235
235
  lionagi/tools/file/reader.py,sha256=jnSHVSQ66AHZXQrgRuGmlbwKT5JHYoo-1zv1hKgTEfc,9544
236
236
  lionagi/tools/memory/tools.py,sha256=earYkKxSOz_iXkqVZYTEDfE3dwZYIWPXZrqQ1DYGz4I,15941
237
- lionagi-0.15.1.dist-info/METADATA,sha256=f7nShb1IWGDEwY_PmbpvJWfLnmKCClalfhKy4fSYljw,22913
238
- lionagi-0.15.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
239
- lionagi-0.15.1.dist-info/licenses/LICENSE,sha256=VXFWsdoN5AAknBCgFqQNgPWYx7OPp-PFEP961zGdOjc,11288
240
- lionagi-0.15.1.dist-info/RECORD,,
237
+ lionagi-0.15.2.dist-info/METADATA,sha256=Q8mXAz46uEMUXIU-VbSsuhXH5yXUcmUkgRvoFkkgz1s,22895
238
+ lionagi-0.15.2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
239
+ lionagi-0.15.2.dist-info/licenses/LICENSE,sha256=VXFWsdoN5AAknBCgFqQNgPWYx7OPp-PFEP961zGdOjc,11288
240
+ lionagi-0.15.2.dist-info/RECORD,,