lionagi 0.8.7__py3-none-any.whl → 0.8.8__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,7 @@ class Event(Element):
86
86
  """
87
87
 
88
88
  execution: Execution = Field(default_factory=Execution)
89
+ streaming: bool = False
89
90
 
90
91
  @field_serializer("execution")
91
92
  def _serialize_execution(self, val: Execution) -> dict:
@@ -160,6 +161,15 @@ class Event(Element):
160
161
  """
161
162
  raise NotImplementedError("Override in subclass.")
162
163
 
164
+ async def stream(self) -> None:
165
+ """Performs the event action asynchronously, streaming results.
166
+
167
+ Raises:
168
+ NotImplementedError: This base method must be overridden by
169
+ subclasses.
170
+ """
171
+ raise NotImplementedError("Override in subclass.")
172
+
163
173
  @classmethod
164
174
  def from_dict(cls, data: dict) -> "Event":
165
175
  """Not implemented. Events cannot be fully recreated once done.
@@ -31,6 +31,7 @@ class Processor(Observer):
31
31
  self,
32
32
  queue_capacity: int,
33
33
  capacity_refresh_time: float,
34
+ concurrency_limit: int,
34
35
  ) -> None:
35
36
  """Initializes a Processor instance.
36
37
 
@@ -56,6 +57,10 @@ class Processor(Observer):
56
57
  self._available_capacity = queue_capacity
57
58
  self._execution_mode = False
58
59
  self._stop_event = asyncio.Event()
60
+ if concurrency_limit:
61
+ self._concurrency_sem = asyncio.Semaphore(concurrency_limit)
62
+ else:
63
+ self._concurrency_sem = None
59
64
 
60
65
  @property
61
66
  def available_capacity(self) -> int:
@@ -144,8 +149,11 @@ class Processor(Observer):
144
149
  next_event = await self.dequeue()
145
150
 
146
151
  if await self.request_permission(**next_event.request):
147
- next_event.status = EventStatus.PROCESSING
148
- task = asyncio.create_task(next_event.invoke())
152
+
153
+ if next_event.streaming:
154
+ task = asyncio.create_task(next_event.stream())
155
+ else:
156
+ task = asyncio.create_task(next_event.invoke())
149
157
  tasks.add(task)
150
158
 
151
159
  prev_event = next_event
@@ -3,13 +3,16 @@
3
3
  # SPDX-License-Identifier: Apache-2.0
4
4
 
5
5
  import asyncio
6
+ import json
6
7
  import logging
7
8
  from abc import ABC
9
+ from collections.abc import AsyncGenerator
8
10
  from typing import Any, Literal
9
11
 
10
12
  import aiohttp
11
13
  from aiocache import cached
12
- from pydantic import BaseModel, ConfigDict, Field
14
+ from pydantic import BaseModel, ConfigDict, Field, model_validator
15
+ from typing_extensions import Self
13
16
 
14
17
  from lionagi._errors import ExecutionError, RateLimitError
15
18
  from lionagi.protocols.generic.event import Event, EventStatus
@@ -347,6 +350,12 @@ class APICalling(Event):
347
350
  is_cached: bool = Field(default=False, exclude=True)
348
351
  should_invoke_endpoint: bool = Field(default=True, exclude=True)
349
352
 
353
+ @model_validator(mode="after")
354
+ def _validate_streaming(self) -> Self:
355
+ if self.payload.get("stream") is True:
356
+ self.streaming = True
357
+ return self
358
+
350
359
  @property
351
360
  def required_tokens(self) -> int | None:
352
361
  """int | None: The number of tokens required for this request."""
