lionagi 0.16.3__py3-none-any.whl → 0.17.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.
@@ -19,10 +19,8 @@ from .node import Node
19
19
 
20
20
  T = TypeVar("T", bound=Node)
21
21
 
22
- from ._utils import check_matplotlib_available, check_networkx_available
23
-
24
- _NETWORKX_AVAILABLE = check_networkx_available()
25
- _MATPLIB_AVAILABLE = check_matplotlib_available()
22
+ _NETWORKX_AVAILABLE = None
23
+ _MATPLIB_AVAILABLE = None
26
24
  __all__ = ("Graph",)
27
25
 
28
26
 
@@ -219,8 +217,17 @@ class Graph(Element, Relational, Generic[T]):
219
217
 
220
218
  def to_networkx(self, **kwargs) -> Any:
221
219
  """Convert the graph to a NetworkX graph object."""
220
+ global _NETWORKX_AVAILABLE
221
+ if _NETWORKX_AVAILABLE is None:
222
+ from lionagi.ln import is_import_installed
223
+
224
+ _NETWORKX_AVAILABLE = is_import_installed("networkx")
225
+
222
226
  if _NETWORKX_AVAILABLE is not True:
223
- raise _NETWORKX_AVAILABLE
227
+ raise ImportError(
228
+ "The 'networkx' package is required for this feature. "
229
+ "Please install `networkx` or `'lionagi[graph]'`."
230
+ )
224
231
 
225
232
  from networkx import DiGraph # type: ignore
226
233
 
@@ -248,8 +255,18 @@ class Graph(Element, Relational, Generic[T]):
248
255
  ):
249
256
  """Display the graph using NetworkX and Matplotlib."""
250
257
  g = self.to_networkx(**kwargs)
258
+
259
+ global _MATPLIB_AVAILABLE
260
+ if _MATPLIB_AVAILABLE is None:
261
+ from lionagi.ln import is_import_installed
262
+
263
+ _MATPLIB_AVAILABLE = is_import_installed("matplotlib")
264
+
251
265
  if _MATPLIB_AVAILABLE is not True:
252
- raise _MATPLIB_AVAILABLE
266
+ raise ImportError(
267
+ "The 'matplotlib' package is required for this feature. "
268
+ "Please install `matplotlib` or `'lionagi[graph]'`."
269
+ )
253
270
 
254
271
  import matplotlib.pyplot as plt # type: ignore
255
272
  import networkx as nx # type: ignore
@@ -124,11 +124,9 @@ class Node(Element, Relational, AsyncAdaptable, Adaptable):
124
124
 
125
125
  if not _ADAPATER_REGISTERED:
126
126
  from pydapter.adapters import JsonAdapter, TomlAdapter
127
- from pydapter.extras.pandas_ import SeriesAdapter
128
127
 
129
128
  Node.register_adapter(JsonAdapter)
130
129
  Node.register_adapter(TomlAdapter)
131
- Node.register_adapter(SeriesAdapter)
132
130
 
133
131
  from lionagi.adapters._utils import check_async_postgres_available
134
132
 
@@ -4,7 +4,6 @@
4
4
 
5
5
  from __future__ import annotations
6
6
 
7
- import json
8
7
  from pathlib import Path
9
8
  from typing import Any
10
9
 
@@ -5,10 +5,7 @@
5
5
  from ._concepts import Collective, Communicatable, Condition, Manager
6
6
  from ._concepts import Observable as LegacyObservable
7
7
  from ._concepts import Observer, Ordering, Relational, Sendable
8
- from .action.manager import ActionManager, FunctionCalling, Tool, ToolRef
9
8
  from .contracts import Observable, ObservableProto
10
- from .forms.flow import FlowDefinition, FlowStep
11
- from .forms.report import BaseForm, Form, Report
12
9
  from .generic.element import ID, Element, IDError, IDType, validate_order
13
10
  from .generic.event import Event, EventStatus, Execution