@@ -442,10 +451,91 @@ class APICalling(Event):
442
451
  """
443
452
  return await self._inner(**kwargs)
444
453
 
445
- async def stream(self, **kwargs):
454
+ async def _stream(
455
+ self,
456
+ verbose: bool = True,
457
+ output_file: str = None,
458
+ with_response_header: bool = False,
459
+ ) -> AsyncGenerator:
460
+ async with aiohttp.ClientSession() as client:
461
+ async with client.request(
462
+ method=self.endpoint.method.upper(),
463
+ url=self.endpoint.full_url,
464
+ headers=self.headers,
465
+ json=self.payload,
466
+ ) as response:
467
+ if response.status != 200:
468
+ try:
469
+ error_text = await response.json()
470
+ except Exception:
471
+ error_text = await response.text()
472
+ raise aiohttp.ClientResponseError(
473
+ request_info=response.request_info,
474
+ history=response.history,
475
+ status=response.status,
476
+ message=f"{error_text}",
477
+ headers=response.headers,
478
+ )
479
+
480
+ file_handle = None
481
+
482
+ if output_file:
483
+ try:
484
+ file_handle = open(output_file, "w")
485
+ except Exception as e:
486
+ raise ValueError(
487
+ f"Invalid to output the response "
488
+ f"to {output_file}. Error:{e}"
489
+ )
490
+
491
+ try:
492
+ async for chunk in response.content:
493
+ chunk_str = chunk.decode("utf-8")
494
+ chunk_list = chunk_str.split("data:")
495
+ for c in chunk_list:
496
+ c = c.strip()
497
+ if c and c != "[DONE]":
498
+ try:
499
+ if file_handle:
500
+ file_handle.write(c + "\n")
501
+ c_dict = json.loads(c)
502
+ if verbose:
503
+ if c_dict.get("choices"):
504
+ if content := c_dict["choices"][0][
505
+ "delta"
506
+ ].get("content"):
507
+ print(
508
+ content, end="", flush=True
509
+ )
510
+ yield c_dict
511
+ except json.JSONDecodeError:
512
+ yield c
513
+ except asyncio.CancelledError as e:
514
+ raise e
515
+
516
+ if with_response_header:
517
+ yield response.headers
518
+
519
+ finally:
520
+ if file_handle:
521
+ file_handle.close()
522
+
523
+ async def stream(
524
+ self,
525
+ verbose: bool = True,
526
+ output_file: str = None,
527
+ with_response_header: bool = False,
528
+ **kwargs,
529
+ ) -> AsyncGenerator:
446
530
  """Performs a streaming request, if supported by the endpoint.
447
531
 
448
532
  Args:
533
+ verbose (bool):
534
+ If True, prints the response content to the console.
535
+ output_file (str):
536
+ If set, writes the response content to this file. (only applies to non-endpoint invoke)
537
+ with_response_header (bool):
538
+ If True, yields the response headers as well. (only applies to non-endpoint invoke)
449
539
  **kwargs: Additional parameters for the streaming call.
450
540
 
451
541
  Yields:
@@ -456,23 +546,39 @@ class APICalling(Event):
456
546
  """
457
547
  start = asyncio.get_event_loop().time()
458
548
  response = []
459
- if not self.endpoint.is_streamable:
460
- raise ValueError(
461
- f"Endpoint {self.endpoint.endpoint} is not streamable."
462
- )
463
-
464
- async for i in self.endpoint._stream(
465
- self.payload, self.headers, **kwargs
466
- ):
467
- content = i.choices[0].delta.content
468
- if content is not None:
469
- print(content, end="", flush=True)
470
- response.append(i)
471
- yield i
472
-
473
- self.execution.duration = asyncio.get_event_loop().time() - start
474
- self.execution.response = response
475
- self.execution.status = EventStatus.COMPLETED
549
+ e1 = None
550
+ try:
551
+ if self.should_invoke_endpoint and self.endpoint.is_streamable:
552
+ async for i in self.endpoint._stream(
553
+ self.payload, self.headers, **kwargs
554
+ ):
555
+ content = i.choices[0].delta.content
556
+ if verbose:
557
+ if content is not None:
558
+ print(content, end="", flush=True)
559
+ response.append(i)
560
+ yield i
561
+ else:
562
+ async for i in self._stream(
563
+ verbose=verbose,
564
+ output_file=output_file,
565
+ with_response_header=with_response_header,
566
+ ):
567
+ response.append(i)
568
+ yield i
569
+ except Exception as e:
570
+ e1 = e
571
+ finally:
572
+ self.execution.duration = asyncio.get_event_loop().time() - start
573
+ if not response and e1:
574
+ self.execution.error = str(e1)
575
+ self.execution.status = EventStatus.FAILED
576
+ logging.error(
577
+ f"API call to {self.endpoint.full_url} failed: {e1}"
578
+ )
579
+ else:
580
+ self.execution.response = response
581
+ self.execution.status = EventStatus.COMPLETED
476
582
 
477
583
  async def invoke(self) -> None:
478
584
  """Invokes the API call, updating the execution state with results.
@@ -483,9 +589,10 @@ class APICalling(Event):
483
589
  """
484
590
  start = asyncio.get_event_loop().time()
485
591
  kwargs = {"headers": self.headers, "json": self.payload}
592
+ response = None
593
+ e1 = None
486
594
 
487
595
  try:
488
- response = None
489
596
  if self.should_invoke_endpoint and self.endpoint.is_invokeable:
490
597
  response = await self.endpoint.invoke(
491
598
  payload=self.payload,
@@ -498,14 +605,20 @@ class APICalling(Event):
498
605
  else:
499
606
  response = await self._inner(**kwargs)
500
607
 
501
- self.execution.duration = asyncio.get_event_loop().time() - start
502
- self.execution.response = response
503
- self.execution.status = EventStatus.COMPLETED
504
608
  except Exception as e:
609
+ e1 = e
610
+
611
+ finally:
505
612
  self.execution.duration = asyncio.get_event_loop().time() - start
506
- self.execution.error = str(e)
507
- self.execution.status = EventStatus.FAILED
508
- logging.error(f"API call to {self.endpoint.full_url} failed: {e}")
613
+ if not response and e1:
614
+ self.execution.error = str(e1)
615
+ self.execution.status = EventStatus.FAILED
616
+ logging.error(
617
+ f"API call to {self.endpoint.full_url} failed: {e1}"
618
+ )
619
+ else:
620
+ self.execution.response = response
621
+ self.execution.status = EventStatus.COMPLETED
509
622
 
510
623
  def __str__(self) -> str:
511
624
  return (
@@ -27,10 +27,13 @@ class ChatCompletionEndPoint(EndPoint):
27
27
  headers: dict,
28
28
  **kwargs,
29
29
  ):
30
- import litellm
30
+ from lionagi.libs.package.imports import check_import
31
+
32
+ check_import("litellm")
33
+ import litellm # type: ignore
31
34
 
32
35
  litellm.drop_params = True
33
- from litellm import acompletion
36
+ from litellm import acompletion # type: ignore
34
37
 
35
38
  provider = self.config.provider
36
39
 
@@ -64,10 +67,13 @@ class ChatCompletionEndPoint(EndPoint):
64
67
  headers: dict,
65
68
  **kwargs,
66
69
  ) -> AsyncGenerator:
67
- import litellm
70
+ from lionagi.libs.package.imports import check_import
71
+
72
+ check_import("litellm")
73
+ import litellm # type: ignore
68
74
 
69
75
  litellm.drop_params = True
70
- from litellm import acompletion
76
+ from litellm import acompletion # type: ignore
71
77
 
72
78
  provider = self.config.provider
73
79
 
@@ -28,8 +28,13 @@ class RateLimitedAPIProcessor(Processor):
28
28
  interval: float | None = None,
29
29
  limit_requests: int = None,
30
30
  limit_tokens: int = None,
31
+ concurrency_limit: int | None = None,
31
32
  ):
32
- super().__init__(queue_capacity, capacity_refresh_time)
33
+ super().__init__(
34
+ queue_capacity=queue_capacity,
35
+ capacity_refresh_time=capacity_refresh_time,
36
+ concurrency_limit=concurrency_limit,
37
+ )
33
38
  self.limit_tokens = limit_tokens
34
39
  self.limit_requests = limit_requests
35
40
  self.interval = interval or self.capacity_refresh_time
@@ -37,6 +42,9 @@ class RateLimitedAPIProcessor(Processor):
37
42
  self.available_token = self.limit_tokens
38
43
  self._rate_limit_replenisher_task: asyncio.Task | None = None
39
44
  self._lock: asyncio.Lock = asyncio.Lock()
45
+ self._concurrency_sem = asyncio.Semaphore(
46
+ concurrency_limit or queue_capacity
47
+ )
40
48
 
41
49
  async def start_replenishing(self):
42
50
  """Start replenishing rate limit capacities at regular intervals."""
@@ -74,6 +82,7 @@ class RateLimitedAPIProcessor(Processor):
74
82
  interval: float | None = None,
75
83
  limit_requests: int = None,
76
84
  limit_tokens: int = None,
85
+ concurrency_limit: int | None = None,
77
86
  ) -> Self:
78
87
  self = cls(
79
88
  interval=interval,
@@ -81,6 +90,7 @@ class RateLimitedAPIProcessor(Processor):
81
90
  capacity_refresh_time=capacity_refresh_time,
82
91
  limit_requests=limit_requests,
83
92
  limit_tokens=limit_tokens,
93
+ concurrency_limit=concurrency_limit,
84
94
  )
85
95
  self._rate_limit_replenisher_task = asyncio.create_task(
86
96
  self.start_replenishing()
@@ -126,6 +136,7 @@ class RateLimitedAPIExecutor(Executor):
126
136
  limit_requests: int = None,
127
137
  limit_tokens: int = None,
128
138
  strict_event_type: bool = False,
139
+ concurrency_limit: int | None = None,
129
140
  ):
130
141
  config = {
131
142
  "queue_capacity": queue_capacity,
@@ -133,13 +144,13 @@ class RateLimitedAPIExecutor(Executor):
133
144
  "interval": interval,
134
145
  "limit_requests": limit_requests,
135
146
  "limit_tokens": limit_tokens,
147
+ "concurrency_limit": concurrency_limit,
136
148
  }
137
-
149
+ super().__init__(
150
+ processor_config=config, strict_event_type=strict_event_type
151
+ )
138
152
  self.config = config
139
153
  self.interval = interval
140
154
  self.limit_requests = limit_requests
141
155
  self.limit_tokens = limit_tokens
142
-
143
- super().__init__(
144
- processor_config=config, strict_event_type=strict_event_type
145
- )
156
+ self.concurrency_limit = concurrency_limit or queue_capacity
lionagi/service/imodel.py CHANGED
@@ -2,11 +2,16 @@
2
2
  #
3
3
  # SPDX-License-Identifier: Apache-2.0
4
4
 
5
+ import asyncio
5
6
  import os
6
7
  import warnings
8
+ from collections.abc import AsyncGenerator, Callable
7
9
 
8
10
  from pydantic import BaseModel
9
11
 
12
+ from lionagi.protocols.generic.event import EventStatus
13
+ from lionagi.utils import is_coro_func
14
+
10
15
  from .endpoints.base import APICalling, EndPoint
11
16
  from .endpoints.match_endpoint import match_endpoint
12
17
  from .endpoints.rate_limited_processor import RateLimitedAPIExecutor
@@ -54,7 +59,9 @@ class iModel:
54
59
  interval: float | None = None,
55
60
  limit_requests: int = None,
56
61
  limit_tokens: int = None,
57
- invoke_with_endpoint: bool = True,
62
+ invoke_with_endpoint: bool = False,
63
+ concurrency_limit: int | None = None,
64
+ streaming_process_func: Callable = None,
58
65
  **kwargs,
59
66
  ) -> None:
60
67
  """Initializes the iModel instance.