14
11
  from .generic.log import (
@@ -43,7 +40,6 @@ from .messages.manager import (
43
40
  SenderRecipient,
44
41
  System,
45
42
  )
46
- from .operatives.step import Operative, Step
47
43
 
48
44
  __all__ = (
49
45
  "Collective",
@@ -98,17 +94,6 @@ __all__ = (
98
94
  "RoledMessage",
99
95
  "SenderRecipient",
100
96
  "System",
101
- "FlowDefinition",
102
- "FlowStep",
103
- "BaseForm",
104
- "Form",
105
- "Report",
106
- "Operative",
107
- "Step",
108
- "ActionManager",
109
- "Tool",
110
- "FunctionCalling",
111
- "ToolRef",
112
97
  "MailManager",
113
98
  "DataLogger",
114
99
  "DataLoggerConfig",
@@ -5,18 +5,13 @@
5
5
  import asyncio
6
6
  import logging
7
7
 
8
- import aiohttp
9
- import backoff
10
- from aiocache import cached
11
8
  from pydantic import BaseModel
12
9
 
13
- from lionagi.config import settings
14
10
  from lionagi.service.resilience import (
15
11
  CircuitBreaker,
16
12
  RetryConfig,
17
13
  retry_with_backoff,
18
14
  )
19
- from lionagi.utils import to_dict
20
15
 
21
16
  from .endpoint_config import EndpointConfig
22
17
  from .header_factory import HeaderFactory
@@ -65,6 +60,8 @@ class Endpoint:
65
60
 
66
61
  def _create_http_session(self):
67
62
  """Create a new HTTP session (not thread-safe, create new for each request)."""
63
+ import aiohttp
64
+
68
65
  return aiohttp.ClientSession(
69
66
  timeout=aiohttp.ClientTimeout(self.config.timeout),
70
67
  **self.config.client_kwargs,
@@ -231,6 +228,9 @@ class Endpoint:
231
228
 
232
229
  # Handle caching if requested
233
230
  if cache_control:
231
+ from aiocache import cached
232
+
233
+ from lionagi.config import settings
234
234
 
235
235
  @cached(**settings.aiocache_config.as_kwargs())
236
236
  async def _cached_call(payload: dict, headers: dict, **kwargs):
@@ -268,6 +268,8 @@ class Endpoint:
268
268
  Returns:
269
269
  The response from the endpoint.
270
270
  """
271
+ import aiohttp
272
+ import backoff
271
273
 
272
274
  async def _make_request_with_backoff():
273
275
  # Create a new session for this request
@@ -382,6 +384,8 @@ class Endpoint:
382
384
  **kwargs,
383
385
  ) as response:
384
386
  if response.status != 200:
387
+ import aiohttp
388
+
385
389
  raise aiohttp.ClientResponseError(
386
390
  request_info=response.request_info,
387
391
  history=response.history,
@@ -409,6 +413,8 @@ class Endpoint:
409
413
 
410
414
  @classmethod
411
415
  def from_dict(cls, data: dict):
416
+ from lionagi.utils import to_dict
417
+
412
418
  data = to_dict(data, recursive=True)
413
419
  retry_config = data.get("retry_config")
414
420
  circuit_breaker = data.get("circuit_breaker")
lionagi/session/branch.py CHANGED
@@ -4,10 +4,8 @@
4
4
 
5
5
  from collections.abc import AsyncGenerator, Callable
6
6
  from enum import Enum
7
- from typing import Any, Literal
7
+ from typing import TYPE_CHECKING, Any, Literal, Optional
8
8
 
9
- import pandas as pd
10
- from jinja2 import Template
11
9
  from pydantic import BaseModel, Field, JsonValue, PrivateAttr, field_serializer
12
10
 
13
11
  from lionagi.config import settings
@@ -15,11 +13,11 @@ from lionagi.fields import Instruct
15
13
  from lionagi.libs.schema.as_readable import as_readable
16
14
  from lionagi.models.field_model import FieldModel
17
15
  from lionagi.operations.manager import OperationManager
16
+ from lionagi.protocols.action.manager import ActionManager
18
17
  from lionagi.protocols.action.tool import FuncTool, Tool, ToolRef
19
18
  from lionagi.protocols.types import (
20
19
  ID,
21
20
  MESSAGE_FIELDS,
22
- ActionManager,
23
21
  ActionRequest,
24
22
  ActionResponse,
25
23
  AssistantResponse,
@@ -34,8 +32,6 @@ from lionagi.protocols.types import (
34
32
  Mailbox,
35
33
  MessageManager,
36
34
  MessageRole,
37
- Operative,
38
- Package,
39
35
  PackageCategory,
40
36
  Pile,
41
37
  Progression,
@@ -54,6 +50,10 @@ from lionagi.utils import copy
54
50
 
55
51
  from .prompts import LION_SYSTEM_MESSAGE
56
52
 
53
+ if TYPE_CHECKING:
54
+ from lionagi.protocols.operatives.operative import Operative
55
+
56
+
57
57
  __all__ = ("Branch",)
58
58
 
59
59
 
@@ -117,18 +117,18 @@ class Branch(Element, Communicatable, Relational):
117
117
  def __init__(
118
118
  self,
119
119
  *,
120
- user: SenderRecipient = None,
120
+ user: "SenderRecipient" = None,
121
121
  name: str | None = None,
122
122
  messages: Pile[RoledMessage] = None, # message manager kwargs
123
123
  system: System | JsonValue = None,
124
- system_sender: SenderRecipient = None,
124
+ system_sender: "SenderRecipient" = None,
125
125
  chat_model: iModel | dict = None, # iModelManager kwargs
126
126
  parse_model: iModel | dict = None,
127
127
  imodel: iModel = None, # deprecated, alias of chat_model
128
128
  tools: FuncTool | list[FuncTool] = None, # ActionManager kwargs
129
129
  log_config: LogManagerConfig | dict = None, # LogManager kwargs
130
130
  system_datetime: bool | str = None,
131
- system_template: Template | str = None,
131
+ system_template=None,
132
132
  system_template_context: dict = None,
133
133
  logs: Pile[Log] = None,
134
134
  use_lion_system_message: bool = False,
@@ -163,7 +163,7 @@ class Branch(Element, Communicatable, Relational):
163
163
  system_datetime (bool | str, optional):
164
164
  Whether to include timestamps in system messages (True/False)
165
165
  or a string format for datetime.
166
- system_template (Template | str, optional):
166
+ system_template (jinja2.Template | str, optional):
167
167
  Optional Jinja2 template for system messages.
168
168
  system_template_context (dict, optional):
169
169
  Context for rendering the system template.
@@ -177,6 +177,8 @@ class Branch(Element, Communicatable, Relational):
177
177
  super().__init__(user=user, name=name, **kwargs)
178
178
 
179
179
  # --- MessageManager ---
180
+ from lionagi.protocols.messages.manager import MessageManager
181
+
180
182
  self._message_manager = MessageManager(messages=messages)
181
183
 
182
184
  if any(
@@ -401,7 +403,7 @@ class Branch(Element, Communicatable, Relational):
401
403
  # -------------------------------------------------------------------------
402
404
  # Conversion / Serialization
403
405
  # -------------------------------------------------------------------------
404
- def to_df(self, *, progression: Progression = None) -> pd.DataFrame:
406
+ def to_df(self, *, progression: Progression = None):
405
407
  """
406
408
  Convert branch messages into a `pandas.DataFrame`.
407
409
 
@@ -412,6 +414,8 @@ class Branch(Element, Communicatable, Relational):
412
414
  Returns:
413
415
  pd.DataFrame: Each row represents a message, with columns defined by MESSAGE_FIELDS.
414
416
  """
417
+ from lionagi.protocols.generic.pile import Pile
418
+
415
419
  if progression is None:
416
420
  progression = self.msgs.progression
417
421
 
@@ -429,7 +433,7 @@ class Branch(Element, Communicatable, Relational):
429
433
  def send(
430
434
  self,
431
435
  recipient: IDType,
432
- category: PackageCategory | None,
436
+ category: Optional["PackageCategory"],
433
437
  item: Any,
434
438
  request_source: IDType | None = None,
435
439
  ) -> None:
@@ -446,6 +450,8 @@ class Branch(Element, Communicatable, Relational):
446
450
  request_source (IDType | None):
447
451
  The ID that prompted or requested this send operation (optional).
448
452
  """
453
+ from lionagi.protocols.mail.package import Package
454
+
449
455
  package = Package(
450
456
  category=category,
451
457
  item=item,
@@ -833,7 +839,7 @@ class Branch(Element, Communicatable, Relational):
833
839
  ] = "return_value",
834
840
  max_retries: int = 3,
835
841
  request_type: type[BaseModel] = None,
836
- operative: Operative = None,
842
+ operative: "Operative" = None,
837
843
  similarity_algo="jaro_winkler",
838
844
  similarity_threshold: float = 0.85,
839
845
  fuzzy_match: bool = True,
@@ -911,8 +917,8 @@ class Branch(Element, Communicatable, Relational):
911
917
  instruction: Instruction | JsonValue = None,
912
918
  guidance: JsonValue = None,
913
919
  context: JsonValue = None,
914
- sender: SenderRecipient = None,
915
- recipient: SenderRecipient = None,
920
+ sender: "SenderRecipient" = None,
921
+ recipient: "SenderRecipient" = None,
916
922
  progression: Progression = None,
917
923
  chat_model: iModel = None,
918
924
  invoke_actions: bool = True,
@@ -922,7 +928,7 @@ class Branch(Element, Communicatable, Relational):
922
928
  parse_model: iModel = None,
923
929
  skip_validation: bool = False,
924
930
  tools: ToolRef = None,
925
- operative: Operative = None,
931
+ operative: "Operative" = None,
926
932
  response_format: type[
927
933
  BaseModel
928
934
  ] = None, # alias of operative.request_type
@@ -1063,8 +1069,8 @@ class Branch(Element, Communicatable, Relational):
1063
1069
  guidance: JsonValue = None,
1064
1070
  context: JsonValue = None,
1065
1071
  plain_content: str = None,
1066
- sender: SenderRecipient = None,
1067
- recipient: SenderRecipient = None,
1072
+ sender: "SenderRecipient" = None,
1073
+ recipient: "SenderRecipient" = None,
1068
1074
  progression: ID.IDSeq = None,
1069
1075
  response_format: type[BaseModel] = None,
1070
1076
  request_fields: dict | list[str] = None,
@@ -6,7 +6,6 @@ import contextlib
6
6
  from collections.abc import Callable
7
7
  from typing import Any
8
8
 
9
- import pandas as pd
10
9
  from pydantic import (
11
10
  Field,
12
11
  JsonValue,
@@ -19,7 +18,6 @@ from typing_extensions import Self
19
18
  from lionagi.protocols.types import (
20
19
  ID,
21
20
  MESSAGE_FIELDS,
22
- ActionManager,
23
21
  Communicatable,
24
22
  Exchange,
25
23
  Graph,
@@ -33,13 +31,12 @@ from lionagi.protocols.types import (
33
31
  RoledMessage,
34
32
  SenderRecipient,
35
33
  System,
36
- Tool,
37
34
  )
38
35
 
39
36
  from .._errors import ItemNotFoundError
40
37
  from ..ln import lcall
41
38
  from ..service.imodel import iModel
42
- from .branch import Branch, OperationManager
39
+ from .branch import ActionManager, Branch, OperationManager, Tool
43
40
 
44
41
 
45
42
  class Session(Node, Communicatable, Relational):
@@ -257,7 +254,7 @@ class Session(Node, Communicatable, Relational):
257
254
  branches: ID.RefSeq = None,
258
255
  exclude_clone: bool = False,
259
256
  exlcude_load: bool = False,
260
- ) -> pd.DataFrame:
257
+ ):
261
258
  out = self.concat_messages(
262
259
  branches=branches,
263
260
  exclude_clone=exclude_clone,
@@ -298,19 +295,6 @@ class Session(Node, Communicatable, Relational):
298
295
  collections=messages, item_type={RoledMessage}, strict_type=False
299
296
  )
300
297
 
301
- def to_df(
302
- self,
303
- branches: ID.RefSeq = None,
304
- exclude_clone: bool = False,
305
- exclude_load: bool = False,
306
- ) -> pd.DataFrame:
307
- out = self.concat_messages(
308
- branches=branches,
309
- exclude_clone=exclude_clone,
310
- exclude_load=exclude_load,
311
- )
312
- return out.to_df(columns=MESSAGE_FIELDS)
313
-
314
298
  def send(self, to_: ID.RefSeq = None):
315
299
  """
316
300
  Send mail to specified branches.
lionagi/version.py CHANGED
@@ -1 +1 @@
1
- __version__ = "0.16.3"
1
+ __version__ = "0.17.0"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: lionagi
3
- Version: 0.16.3
3
+ Version: 0.17.0
4
4
  Summary: An Intelligence Operating System.
5
5
  Author-email: HaiyangLi <quantocean.li@gmail.com>
6
6
  License: Apache License
@@ -228,7 +228,7 @@ Requires-Dist: json-repair>=0.40.0
228
228
  Requires-Dist: msgspec>=0.18.0
229
229
  Requires-Dist: pydantic-settings>=2.8.0
230
230
  Requires-Dist: pydantic>=2.8.0
231
- Requires-Dist: pydapter[pandas]>=1.1.1
231
+ Requires-Dist: pydapter>=1.1.1
232
232
  Requires-Dist: python-dotenv>=1.1.0
233
233
  Requires-Dist: tiktoken>=0.9.0
234
234
  Provides-Extra: all
@@ -6,10 +6,10 @@ lionagi/config.py,sha256=D13nnjpgJKz_LlQrzaKKVefm4hqesz_dP9ROjWmGuLE,3811
6
6
  lionagi/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
7
7
  lionagi/settings.py,sha256=HDuKCEJCpc4HudKodBnhoQUGuTGhRHdlIFhbtf3VBtY,1633
8
8
  lionagi/utils.py,sha256=pfAibR84sx-aPxGNPrdlHqUAf2OXoCBGRCMseMrzhi4,18046
9
- lionagi/version.py,sha256=VI_bTBU6ZbRZpVhA2ix956hkRwHW57V59GEZJkhU-vc,23
9
+ lionagi/version.py,sha256=XpM3lncCzPBIwMSvDN7i10pke_c6KdJtVLZYbCiaTRw,23
10
10
  lionagi/adapters/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
11
- lionagi/adapters/_utils.py,sha256=Lq_tP6zU5HasADuHNDLQf7mqdPSwKyayvfJBLx41Pag,444
12
- lionagi/adapters/async_postgres_adapter.py,sha256=StjdjzHVkYOC_xVfmaVBd0E34tdsUrbR3ENSpmZIfeI,3169
11
+ lionagi/adapters/_utils.py,sha256=sniMG1LDDkwJNzUF2K32jv7rA6Y1QcohgyNclYsptzI,453
12
+ lionagi/adapters/async_postgres_adapter.py,sha256=2XlxYNPow78dFHIQs8W1oJ2zkVD5Udn3aynMBF9Nf3k,3498
13
13
  lionagi/fields/__init__.py,sha256=yrn9NDAM6_v73kK7aJeb-Pvqigeu8WASaV-My-6CDsc,939
14
14
  lionagi/fields/action.py,sha256=OziEpbaUeEVo34KdtbzDxXJBgkf3QLxlcKIQAfHe4O0,5791
15
15
  lionagi/fields/base.py,sha256=mvgqxLonCROszMjnG8QWt00l-MvIr_mnGvCtaH-SQ_k,3814
@@ -37,10 +37,10 @@ lionagi/libs/validate/__init__.py,sha256=5y5joOZzfFWERl75auAcNcKC3lImVJ5ZZGvvHZU
37
37
  lionagi/libs/validate/common_field_validators.py,sha256=1BHznXnJYcLQrHqvHKUnP6aqCptuQ0qN7KJRCExcJBU,4778
38
38
  lionagi/libs/validate/to_num.py,sha256=ZRHDjpTCykPfDIZZa4rZKNaR_8ZHbPDFlw9rc02DrII,11610
39
39
  lionagi/libs/validate/validate_boolean.py,sha256=bjiX_WZ3Bg8XcqoWLzE1G9BpO0AisrlZUxrpye_mlGk,3614
40
- lionagi/ln/__init__.py,sha256=6AUiutwLj15M6R6Z2915AC3zKQoLcuqwnnmMJ6OOcq0,1689
40
+ lionagi/ln/__init__.py,sha256=dQvfTU1MHUrG4C4KoqEs7Xg801seML-GNjihbdUtp3E,1575
41
41
  lionagi/ln/_async_call.py,sha256=mnqq5l-hNIBWrWh7X7CtmwPafg1kT-lnWWm3nJnbPoI,9384
42
42
  lionagi/ln/_hash.py,sha256=WLwKsbJISE7KtOrpiE30AFtfwyOCSBjb1GslBlvj5ac,4529
43
- lionagi/ln/_json_dump.py,sha256=r3Hwsl94Z9b4Kr6PCT-AYXWZkEeFXuPwpbpLDPjooew,10550
43
+ lionagi/ln/_json_dump.py,sha256=zOeoOE3JbaGAzL-lfAdMqdgaXWYXFliqcgXsZ_pxonI,10347
44
44
  lionagi/ln/_list_call.py,sha256=zvISmCeNAH7yjBcusQI1s17n556tILgePhRMdAM2plA,2831
45
45
  lionagi/ln/_to_list.py,sha256=YOlrMplSpQhXDSTK4fkMF7Mhuw1wS0jGip5mS88Otro,6610
46
46
  lionagi/ln/_utils.py,sha256=5Z_AsDxdtH5wNB-P4IiihhH0dYUcZMT-hTxFQBQPwL0,4303
@@ -68,20 +68,21 @@ lionagi/models/hashable_model.py,sha256=oOqR3OJCU9cJfWHiG0WaEw0GMqfE2WTt4cy7WsAs
68
68
  lionagi/models/model_params.py,sha256=zVU-PHp3skjK5ZVjpsPs1k_VJiS8X0hgct0xs6Z6W_Y,10955
69
69
  lionagi/models/operable_model.py,sha256=Zm_Hxdauqyh0za3_TJLCZ3g6nR4F45Rrnc0ZM3d54Gs,20111
70
70
  lionagi/models/schema_model.py,sha256=ghRIM8aBNaToAknwNlhQKpuKXcwzyCw5pDE31bVKxs0,667
71
- lionagi/operations/__init__.py,sha256=a1EqxC5jRgVM1z_srZsxXtTC2Q6iA79ofpcd7cyT3B8,632
72
- lionagi/operations/builder.py,sha256=tMl3zZkp-dQAdR27chrAmjmYVaJGshP7tf6AyNJyCUw,23177
73
- lionagi/operations/flow.py,sha256=ZfCN_xlPuI2ZJAPL4opYNkTvNMaVQxTq-HKRZ4Lybjk,22248
71
+ lionagi/operations/__init__.py,sha256=DU9sIhtw1vPBVllZ1Fbum8GE3qC9yfyQtt6_8vyv_cA,444
72
+ lionagi/operations/_visualize_graph.py,sha256=F0KadgRthP-6-R-FPgvlwiiaiWH3ueO-rjSd1bzRUbE,8594
73
+ lionagi/operations/builder.py,sha256=c6OIBwIX2-V4oH7wRBQf4SEs38L9lHdSX1ODb7ETLuI,14722
74
+ lionagi/operations/flow.py,sha256=StGPmpPLe_ZFVwWmc9RiUpH7i1gkhN4q7A94ax0_b1E,22298
74
75
  lionagi/operations/manager.py,sha256=YZr3VjPAZVVFd_bIjF1aoQqzzKZHNA1kcqefNi5QFFM,683
75
- lionagi/operations/node.py,sha256=qmjhv-8UzQMO5ocBlNWuv9nqQiLh5CV7AW_tno8jIUM,3183
76
- lionagi/operations/types.py,sha256=fM8HphnbBifMzhoKKvdl3JxGCBHlEGPJEYkLWj9b7vE,704
77
- lionagi/operations/utils.py,sha256=b8HmpF5vRgmf6PTzg3_fZCIKMnhoGa0HCyOlX6JCz7g,1263
76
+ lionagi/operations/node.py,sha256=zntelS3kO6q4H6vpS2lpw3iNUTLR3a6I3dp07fdSGJs,3465
77
+ lionagi/operations/types.py,sha256=zBhTQ4od4yXo84_Osbed7Zqhnp-PA90mrjGsQSSCuzw,644
78
+ lionagi/operations/utils.py,sha256=xSRJkPyorhUHkibtW45ICGkGwrg7IkIALXIYBtvj6cc,1373
78
79
  lionagi/operations/ReAct/ReAct.py,sha256=UzW3MClv9_w1AqrZIuATOZ9ASTb8HPD0Rlotlp0mYOg,13388
79
80
  lionagi/operations/ReAct/__init__.py,sha256=5y5joOZzfFWERl75auAcNcKC3lImVJ5ZZGvvHZUFCJM,112
80
81
  lionagi/operations/ReAct/utils.py,sha256=qYh-zTRCHXyuNpSgBmooTG0TVp9Pdht0tONPwdv8BT4,4102
81
82
  lionagi/operations/_act/__init__.py,sha256=5y5joOZzfFWERl75auAcNcKC3lImVJ5ZZGvvHZUFCJM,112
82
83
  lionagi/operations/_act/act.py,sha256=LfN4UqTTHVvO1h9tqmDhVfVafVUOry4YGEivIZbmLqc,2810
83
84
  lionagi/operations/brainstorm/__init__.py,sha256=5y5joOZzfFWERl75auAcNcKC3lImVJ5ZZGvvHZUFCJM,112
84
- lionagi/operations/brainstorm/brainstorm.py,sha256=FBgw0YIx18fFms_6Oiz9kklKWrq-ncJeJV-d05MH_BI,18781
85
+ lionagi/operations/brainstorm/brainstorm.py,sha256=o7szKzx9axhBB656p3wDnFM_syXKFhIHt25CJ28XiGI,18797
85
86
  lionagi/operations/brainstorm/prompt.py,sha256=Dqi4NNeztdI4iutggRqjnOrG4a4E2JtwIAtRnjZ_ghQ,610
86
87
  lionagi/operations/chat/__init__.py,sha256=5y5joOZzfFWERl75auAcNcKC3lImVJ5ZZGvvHZUFCJM,112
87
88
  lionagi/operations/chat/chat.py,sha256=F5ugFtMm4OdNCQhaKN-0ezIcfInR_za5I7WbBC9qfzQ,5493
@@ -92,9 +93,9 @@ lionagi/operations/instruct/instruct.py,sha256=7pxhyP5jxwpgqjmQNb1rnGF4QAVlbMENp
92
93
  lionagi/operations/interpret/__init__.py,sha256=5y5joOZzfFWERl75auAcNcKC3lImVJ5ZZGvvHZUFCJM,112
93
94
  lionagi/operations/interpret/interpret.py,sha256=yl1NSp2iOm3dbycVLEcnV3absnqKoubfH15v6lQgySU,1500
94
95
  lionagi/operations/operate/__init__.py,sha256=5y5joOZzfFWERl75auAcNcKC3lImVJ5ZZGvvHZUFCJM,112
95
- lionagi/operations/operate/operate.py,sha256=SHk-BqjUWnN5aT7Xrm3lzR6yDppq_i2sbN8Iny8PelE,7512
96
+ lionagi/operations/operate/operate.py,sha256=I20CwJGx-hxlZ3kmd0-Hh6kWbqCCA3-aJMR8hHHpzd4,7532
96
97
  lionagi/operations/parse/__init__.py,sha256=5y5joOZzfFWERl75auAcNcKC3lImVJ5ZZGvvHZUFCJM,112
97
- lionagi/operations/parse/parse.py,sha256=dePMjGF-ReP4Z32iTzaqNY0wSV2u_JSIV_X8qDZONqU,6649
98
+ lionagi/operations/parse/parse.py,sha256=gI6xbMdc7XDHYyfJRMlH4YBorxMmKhGSQZ2oHlrmULs,6590
98
99
  lionagi/operations/plan/__init__.py,sha256=yGBPll6lOqVjadbTvDLGrTlMx3FfBW-e00z7AMvg7Uo,156
99
100
  lionagi/operations/plan/plan.py,sha256=qonV5kJjJCBAWfsvH7gqUj5Gyo-N-Nh_2dr-OZcDQ1Q,15315
100
101
  lionagi/operations/plan/prompt.py,sha256=GUNZ8RpHIa89D-_y7GK--Spg0JADI3K13sjf_w3a2mI,993
@@ -105,7 +106,7 @@ lionagi/protocols/__init__.py,sha256=5y5joOZzfFWERl75auAcNcKC3lImVJ5ZZGvvHZUFCJM
105
106
  lionagi/protocols/_concepts.py,sha256=ZBN5OYpLMWLrl9uZqSg9GD4uwf60V4VHcxRnBTRWIRc,1555
106
107
  lionagi/protocols/contracts.py,sha256=ii7luaPJsEKOb3J-rcaNysPDGU3nEzpgy_8g1z5_CCA,1398
107
108
  lionagi/protocols/ids.py,sha256=RM40pP_4waMJcfCGmEK_PfS8-k_DuDbC1fG-2Peuf6s,2472
108
- lionagi/protocols/types.py,sha256=EEmgYcaMCbgLU2rk7lTyKyRh_B15BeMccciv097j3Eg,2828
109
+ lionagi/protocols/types.py,sha256=6GJ5ZgDyWl8tckNLXB0z8jbtkordWpgm5r4ht31KVRc,2431
109
110
  lionagi/protocols/action/__init__.py,sha256=5y5joOZzfFWERl75auAcNcKC3lImVJ5ZZGvvHZUFCJM,112
110
111
  lionagi/protocols/action/function_calling.py,sha256=jFy6Ruh3QWkERtBHXqPWVwrOH5aDitEo8oJHZgW5xnI,5066
111
112
  lionagi/protocols/action/manager.py,sha256=XmdQIaVgSpmFBFW9kbW_rdwdQmlBteP4VRanxh_f918,8549
@@ -119,14 +120,13 @@ lionagi/protocols/generic/__init__.py,sha256=5y5joOZzfFWERl75auAcNcKC3lImVJ5ZZGv
119
120
  lionagi/protocols/generic/element.py,sha256=yD4SWNOGZsLTgxtz6TKtJfqkUvDmUH9wIH3Liw6QmmA,15839
120
121
  lionagi/protocols/generic/event.py,sha256=n5EraAJ5bPiwegTdkxsILs7-vFJwmnXhB2om4xMQnK0,6529
121
122
  lionagi/protocols/generic/log.py,sha256=AnPr2RweSZcJdxOK0KGb1eyvAPZmME3hEm9HraUoftQ,8212
122
- lionagi/protocols/generic/pile.py,sha256=zfTb2yBva6hqrPd7TB8KmwLCb4Np87LR_N-bISDTcXE,37044
123
+ lionagi/protocols/generic/pile.py,sha256=AHxj1q5apabATmdgGXlAhkcqIug9r_75wmufdq9XLt4,36894
123
124
  lionagi/protocols/generic/processor.py,sha256=uiNIldAYPEujuboLFyrIJADMlhRghy3H86hYintj5D4,11705
124
125
  lionagi/protocols/generic/progression.py,sha256=HCV_EnQCFvjg6D7eF4ygGrZNQPEOtu75zvW1sJbAVrM,15190
125
126
  lionagi/protocols/graph/__init__.py,sha256=UPu3OmUpjSgX2aBuBJUdG2fppGlfqAH96hU0qIMBMp0,253
126
- lionagi/protocols/graph/_utils.py,sha256=mts4M2wcGKdY9hC-1917lxIJT5oycW9VnRgfRx8ydbI,605
127
127
  lionagi/protocols/graph/edge.py,sha256=YxSGj4w_fG7khm-zpKduuK5fJzhJDx23JhU1dZp29d8,5241
128
- lionagi/protocols/graph/graph.py,sha256=eczTdL6XoeSmG6gqF-iTQXDurPAq0y1jMF0FNoCjUX4,10586
129
- lionagi/protocols/graph/node.py,sha256=DZapkk4SJSzDEB1BfD3S2DUelcheTha2JoW8rSIcqxY,4562
128
+ lionagi/protocols/graph/graph.py,sha256=l-12vTRblpWS_M4Ae-NTZThdeioaQvmhCS83mjB2fe8,11159
129
+ lionagi/protocols/graph/node.py,sha256=TuPNHSlkSpqp7nxUV2gj-SkCZVkY4ZocnB79ONlkY6o,4467
130
130
  lionagi/protocols/mail/__init__.py,sha256=5y5joOZzfFWERl75auAcNcKC3lImVJ5ZZGvvHZUFCJM,112
131
131
  lionagi/protocols/mail/exchange.py,sha256=P1PcrFylIBeiQa8kox9H1qyJ4kjhUlbLiTUT8rs1OXg,7041
132
132
  lionagi/protocols/mail/mail.py,sha256=RB5CUft_4J85H9nM9g6aRXomTaqKwF5xVjJacPAhoa8,1356
@@ -140,7 +140,7 @@ lionagi/protocols/messages/assistant_response.py,sha256=jrzRPVHHDnPw86Xp0IHnPy0t
140
140
  lionagi/protocols/messages/base.py,sha256=Ng1Q8yIIIFauUv53LnwDeyOrM-cSCfsHM1GwkxChf2o,2317
141
141
  lionagi/protocols/messages/instruction.py,sha256=Qpme1oSc406V3-F2iOyqC8TVT2GWVduZaoDfdGdBnDI,21127
142
142
  lionagi/protocols/messages/manager.py,sha256=ABDiN-QULbfbSrHVlPe3kqBxr7e7sYoT49wHQMLiT6c,16897
143
- lionagi/protocols/messages/message.py,sha256=y8jSG5GQUjppvvMRDOWGlPNQn_I8MgATiU1AjsH2TKQ,7953
143
+ lionagi/protocols/messages/message.py,sha256=invP8Lu7bep_y5ve97LD9engQCHmhg7BhV5H3B0umvc,7941
144
144
  lionagi/protocols/messages/system.py,sha256=x0F1C57SFHaO2-Z9cy1QshYlxv8wjl7VppooaGKbMIg,4658
145
145
  lionagi/protocols/messages/templates/README.md,sha256=Ch4JrKSjd85fLitAYO1OhZjNOGKHoEwaKQlcV16jiUI,1286
146
146
  lionagi/protocols/messages/templates/action_request.jinja2,sha256=d6OmxHKyvvNDSK4bnBM3TGSUk_HeE_Q2EtLAQ0ZBEJg,120
@@ -161,7 +161,7 @@ lionagi/service/token_calculator.py,sha256=piTidArzUkIMCtOLC_HBLoZNYZcENQywgeKM3
161
161
  lionagi/service/types.py,sha256=9zX08BhdmPE9FE1YTyvsy14hdDGRYzyyVBmoBURzQvI,1096
162
162
  lionagi/service/connections/__init__.py,sha256=yHQZ7OJpCftd6CStYR8inbxjJydYdmv9kCvbUBhJ2zU,362
163
163
  lionagi/service/connections/api_calling.py,sha256=fY-fzwSJvQKpUT27TF0MTfE5TxroYKkL4SHWYrmYznI,9958
164
- lionagi/service/connections/endpoint.py,sha256=kpSWQzPWh4WdjlZRuTAmPmeg-Z9g2NFx4b_pJMkWJq0,15055
164
+ lionagi/service/connections/endpoint.py,sha256=0r4-8NPyAvLNey09BBsUr5KGJCXchBmVZm2pCe3Nbq4,15165
165
165
  lionagi/service/connections/endpoint_config.py,sha256=6sA06uCzriT6p0kFxhDCFH8N6V6MVp8ytlOw5ctBhDI,5169
166
166
  lionagi/service/connections/header_factory.py,sha256=IYeTQQk7r8FXcdhmW7orCxHjNO-Nb1EOXhgNK7CAp-I,1821
167
167
  lionagi/service/connections/match_endpoint.py,sha256=QlOw9CbR1peExP-b-XlkRpqqGIksfNefI2EZCw9P7_E,2575
@@ -187,15 +187,15 @@ lionagi/service/third_party/exa_models.py,sha256=G_hnekcy-DillPLzMoDQ8ZisVAL8Mp7
187
187
  lionagi/service/third_party/openai_model_names.py,sha256=C44tnqexgc4ZU2-3I_sn5d688hf3WWx-25xBd50bvas,5121
188
188
  lionagi/service/third_party/pplx_models.py,sha256=-EhyJgOWR6rzSv3zczUtk80X6c19p18Dg9KC6l8BFRQ,6473
189
189
  lionagi/session/__init__.py,sha256=kDypY6L3kGPnatAw7YNQAykgg-9MlIBnlhHExaXvt-c,202
190
- lionagi/session/branch.py,sha256=3AZMLLinpVGRd6e99I9AxYx03U2CBG68dgJRKe1NGDo,64808
190
+ lionagi/session/branch.py,sha256=Gz9QOhZ2e6UJtTTkqY4P1Oa0UnjXHwIJTP7YCpcbA9o,65064
191
191
  lionagi/session/prompts.py,sha256=GPr0jibyAAqS3awDzGC8SoCL6aWJLLCCbXY0JUuxOC0,3170
192
- lionagi/session/session.py,sha256=OZPLXmKP-WGBU_TW1gAp4sv5WsNqO0VphWCXfbQf5YE,13382
192
+ lionagi/session/session.py,sha256=BVouy9xiqVfD6AucTVs80vSvs7nIKsgGjgvIFgMsO0Q,12970
193
193
  lionagi/tools/__init__.py,sha256=5y5joOZzfFWERl75auAcNcKC3lImVJ5ZZGvvHZUFCJM,112
194
194
  lionagi/tools/base.py,sha256=hEGnE4MD0CM4UqnF0xsDRKB0aM-pyrTFHl8utHhyJLU,1897
195
195
  lionagi/tools/types.py,sha256=XtJLY0m-Yi_ZLWhm0KycayvqMCZd--HxfQ0x9vFUYDE,230
196
196
  lionagi/tools/file/__init__.py,sha256=5y5joOZzfFWERl75auAcNcKC3lImVJ5ZZGvvHZUFCJM,112
197
197
  lionagi/tools/file/reader.py,sha256=2YKgU3VKo76zfL_buDAUQJoPLC56f6WJ4_mdJjlMDIM,9509
198
- lionagi-0.16.3.dist-info/METADATA,sha256=OF1sbSC2VVo8wFFfP8HFf5r42g53Q0QjxUAUj3bxW8k,22682
199
- lionagi-0.16.3.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
200
- lionagi-0.16.3.dist-info/licenses/LICENSE,sha256=VXFWsdoN5AAknBCgFqQNgPWYx7OPp-PFEP961zGdOjc,11288
201
- lionagi-0.16.3.dist-info/RECORD,,
198
+ lionagi-0.17.0.dist-info/METADATA,sha256=x9SSUvfLlKC40Tta8exQJnp7T5ajT9dX-FjFCW3iBvc,22674
199
+ lionagi-0.17.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
200
+ lionagi-0.17.0.dist-info/licenses/LICENSE,sha256=VXFWsdoN5AAknBCgFqQNgPWYx7OPp-PFEP961zGdOjc,11288
201
+ lionagi-0.17.0.dist-info/RECORD,,
@@ -1,22 +0,0 @@
1
- def check_networkx_available():
2
- try:
3
- from networkx import DiGraph # noqa: F401
4
-
5
- return True
6
- except Exception:
7
- return ImportError(
8
- "The 'networkx' package is required for this feature. "
9
- "Please install `networkx` or `'lionagi[graph]'`."
10
- )
11
-
12
-
13
- def check_matplotlib_available():
14
- try:
15
- import matplotlib.pyplot as plt
16
-
17
- return True
18
- except Exception:
19
- return ImportError(
20
- "The 'matplotlib' package is required for this feature. "
21
- "Please install `matplotlib` or `'lionagi[graph]'`."
22
- )