@@ -88,6 +95,9 @@ class iModel:
88
95
  invoke_with_endpoint (bool, optional):
89
96
  If True, the endpoint is actually invoked. If False,
90
97
  calls might be mocked or cached.
98
+ concurrency_limit (int | None, optional):
99
+ Maximum number of streaming concurrent requests allowed.
100
+ only applies to streaming requests.
91
101
  **kwargs:
92
102
  Additional keyword arguments, such as `model`, or any other
93
103
  provider-specific fields.
@@ -144,7 +154,14 @@ class iModel:
144
154
  interval=interval,
145
155
  limit_requests=limit_requests,
146
156
  limit_tokens=limit_tokens,
157
+ concurrency_limit=concurrency_limit,
147
158
  )
159
+ if not streaming_process_func and hasattr(
160
+ self.endpoint, "process_chunk"
161
+ ):
162
+ self.streaming_process_func = self.endpoint.process_chunk
163
+ else:
164
+ self.streaming_process_func = streaming_process_func
148
165
 
149
166
  def create_api_calling(self, **kwargs) -> APICalling:
150
167
  """Constructs an `APICalling` object from endpoint-specific payload.
@@ -179,9 +196,12 @@ class iModel:
179
196
  chunk:
180
197
  A portion of the streamed data returned by the API.
181
198
  """
182
- pass
199
+ if self.streaming_process_func and not isinstance(chunk, APICalling):
200
+ if is_coro_func(self.streaming_process_func):
201
+ return await self.streaming_process_func(chunk)
202
+ return self.streaming_process_func(chunk)
183
203
 
184
- async def stream(self, **kwargs) -> APICalling | None:
204
+ async def stream(self, api_call=None, **kwargs) -> AsyncGenerator:
185
205
  """Performs a streaming API call with the given arguments.
186
206
 
187
207
  Args:
@@ -193,14 +213,38 @@ class iModel:
193
213
  An APICalling instance upon success, or None if something
194
214
  goes wrong.
195
215
  """
196
- try:
216
+ if api_call is None:
197
217
  kwargs["stream"] = True
198
218
  api_call = self.create_api_calling(**kwargs)
199
- async for i in api_call.stream():
200
- await self.process_chunk(i)
201
- return api_call
202
- except Exception as e:
203
- raise ValueError(f"Failed to stream API call: {e}")
219
+ await self.executor.append(api_call)
220
+
221
+ if (
222
+ self.executor.processor is None
223
+ or self.executor.processor.is_stopped()
224
+ ):
225
+ await self.executor.start()
226
+
227
+ if self.executor.processor._concurrency_sem:
228
+ async with self.executor.processor._concurrency_sem:
229
+ try:
230
+ async for i in api_call.stream():
231
+ result = await self.process_chunk(i)
232
+ if result:
233
+ yield result
234
+ except Exception as e:
235
+ raise ValueError(f"Failed to stream API call: {e}")
236
+ finally:
237
+ yield self.executor.pile.pop(api_call.id)
238
+ else:
239
+ try:
240
+ async for i in api_call.stream():
241
+ result = await self.process_chunk(i)
242
+ if result:
243
+ yield result
244
+ except Exception as e:
245
+ raise ValueError(f"Failed to stream API call: {e}")
246
+ finally:
247
+ yield self.executor.pile.pop(api_call.id)
204
248
 
205
249
  async def invoke(
206
250
  self, api_call: APICalling = None, **kwargs
@@ -232,10 +276,20 @@ class iModel:
232
276
 
233
277
  await self.executor.append(api_call)
234
278
  await self.executor.forward()
235
- if api_call.id in self.executor.completed_events:
236
- return self.executor.pile.pop(api_call.id)
279
+ ctr = 0
280
+ while api_call.status not in (
281
+ EventStatus.COMPLETED,
282
+ EventStatus.FAILED,
283
+ ):
284
+ if ctr > 100:
285
+ break
286
+ await self.executor.forward()
287
+ ctr += 1
288
+ await asyncio.sleep(0.1)
237
289
  except Exception as e:
238
290
  raise ValueError(f"Failed to invoke API call: {e}")
291
+ finally:
292
+ return self.executor.pile.pop(api_call.id)
239
293
 
240
294
  @property
241
295
  def allowed_roles(self) -> set[str]:
lionagi/session/branch.py CHANGED
@@ -577,6 +577,7 @@ class Branch(Element, Communicatable, Relational):
577
577
  request_options: type[BaseModel] = None,
578
578
  description: str = None,
579
579
  update: bool = False,
580
+ **kwargs,
580
581
  ):
581
582
  if not imodel:
582
583
  imodel = iModel(
@@ -591,6 +592,7 @@ class Branch(Element, Communicatable, Relational):
591
592
  limit_requests=limit_requests,
592
593
  limit_tokens=limit_tokens,
593
594
  invoke_with_endpoint=invoke_with_endpoint,
595
+ **kwargs,
594
596
  )
595
597
 
596
598
  if not update and name in self.tools:
File without changes
@@ -6,7 +6,7 @@ from pydantic import BaseModel, Field, field_validator
6
6
  from lionagi.operatives.action.tool import Tool
7
7
  from lionagi.utils import to_num
8
8
 
9
- from .base import LionTool
9
+ from ..base import LionTool
10
10
 
11
11
 
12
12
  class ReaderAction(str, Enum):
lionagi/tools/types.py CHANGED
@@ -1,3 +1,3 @@
1
- from .reader import ReaderTool
1
+ from .file.reader import ReaderTool
2
2
 
3
3
  __all__ = ("ReaderTool",)
lionagi/version.py CHANGED
@@ -1 +1 @@
1
- __version__ = "0.8.7"
1
+ __version__ = "0.8.8"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: lionagi
3
- Version: 0.8.7
3
+ Version: 0.8.8
4
4
  Summary: An Intelligence Operating System.
5
5
  Author-email: HaiyangLi <quantocean.li@gmail.com>
6
6
  License: Apache License
@@ -222,11 +222,11 @@ Requires-Python: >=3.10
222
222
  Requires-Dist: aiocache>=0.12.0
223
223
  Requires-Dist: aiohttp>=3.11.0
224
224
  Requires-Dist: jinja2>=3.1.0
225
- Requires-Dist: litellm>=1.55.3
226
225
  Requires-Dist: pandas>=2.0.0
227
226
  Requires-Dist: pillow>=10.0.0
228
227
  Requires-Dist: pydantic>=2.0.0
229
228
  Requires-Dist: python-dotenv>=1.0.1
229
+ Requires-Dist: tiktoken>=0.8.0
230
230
  Description-Content-Type: text/markdown
231
231
 
232
232
  ![PyPI - Version](https://img.shields.io/pypi/v/lionagi?labelColor=233476aa&color=231fc935)
@@ -256,11 +256,14 @@ pip install lionagi
256
256
  ```
257
257
 
258
258
  Dependencies:
259
- litellm
259
+ aiocahce
260
+ • aiohttp
260
261
  • jinja2
261
262
  • pandas
262
263
  • pillow
264
+ • pydantic
263
265
  • python-dotenv
266
+ • tiktoken
264
267
 
265
268
  ## Quick Start
266
269
  ```python
@@ -4,7 +4,7 @@ lionagi/_errors.py,sha256=wNKdnVQvE_CHEstK7htrrj334RA_vbGcIds-3pUiRkc,455
4
4
  lionagi/_types.py,sha256=9g7iytvSj3UjZxD-jL06_fxuNfgZyWT3Qnp0XYp1wQU,63
5
5
  lionagi/settings.py,sha256=k9zRJXv57TveyfHO3Vr9VGiKrSwlRUUVKt5zf6v9RU4,1627
6
6
  lionagi/utils.py,sha256=QbF4E1PG-BaRcEVH3kJIYCJVNq-oRNoTxjda5k8NYW4,73177
7
- lionagi/version.py,sha256=vTwvdJOZi8jZb9U-Em7-d50qNDNPS2z51IXqRoojeNM,22
7
+ lionagi/version.py,sha256=S5bBAK8bL7bybaXGJQuNE98fa3H65zGjTASMiyKGJGw,22
8
8
  lionagi/libs/__init__.py,sha256=v8vNyJVIVj8_Oz9RJdVe6ZKUQMYTgDh1VQpnr1KdLaw,112
9
9
  lionagi/libs/parse.py,sha256=tpEbmIRGuHhLCJlUlm6fjmqm_Z6XJLAXGNFHNuk422I,1011
10
10
  lionagi/libs/file/__init__.py,sha256=v8vNyJVIVj8_Oz9RJdVe6ZKUQMYTgDh1VQpnr1KdLaw,112
@@ -129,10 +129,10 @@ lionagi/protocols/adapters/pandas_/pd_dataframe_adapter.py,sha256=ULGZVhK5aaOuTr
129
129
  lionagi/protocols/adapters/pandas_/pd_series_adapter.py,sha256=TX3cqFtgEip8JqVqkjdJYOu4PQGpW1yYU6POhvz8Jeg,1388
130
130
  lionagi/protocols/generic/__init__.py,sha256=v8vNyJVIVj8_Oz9RJdVe6ZKUQMYTgDh1VQpnr1KdLaw,112
131
131
  lionagi/protocols/generic/element.py,sha256=6RPUqs3FOdSC65QOwnfBD9yKVsWnmb878kmfas0m928,14169
132
- lionagi/protocols/generic/event.py,sha256=SjR9N4Egr5_oqOBSKVsxQjsn6MlqNcwf48bee-qIT6Y,4879
132
+ lionagi/protocols/generic/event.py,sha256=8_581UqtCPCRPYVjTRtFQc_huky10xV4Rn9dxIwMjaA,5200
133
133
  lionagi/protocols/generic/log.py,sha256=xi8dRKwxtxVYU8T_E4wYJE4lCQzkERgAUARcAN7ZngI,7441
134
134
  lionagi/protocols/generic/pile.py,sha256=Nx4IkWDC5Tdykrw_uGrudgS6Yrz1v1Sykv8t74Deuic,31434
135
- lionagi/protocols/generic/processor.py,sha256=4Gkie1DxE0U-uZAdNBTuTibUlyeEGm_OyVlMXilCEm8,10115
135
+ lionagi/protocols/generic/processor.py,sha256=n1DFmLY4bfvrSQNQ5tQ0_Pkyq0lzP9cYtDAmX4yC5Pc,10382
136
136
  lionagi/protocols/generic/progression.py,sha256=OAirlukJ34rKRipv8MtG7PvvJRkq8nz-RIYB-Yi39Mo,15189
137
137
  lionagi/protocols/graph/__init__.py,sha256=v8vNyJVIVj8_Oz9RJdVe6ZKUQMYTgDh1VQpnr1KdLaw,112
138
138
  lionagi/protocols/graph/edge.py,sha256=cEbhqapsdJqHx5VhPwXwOkahfC7E7XZNbRqGixt_EFc,5229
@@ -161,14 +161,14 @@ lionagi/protocols/messages/templates/instruction_message.jinja2,sha256=L-ptw5OHx
161
161
  lionagi/protocols/messages/templates/system_message.jinja2,sha256=JRKJ0aFpYfaXSFouKc_N4unZ35C3yZTOWhIrIdCB5qk,215
162
162
  lionagi/protocols/messages/templates/tool_schemas.jinja2,sha256=ozIaSDCRjIAhLyA8VM6S-YqS0w2NcctALSwx4LjDwII,126
163
163
  lionagi/service/__init__.py,sha256=DMGXIqPsmut9H5GT0ZeSzQIzYzzPwI-2gLXydpbwiV8,21
164
- lionagi/service/imodel.py,sha256=zQq9cdVPpEAPB7IscntExvtHOYA5ToiWonmD2n93pEw,12273
164
+ lionagi/service/imodel.py,sha256=KCIwRXf8djr5S-t_Vc9dZGvVIzLyirDWDbOcb7ECMsw,14470
165
165
  lionagi/service/manager.py,sha256=MKSYBkg23s7YhZy5GEFdnpspEnhPVfFhpkpoJe20D7k,1435
166
166
  lionagi/service/types.py,sha256=v9SAn5-GTmds4Mar13Or_VFrRHCinBK99dmeDUd-QNk,486
167
167
  lionagi/service/endpoints/__init__.py,sha256=v8vNyJVIVj8_Oz9RJdVe6ZKUQMYTgDh1VQpnr1KdLaw,112
168
- lionagi/service/endpoints/base.py,sha256=SaYobDBCdKd4398TyFPp5u3PKyMnzEbm6PsoUxVkZDA,18605
169
- lionagi/service/endpoints/chat_completion.py,sha256=9ltSQaKPH43WdEDW32_-f5x07I9hOU8g-T_PAG-nYsQ,2529
168
+ lionagi/service/endpoints/base.py,sha256=KovCttNJ0h22vmg3wSxZK7IE7jsydw4L3xXbjTOynq8,23134
169
+ lionagi/service/endpoints/chat_completion.py,sha256=-LsmBdYEwEhREEbti_81nTMy_pgaX9xteukj8IPq_bI,2783
170
170
  lionagi/service/endpoints/match_endpoint.py,sha256=hIGYyok1y53FfI6av5NfYMygRIpDWYZbdCj0pJJfmPY,1874
171
- lionagi/service/endpoints/rate_limited_processor.py,sha256=umri0FofbyBSFdAQBEsviDB5K6N12LkRiXQgSOorGKg,4663
171
+ lionagi/service/endpoints/rate_limited_processor.py,sha256=kOFp7oTKZXQDdbgyCYKvR-zUIq_WPEfeRDF0SkCbtCs,5199
172
172
  lionagi/service/endpoints/token_calculator.py,sha256=MflqImGUr_1jh465hB7cUAaIPICBkjirvre1fWGXLrA,6161
173
173
  lionagi/service/providers/__init__.py,sha256=v8vNyJVIVj8_Oz9RJdVe6ZKUQMYTgDh1VQpnr1KdLaw,112
174
174
  lionagi/service/providers/types.py,sha256=NS91ysRFwOs0cpNeQgFhmtl7JrSz2pJm-tt7sZILmQY,683
@@ -188,13 +188,14 @@ lionagi/service/providers/perplexity_/__init__.py,sha256=v8vNyJVIVj8_Oz9RJdVe6ZK
188
188
  lionagi/service/providers/perplexity_/chat_completions.py,sha256=jhE-KHWRX6yYEeKWLMCKLgK3bQzieSv2viqQWDP8q0Q,1197
189
189
  lionagi/service/providers/perplexity_/models.py,sha256=gXH4XGkhZ4aFxvMSDTlHq9Rz1mhu3aTENXAtE-BIr6U,4866
190
190
  lionagi/session/__init__.py,sha256=v8vNyJVIVj8_Oz9RJdVe6ZKUQMYTgDh1VQpnr1KdLaw,112
191
- lionagi/session/branch.py,sha256=EH1JhOe1ZGlCVXpf0znz_xAA3GibNIGFATwLAyxiCK0,67835
191
+ lionagi/session/branch.py,sha256=cSdhebkS3Shc-ZwS1KpoEOidiq2AqQBidli1jwezFz4,67879
192
192
  lionagi/session/session.py,sha256=po6C7PnM0iu_ISHUo4PBzzQ61HFOgcsAUfPoO--eLak,8987
193
193
  lionagi/tools/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
194
194
  lionagi/tools/base.py,sha256=ffaIcLF_uwEphCkP_wsa3UfkqVenML3HpsnR5kRCTtA,236
195
- lionagi/tools/reader.py,sha256=jYWgEfyQZ7TR5-cW7ceGhz6b47eWlSS0bAvbCnHh1-I,7504
196
- lionagi/tools/types.py,sha256=_OWzoTHTcqNwPs3OGrPkpO9m_vHDCxVDL-FN-t6ZD60,58
197
- lionagi-0.8.7.dist-info/METADATA,sha256=-mm0T59W8n5E3bk73nVaqEsxn6bYCrgEIYNZ389h-Tw,18008
198
- lionagi-0.8.7.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
199
- lionagi-0.8.7.dist-info/licenses/LICENSE,sha256=VXFWsdoN5AAknBCgFqQNgPWYx7OPp-PFEP961zGdOjc,11288
200
- lionagi-0.8.7.dist-info/RECORD,,
195
+ lionagi/tools/types.py,sha256=O6ipx7zX0piaIQ3c8V3zHWrXH-1gdIe-KQ4xTPSiLp0,63
196
+ lionagi/tools/file/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
197
+ lionagi/tools/file/reader.py,sha256=o6tgqNmxNq64al4hqNS_whPQbH2CP7YygYQUhTmfjQU,7505
198
+ lionagi-0.8.8.dist-info/METADATA,sha256=_BdfHxsxVZfXAAFEu--AZNNVPrlfeThuhogbDWq9I4s,18053
199
+ lionagi-0.8.8.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
200
+ lionagi-0.8.8.dist-info/licenses/LICENSE,sha256=VXFWsdoN5AAknBCgFqQNgPWYx7OPp-PFEP961zGdOjc,11288
201
+ lionagi-0.8.8.dist-info/RECORD,,