lionagi 0.16.2__py3-none-any.whl → 0.16.3__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.
Files changed (44) hide show
  1. lionagi/adapters/_utils.py +0 -14
  2. lionagi/ln/__init__.py +4 -0
  3. lionagi/ln/fuzzy/__init__.py +4 -1
  4. lionagi/ln/fuzzy/_fuzzy_validate.py +109 -0
  5. lionagi/ln/fuzzy/_to_dict.py +388 -0
  6. lionagi/models/__init__.py +0 -2
  7. lionagi/operations/communicate/communicate.py +1 -1
  8. lionagi/operations/parse/parse.py +1 -1
  9. lionagi/protocols/generic/pile.py +1 -1
  10. lionagi/protocols/operatives/operative.py +2 -2
  11. lionagi/service/connections/match_endpoint.py +2 -10
  12. lionagi/service/connections/providers/types.py +1 -3
  13. lionagi/service/hooks/hook_event.py +1 -1
  14. lionagi/service/hooks/hook_registry.py +1 -1
  15. lionagi/service/rate_limited_processor.py +1 -1
  16. lionagi/utils.py +3 -335
  17. lionagi/version.py +1 -1
  18. {lionagi-0.16.2.dist-info → lionagi-0.16.3.dist-info}/METADATA +3 -12
  19. {lionagi-0.16.2.dist-info → lionagi-0.16.3.dist-info}/RECORD +21 -43
  20. lionagi/adapters/postgres_model_adapter.py +0 -131
  21. lionagi/libs/concurrency.py +0 -1
  22. lionagi/libs/nested/__init__.py +0 -3
  23. lionagi/libs/nested/flatten.py +0 -172
  24. lionagi/libs/nested/nfilter.py +0 -59
  25. lionagi/libs/nested/nget.py +0 -45
  26. lionagi/libs/nested/ninsert.py +0 -104
  27. lionagi/libs/nested/nmerge.py +0 -158
  28. lionagi/libs/nested/npop.py +0 -69
  29. lionagi/libs/nested/nset.py +0 -94
  30. lionagi/libs/nested/unflatten.py +0 -83
  31. lionagi/libs/nested/utils.py +0 -189
  32. lionagi/libs/parse.py +0 -31
  33. lionagi/libs/schema/json_schema.py +0 -231
  34. lionagi/libs/unstructured/__init__.py +0 -0
  35. lionagi/libs/unstructured/pdf_to_image.py +0 -45
  36. lionagi/libs/unstructured/read_image_to_base64.py +0 -33
  37. lionagi/libs/validate/fuzzy_match_keys.py +0 -7
  38. lionagi/libs/validate/fuzzy_validate_mapping.py +0 -144
  39. lionagi/libs/validate/string_similarity.py +0 -7
  40. lionagi/libs/validate/xml_parser.py +0 -203
  41. lionagi/models/note.py +0 -387
  42. lionagi/service/connections/providers/claude_code_.py +0 -299
  43. {lionagi-0.16.2.dist-info → lionagi-0.16.3.dist-info}/WHEEL +0 -0
  44. {lionagi-0.16.2.dist-info → lionagi-0.16.3.dist-info}/licenses/LICENSE +0 -0
lionagi/utils.py CHANGED
@@ -2,23 +2,12 @@
2
2
  #
3
3
  # SPDX-License-Identifier: Apache-2.0
4
4
 
5
- import contextlib
6
5
  import copy as _copy
7
- import dataclasses
8
- import json
9
6
  import logging
10
7
  import types
11
8
  import uuid
12
- from collections.abc import (
13
- AsyncGenerator,
14
- Callable,
15
- Iterable,
16
- Mapping,
17
- Sequence,
18
- )
9
+ from collections.abc import AsyncGenerator, Callable, Iterable, Mapping
19
10
  from datetime import datetime, timezone
20
- from enum import Enum as _Enum
21
- from functools import partial
22
11
  from inspect import isclass
23
12
  from pathlib import Path
24
13
  from typing import (
@@ -32,7 +21,6 @@ from typing import (
32
21
  )
33
22
 
34
23
  from pydantic import BaseModel
35
- from pydantic_core import PydanticUndefinedType
36
24
  from typing_extensions import deprecated
37
25
 
38
26
  from .ln import (
@@ -43,6 +31,7 @@ from .ln import (
43
31
  import_module,
44
32
  is_coro_func,
45
33
  is_import_installed,
34
+ to_dict,
46
35
  to_list,
47
36
  )
48
37
  from .ln.types import (
@@ -113,6 +102,7 @@ __all__ = (
113
102
  "MaybeUnset",
114
103
  "is_import_installed",
115
104
  "import_module",
105
+ "to_dict",
116
106
  )
117
107
 
118
108
 
@@ -531,328 +521,6 @@ def create_path(
531
521
  return full_path
532
522
 
533
523
 
534
- def to_dict(
535
- input_: Any,
536
- /,
537
- *,
538
- use_model_dump: bool = True,
539
- fuzzy_parse: bool = False,
540
- suppress: bool = False,
541
- str_type: Literal["json", "xml"] | None = "json",
542
- parser: Callable[[str], Any] | None = None,
543
- recursive: bool = False,
544
- max_recursive_depth: int = None,
545
- recursive_python_only: bool = True,
546
- use_enum_values: bool = False,
547
- **kwargs: Any,
548
- ) -> dict[str, Any]:
549
- """
550
- Convert various input types to a dictionary, with optional recursive processing.
551
-
552
- Args:
553
- input_: The input to convert.
554
- use_model_dump: Use model_dump() for Pydantic models if available.
555
- fuzzy_parse: Use fuzzy parsing for string inputs.
556
- suppress: Return empty dict on errors if True.
557
- str_type: Input string type ("json" or "xml").
558
- parser: Custom parser function for string inputs.
559
- recursive: Enable recursive conversion of nested structures.
560
- max_recursive_depth: Maximum recursion depth (default 5, max 10).
561
- recursive_python_only: If False, attempts to convert custom types recursively.
562
- use_enum_values: Use enum values instead of names.
563
- **kwargs: Additional arguments for parsing functions.
564
-
565
- Returns:
566
- dict[str, Any]: A dictionary derived from the input.
567
-
568
- Raises:
569
- ValueError: If parsing fails and suppress is False.
570
-
571
- Examples:
572
- >>> to_dict({"a": 1, "b": [2, 3]})
573
- {'a': 1, 'b': [2, 3]}
574
- >>> to_dict('{"x": 10}', str_type="json")
575
- {'x': 10}
576
- >>> to_dict({"a": {"b": {"c": 1}}}, recursive=True, max_recursive_depth=2)
577
- {'a': {'b': {'c': 1}}}
578
- """
579
-
580
- try:
581
- if recursive:
582
- input_ = recursive_to_dict(
583
- input_,
584
- use_model_dump=use_model_dump,
585
- fuzzy_parse=fuzzy_parse,
586
- str_type=str_type,
587
- parser=parser,
588
- max_recursive_depth=max_recursive_depth,
589
- recursive_custom_types=not recursive_python_only,
590
- use_enum_values=use_enum_values,
591
- **kwargs,
592
- )
593
-
594
- return _to_dict(
595
- input_,
596
- fuzzy_parse=fuzzy_parse,
597
- parser=parser,
598
- str_type=str_type,
599
- use_model_dump=use_model_dump,
600
- use_enum_values=use_enum_values,
601
- **kwargs,
602
- )
603
- except Exception as e:
604
- if suppress or input_ == "":
605
- return {}
606
- raise e
607
-
608
-
609
- def recursive_to_dict(
610
- input_: Any,
611
- /,
612
- *,
613
- max_recursive_depth: int = None,
614
- recursive_custom_types: bool = False,
615
- **kwargs: Any,
616
- ) -> Any:
617
- if not isinstance(max_recursive_depth, int):
618
- max_recursive_depth = 5
619
- else:
620
- if max_recursive_depth < 0:
621
- raise ValueError(
622
- "max_recursive_depth must be a non-negative integer"
623
- )
624
- if max_recursive_depth == 0:
625
- return input_
626
- if max_recursive_depth > 10:
627
- raise ValueError(
628
- "max_recursive_depth must be less than or equal to 10"
629
- )
630
-
631
- return _recur_to_dict(
632
- input_,
633
- max_recursive_depth=max_recursive_depth,
634
- current_depth=0,
635
- recursive_custom_types=recursive_custom_types,
636
- **kwargs,
637
- )
638
-
639
-
640
- def _recur_to_dict(
641
- input_: Any,
642
- /,
643
- *,
644
- max_recursive_depth: int,
645
- current_depth: int = 0,
646
- recursive_custom_types: bool = False,
647
- **kwargs: Any,
648
- ) -> Any:
649
- if current_depth >= max_recursive_depth:
650
- return input_
651
-
652
- if isinstance(input_, str):
653
- try:
654
- # Attempt to parse the string
655
- parsed = _to_dict(input_, **kwargs)
656
- # Recursively process the parsed result
657
- return _recur_to_dict(
658
- parsed,
659
- max_recursive_depth=max_recursive_depth,
660
- current_depth=current_depth + 1,
661
- recursive_custom_types=recursive_custom_types,
662
- **kwargs,
663
- )
664
- except Exception:
665
- # Return the original string if parsing fails
666
- return input_
667
-
668
- elif isinstance(input_, dict):
669
- # Recursively process dictionary values
670
- return {
671
- key: _recur_to_dict(
672
- value,
673
- max_recursive_depth=max_recursive_depth,
674
- current_depth=current_depth + 1,
675
- recursive_custom_types=recursive_custom_types,
676
- **kwargs,
677
- )
678
- for key, value in input_.items()
679
- }
680
-
681
- elif isinstance(input_, (list, tuple, set)):
682
- # Recursively process list or tuple elements
683
- processed = [
684
- _recur_to_dict(
685
- element,
686
- max_recursive_depth=max_recursive_depth,
687
- current_depth=current_depth + 1,
688
- recursive_custom_types=recursive_custom_types,
689
- **kwargs,
690
- )
691
- for element in input_
692
- ]
693
- return type(input_)(processed)
694
-
695
- elif isinstance(input_, type) and issubclass(input_, _Enum):
696
- try:
697
- obj_dict = _to_dict(input_, **kwargs)
698
- return _recur_to_dict(
699
- obj_dict,
700
- max_recursive_depth=max_recursive_depth,
701
- current_depth=current_depth + 1,
702
- **kwargs,
703
- )
704
- except Exception:
705
- return input_
706
-
707
- elif recursive_custom_types:
708
- # Process custom classes if enabled
709
- try:
710
- obj_dict = _to_dict(input_, **kwargs)
711
- return _recur_to_dict(
712
- obj_dict,
713
- max_recursive_depth=max_recursive_depth,
714
- current_depth=current_depth + 1,
715
- recursive_custom_types=recursive_custom_types,
716
- **kwargs,
717
- )
718
- except Exception:
719
- return input_
720
-
721
- else:
722
- # Return the input as is for other data types
723
- return input_
724
-
725
-
726
- def _enum_to_dict(input_, /, use_enum_values: bool = True):
727
- dict_ = dict(input_.__members__).copy()
728
- if use_enum_values:
729
- return {key: value.value for key, value in dict_.items()}
730
- return dict_
731
-
732
-
733
- def _str_to_dict(
734
- input_: str,
735
- /,
736
- fuzzy_parse: bool = False,
737
- str_type: Literal["json", "xml"] | None = "json",
738
- parser: Callable[[str], Any] | None = None,
739
- remove_root: bool = False,
740
- root_tag: str = "root",
741
- **kwargs: Any,
742
- ):
743
- """
744
- kwargs for parser
745
- """
746
- if not parser:
747
- if str_type == "xml" and not parser:
748
- from .libs.validate.xml_parser import xml_to_dict
749
-
750
- parser = partial(
751
- xml_to_dict, remove_root=remove_root, root_tag=root_tag
752
- )
753
-
754
- elif fuzzy_parse:
755
- parser = fuzzy_parse_json
756
- else:
757
- parser = json.loads
758
-
759
- return parser(input_, **kwargs)
760
-
761
-
762
- def _na_to_dict(input_: type[None] | UndefinedType | PydanticUndefinedType, /):
763
- return {}
764
-
765
-
766
- def _model_to_dict(input_: Any, /, use_model_dump=True, **kwargs):
767
- """
768
- kwargs: built-in serialization methods kwargs
769
- accepted built-in serialization methods:
770
- - mdoel_dump
771
- - to_dict
772
- - to_json
773
- - dict
774
- - json
775
- """
776
-
777
- if use_model_dump and hasattr(input_, "model_dump"):
778
- return input_.model_dump(**kwargs)
779
-
780
- methods = (
781
- "to_dict",
782
- "to_json",
783
- "json",
784
- "dict",
785
- )
786
- for method in methods:
787
- if hasattr(input_, method):
788
- result = getattr(input_, method)(**kwargs)
789
- return json.loads(result) if isinstance(result, str) else result
790
-
791
- if hasattr(input_, "__dict__"):
792
- return input_.__dict__
793
-
794
- try:
795
- return dict(input_)
796
- except Exception as e:
797
- raise ValueError(f"Unable to convert input to dictionary: {e}")
798
-
799
-
800
- def _set_to_dict(input_: set, /) -> dict:
801
- return {v: v for v in input_}
802
-
803
-
804
- def _iterable_to_dict(input_: Iterable, /) -> dict:
805
- return {idx: v for idx, v in enumerate(input_)}
806
-
807
-
808
- def _to_dict(
809
- input_: Any,
810
- /,
811
- *,
812
- fuzzy_parse: bool = False,
813
- str_type: Literal["json", "xml"] | None = "json",
814
- parser: Callable[[str], Any] | None = None,
815
- remove_root: bool = False,
816
- root_tag: str = "root",
817
- use_model_dump: bool = True,
818
- use_enum_values: bool = True,
819
- **kwargs: Any,
820
- ) -> dict[str, Any]:
821
- if isinstance(input_, set):
822
- return _set_to_dict(input_)
823
-
824
- if isinstance(input_, type) and issubclass(input_, _Enum):
825
- return _enum_to_dict(input_, use_enum_values=use_enum_values)
826
-
827
- if isinstance(input_, Mapping):
828
- return dict(input_)
829
-
830
- if isinstance(input_, type(None) | UndefinedType | PydanticUndefinedType):
831
- return _na_to_dict(input_)
832
-
833
- if isinstance(input_, str):
834
- return _str_to_dict(
835
- input_,
836
- fuzzy_parse=fuzzy_parse,
837
- str_type=str_type,
838
- parser=parser,
839
- remove_root=remove_root,
840
- root_tag=root_tag,
841
- **kwargs,
842
- )
843
-
844
- if isinstance(input_, BaseModel) or not isinstance(input_, Sequence):
845
- return _model_to_dict(input_, use_model_dump=use_model_dump, **kwargs)
846
-
847
- if isinstance(input_, Iterable):
848
- return _iterable_to_dict(input_)
849
-
850
- with contextlib.suppress(Exception):
851
- return dataclasses.asdict(input_)
852
-
853
- return dict(input_)
854
-
855
-
856
524
  def get_bins(input_: list[str], upper: int) -> list[list[int]]:
857
525
  """Organizes indices of strings into bins based on a cumulative upper limit.
858
526
 
lionagi/version.py CHANGED
@@ -1 +1 @@
1
- __version__ = "0.16.2"
1
+ __version__ = "0.16.3"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: lionagi
3
- Version: 0.16.2
3
+ Version: 0.16.3
4
4
  Summary: An Intelligence Operating System.
5
5
  Author-email: HaiyangLi <quantocean.li@gmail.com>
6
6
  License: Apache License
@@ -226,8 +226,6 @@ Requires-Dist: backoff>=2.0.0
226
226
  Requires-Dist: jinja2>=3.0.0
227
227
  Requires-Dist: json-repair>=0.40.0
228
228
  Requires-Dist: msgspec>=0.18.0
229
- Requires-Dist: pillow>=10.0.0
230
- Requires-Dist: psutil>=6.0.0
231
229
  Requires-Dist: pydantic-settings>=2.8.0
232
230
  Requires-Dist: pydantic>=2.8.0
233
231
  Requires-Dist: pydapter[pandas]>=1.1.1
@@ -235,7 +233,6 @@ Requires-Dist: python-dotenv>=1.1.0
235
233
  Requires-Dist: tiktoken>=0.9.0
236
234
  Provides-Extra: all
237
235
  Requires-Dist: aiosqlite>=0.21.0; extra == 'all'
238
- Requires-Dist: claude-code-sdk>=0.0.15; extra == 'all'
239
236
  Requires-Dist: datamodel-code-generator>=0.31.2; extra == 'all'
240
237
  Requires-Dist: docling>=2.15.0; extra == 'all'
241
238
  Requires-Dist: fastmcp>=2.10.5; extra == 'all'
@@ -244,8 +241,6 @@ Requires-Dist: networkx>=3.0.0; extra == 'all'
244
241
  Requires-Dist: ollama>=0.4.0; extra == 'all'
245
242
  Requires-Dist: pydapter[postgres]; extra == 'all'
246
243
  Requires-Dist: rich>=13.0.0; extra == 'all'
247
- Provides-Extra: claude-code
248
- Requires-Dist: claude-code-sdk>=0.0.15; extra == 'claude-code'
249
244
  Provides-Extra: graph
250
245
  Requires-Dist: matplotlib>=3.7.0; extra == 'graph'
251
246
  Requires-Dist: networkx>=3.0.0; extra == 'graph'
@@ -263,10 +258,6 @@ Provides-Extra: schema
263
258
  Requires-Dist: datamodel-code-generator>=0.31.2; extra == 'schema'
264
259
  Provides-Extra: sqlite
265
260
  Requires-Dist: aiosqlite>=0.21.0; extra == 'sqlite'
266
- Provides-Extra: tools
267
- Requires-Dist: docling>=2.15.0; extra == 'tools'
268
- Provides-Extra: unstructured
269
- Requires-Dist: opencv-python>=4.2.0.34; extra == 'unstructured'
270
261
  Provides-Extra: xml
271
262
  Requires-Dist: xmltodict>=0.12.0; extra == 'xml'
272
263
  Description-Content-Type: text/markdown
@@ -274,6 +265,7 @@ Description-Content-Type: text/markdown
274
265
  ![PyPI - Version](https://img.shields.io/pypi/v/lionagi?labelColor=233476aa&color=231fc935)
275
266
  ![PyPI - Downloads](https://img.shields.io/pypi/dm/lionagi?color=blue)
276
267
  ![Python Version](https://img.shields.io/badge/python-3.10%2B-blue)
268
+ [![codecov](https://codecov.io/github/khive-ai/lionagi/graph/badge.svg?token=FAE47FY26T)](https://codecov.io/github/khive-ai/lionagi)
277
269
 
278
270
  [Documentation](https://khive-ai.github.io/lionagi/) |
279
271
  [Discord](https://discord.gg/JDj9ENhUE8) |
@@ -416,7 +408,7 @@ Seamlessly route to different models in the same workflow.
416
408
 
417
409
  ### Claude Code Integration
418
410
 
419
- LionAGI now supports Anthropic's Claude Code [Python SDK](https://github.com/anthropics/claude-code-sdk-python), and [CLI SDK](https://docs.anthropic.com/en/docs/claude-code/sdk) enabling autonomous coding capabilities with persistent session management. The CLI endpoint
411
+ LionAGI now supports Anthropic's Claude Code [CLI SDK](https://docs.anthropic.com/en/docs/claude-code/sdk) enabling autonomous coding capabilities with persistent session management. The CLI endpoint
420
412
  directly connects to claude code, and is recommended, you can either use it via a [proxy server](https://github.com/khive-ai/lionagi/tree/main/cookbooks/claude_proxy) or directly with `query_cli` endpoint, provided you have already logged onto claude code cli in your terminal.
421
413
 
422
414
  ```python
@@ -484,7 +476,6 @@ Key features:
484
476
  ```
485
477
  "lionagi[reader]" - Reader tool for any unstructured data and web pages
486
478
  "lionagi[ollama]" - Ollama model support for local inference
487
- "lionagi[claude-code]" - Claude code python SDK integration (cli endpoint does not require this)
488
479
  "lionagi[rich]" - Rich output formatting for better console display
489
480
  "lionagi[schema]" - Convert pydantic schema to make the Model class persistent
490
481
  "lionagi[postgres]" - Postgres database support for storing and retrieving structured data
@@ -5,12 +5,11 @@ lionagi/_types.py,sha256=j8XwSGeGrYwfmSJ8o-80bsfoalLWJgQH41ZkVevc4wk,75
5
5
  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
- lionagi/utils.py,sha256=DEE3ycbUvBDpJIliPfCY7B2HC-nnAcA4p7Xn5HPMTUM,27525
9
- lionagi/version.py,sha256=EHpjUSkwlknz5LyeqzgJmyU4YsLCQqDv3RGeURQ4Phg,23
8
+ lionagi/utils.py,sha256=pfAibR84sx-aPxGNPrdlHqUAf2OXoCBGRCMseMrzhi4,18046
9
+ lionagi/version.py,sha256=VI_bTBU6ZbRZpVhA2ix956hkRwHW57V59GEZJkhU-vc,23
10
10
  lionagi/adapters/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
11
- lionagi/adapters/_utils.py,sha256=n4DS27CZfC-0O_UFaYtlUdjiMx9IeYsGpP7MVaFO5ZA,885
11
+ lionagi/adapters/_utils.py,sha256=Lq_tP6zU5HasADuHNDLQf7mqdPSwKyayvfJBLx41Pag,444
12
12
  lionagi/adapters/async_postgres_adapter.py,sha256=StjdjzHVkYOC_xVfmaVBd0E34tdsUrbR3ENSpmZIfeI,3169
13
- lionagi/adapters/postgres_model_adapter.py,sha256=uwWrbnihtYsCIttHExmtAIZwyohFtKoxnHU1N1M2NvQ,4519
14
13
  lionagi/fields/__init__.py,sha256=yrn9NDAM6_v73kK7aJeb-Pvqigeu8WASaV-My-6CDsc,939
15
14
  lionagi/fields/action.py,sha256=OziEpbaUeEVo34KdtbzDxXJBgkf3QLxlcKIQAfHe4O0,5791
16
15
  lionagi/fields/base.py,sha256=mvgqxLonCROszMjnG8QWt00l-MvIr_mnGvCtaH-SQ_k,3814
@@ -20,8 +19,6 @@ lionagi/fields/instruct.py,sha256=2koYdY7XyJh5lrd7tD_BA9bqCbmpsdTDaASEv_dX4i8,43
20
19
  lionagi/fields/reason.py,sha256=6IjgJWv-dhsGmg5O1sq2J5syBibYfRBy3--7q7_ZpMY,1452
21
20
  lionagi/fields/research.py,sha256=eEPKocx8eQy2E9FExRWVIo6MK_xvmwBAoRZciBY3RG0,1421
22
21
  lionagi/libs/__init__.py,sha256=5y5joOZzfFWERl75auAcNcKC3lImVJ5ZZGvvHZUFCJM,112
23
- lionagi/libs/concurrency.py,sha256=45iic6IdetVFMXFhUWTGfj3g8A0dd2eaVvCSiK-cIWc,57
24
- lionagi/libs/parse.py,sha256=6tDijmB7yzHLHbLtDnc8Bsn7NgIDWta4JKjdwodTF9E,1051
25
22
  lionagi/libs/file/__init__.py,sha256=5y5joOZzfFWERl75auAcNcKC3lImVJ5ZZGvvHZUFCJM,112
26
23
  lionagi/libs/file/_utils.py,sha256=lCNCD-WNUq9f8ZlNecGESIz0GncWkJei8xYtvyY8qd4,334
27
24
  lionagi/libs/file/chunk.py,sha256=XeVMwM33JF0X1W6udz_nhlb3DCevA_EK6A50Hn_e5SY,9300
@@ -30,35 +27,17 @@ lionagi/libs/file/concat_files.py,sha256=FoI983oWFzp9VfFDP7kmbRb3t1CPe5F5LCtsux0
30
27
  lionagi/libs/file/file_ops.py,sha256=HBiIh1EljIJ5VTIXuyvJM0ppSs0YYOPUWmgDMJT634U,3430
31
28
  lionagi/libs/file/process.py,sha256=XTfh1JDPancjFU0qr4-ONB2OXfKKkhQxL49sChYLl-0,8672
32
29
  lionagi/libs/file/save.py,sha256=jTiJMTOK3IiuCz1XbYZlzFmsqiy2q_Xz6subc4ZTJps,3063
33
- lionagi/libs/nested/__init__.py,sha256=5y5joOZzfFWERl75auAcNcKC3lImVJ5ZZGvvHZUFCJM,112
34
- lionagi/libs/nested/flatten.py,sha256=sB4jxZRoaUbjak9RbIWVWNKz2hzkhQJPFffV_Ws1GA0,5479
35
- lionagi/libs/nested/nfilter.py,sha256=kF7AWjLFHr22SOjRBSTx-7iRPaR7gs0FY5Y4XF2sWJ8,1768
36
- lionagi/libs/nested/nget.py,sha256=sQRz3OKx3bYlgoyLSHOXlHzd3ob-f_jmsMfTCNZkJfo,1284
37
- lionagi/libs/nested/ninsert.py,sha256=NiQk4Ne5YKGGW4qiKXDkOkNvrIOeNQsM0lPVCQZ-KMg,3822
38
- lionagi/libs/nested/nmerge.py,sha256=Jve5-BC4XXGVPbYNewrOOb57WOSV50CKMLbwqI0qwgs,5289
39
- lionagi/libs/nested/npop.py,sha256=jxzjDPF-3gGPjrs_jWaG-g1u-kSa74jOI3EotOS4s8I,2173
40
- lionagi/libs/nested/nset.py,sha256=vkLR970hSzj8xCk-Z3RNQMJL2x0uMHmx1pw0VZQx2T0,3393
41
- lionagi/libs/nested/unflatten.py,sha256=lTON1LfCyhZ3xeTEdBiIONcHLQouPcBNARTbXzHZ03U,2618
42
- lionagi/libs/nested/utils.py,sha256=r8xuBpH0qQaHMnCqXPF6unIKzw-TqwVbq-ARooWRERo,6090
43
30
  lionagi/libs/schema/__init__.py,sha256=5y5joOZzfFWERl75auAcNcKC3lImVJ5ZZGvvHZUFCJM,112
44
31
  lionagi/libs/schema/as_readable.py,sha256=p8ke8ZxLwLQxmsJWD_N7Q_AYDYK60nuHztUREbTa5sk,12027
45
32
  lionagi/libs/schema/extract_code_block.py,sha256=PuJbJj1JnqR5fSZudowPcVPpEoKISLr0MjTOOVXSzwY,2394
46
33
  lionagi/libs/schema/extract_docstring.py,sha256=uWyUevXS4JSN60tfouoBBAyE4_jyE-fz45CiS-fvKeI,5714
47
34
  lionagi/libs/schema/function_to_schema.py,sha256=XAB031WbYu3a7eFJyYjXVMAjmtWYSYr5kC_DYgjiuyM,5604
48
- lionagi/libs/schema/json_schema.py,sha256=cuHcaMr748O9g6suNGmRx4tRXcidd5-c7AMGjTIZyHM,7670
49
35
  lionagi/libs/schema/load_pydantic_model_from_schema.py,sha256=WIgJPmOu558az35CfOHvwyyTYQ5OBlk0hchvaEOADjQ,10109
50
- lionagi/libs/unstructured/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
51
- lionagi/libs/unstructured/pdf_to_image.py,sha256=lJ2CVxOYh61-3-55nusHXMOGqtEyLXsXmDjZ9yjkM48,1394
52
- lionagi/libs/unstructured/read_image_to_base64.py,sha256=EJXWBJxCTa9vHBIFPRqQj0jeFXyDv1cs2oPBrWt-waQ,897
53
36
  lionagi/libs/validate/__init__.py,sha256=5y5joOZzfFWERl75auAcNcKC3lImVJ5ZZGvvHZUFCJM,112
54
37
  lionagi/libs/validate/common_field_validators.py,sha256=1BHznXnJYcLQrHqvHKUnP6aqCptuQ0qN7KJRCExcJBU,4778
55
- lionagi/libs/validate/fuzzy_match_keys.py,sha256=Nec5W1CVdmUgzcyDHcHiaELY6tFsicjbVsMI5dsIilk,190
56
- lionagi/libs/validate/fuzzy_validate_mapping.py,sha256=MZpRop3whCQQtgYwJgg66nbN0KxNuKXqulaAgA0Y1_g,4935
57
- lionagi/libs/validate/string_similarity.py,sha256=kuOQFNnI773bV8KKj_PUYxx8vLRdWay8PhuvkOWsU9E,186
58
38
  lionagi/libs/validate/to_num.py,sha256=ZRHDjpTCykPfDIZZa4rZKNaR_8ZHbPDFlw9rc02DrII,11610
59
39
  lionagi/libs/validate/validate_boolean.py,sha256=bjiX_WZ3Bg8XcqoWLzE1G9BpO0AisrlZUxrpye_mlGk,3614
60
- lionagi/libs/validate/xml_parser.py,sha256=PHBYAre4hhthPpDP9Yrp3UYSWdANPx60F1qhxe0m4uw,7004
61
- lionagi/ln/__init__.py,sha256=1D21gwXiZ8rLr9dP7y85MupXkBULRKMO22e5x-iTKN4,1603
40
+ lionagi/ln/__init__.py,sha256=6AUiutwLj15M6R6Z2915AC3zKQoLcuqwnnmMJ6OOcq0,1689
62
41
  lionagi/ln/_async_call.py,sha256=mnqq5l-hNIBWrWh7X7CtmwPafg1kT-lnWWm3nJnbPoI,9384
63
42
  lionagi/ln/_hash.py,sha256=WLwKsbJISE7KtOrpiE30AFtfwyOCSBjb1GslBlvj5ac,4529
64
43
  lionagi/ln/_json_dump.py,sha256=r3Hwsl94Z9b4Kr6PCT-AYXWZkEeFXuPwpbpLDPjooew,10550
@@ -76,17 +55,17 @@ lionagi/ln/concurrency/resource_tracker.py,sha256=ffLr0FkHyaHsUa4UDyWwse-8wGLaLM
76
55
  lionagi/ln/concurrency/task.py,sha256=VS5keFI3Ct0fqCKbFl4kEWT5I2CgjIYizPU-S2YjGKo,2675
77
56
  lionagi/ln/concurrency/throttle.py,sha256=yUAM4hnone6VzlFEos0fWERkZU9YC4J6TncZL-MqkG4,2319
78
57
  lionagi/ln/concurrency/utils.py,sha256=MUWupnFtWxR15hWnligLZrS4Z1SAQ7j3cuCG08cK3GQ,431
79
- lionagi/ln/fuzzy/__init__.py,sha256=_OE6Scyw99uU7gcCmYS4mB29LrpPayUJXeYlGhZTjlg,445
58
+ lionagi/ln/fuzzy/__init__.py,sha256=Py7hPV7uk5rPRGvQ4yPjMzXS32aQ7QVkO-mX69FfsMM,544
80
59
  lionagi/ln/fuzzy/_extract_json.py,sha256=rYHaK36yzRpie8qO-T7mZKOue2yqCLx3ixiuKhsaKvg,2224
81
60
  lionagi/ln/fuzzy/_fuzzy_json.py,sha256=S0lCkNvprn7XZHoYdRfzXueexSbjxTeLPkpyJ9IAO3A,3860
82
61
  lionagi/ln/fuzzy/_fuzzy_match.py,sha256=MBL2qB180MsGkIvhiHQpVObfikBFjcLcFWG9T6vLZQ0,5915
83
- lionagi/ln/fuzzy/_fuzzy_validate.py,sha256=ISC6EulV9VhIfR5Hh8JIq6WMcZOqt3AJPLUY6ZqpM1Y,1458
62
+ lionagi/ln/fuzzy/_fuzzy_validate.py,sha256=kl-IUGA6O8rY2eKXSwMMTRX6YIV4986r9zd0djidr-o,5212
84
63
  lionagi/ln/fuzzy/_string_similarity.py,sha256=axgLjDgDfBT-soxZFU2iH2bZYmGePSzc9Mxl3WlOxAA,8718
85
- lionagi/models/__init__.py,sha256=R7DEGWuhH-izP7eN6SOw24-I4Mr2IVPXF4gNysmF2zQ,457
64
+ lionagi/ln/fuzzy/_to_dict.py,sha256=H9W6f5-QWR0_40kzKLf5_CMF4iUd1IRqBDwPmthsX5c,11844
65
+ lionagi/models/__init__.py,sha256=b7A4AaVGq4pZvYyTG8N_yvtRzwWJ8MxE9Y6mDZb8U0k,422
86
66
  lionagi/models/field_model.py,sha256=JdmCp2pmwoy5HuduF21ivqyvMaJ04CTXu6Un-AeSwLU,23652
87
67
  lionagi/models/hashable_model.py,sha256=oOqR3OJCU9cJfWHiG0WaEw0GMqfE2WTt4cy7WsAsiRg,829
88
68
  lionagi/models/model_params.py,sha256=zVU-PHp3skjK5ZVjpsPs1k_VJiS8X0hgct0xs6Z6W_Y,10955
89
- lionagi/models/note.py,sha256=OsTxh5D931Pcd0uiIk4BadX45iBEW0Id0K8wM8QjXB8,12242
90
69
  lionagi/models/operable_model.py,sha256=Zm_Hxdauqyh0za3_TJLCZ3g6nR4F45Rrnc0ZM3d54Gs,20111
91
70
  lionagi/models/schema_model.py,sha256=ghRIM8aBNaToAknwNlhQKpuKXcwzyCw5pDE31bVKxs0,667
92
71
  lionagi/operations/__init__.py,sha256=a1EqxC5jRgVM1z_srZsxXtTC2Q6iA79ofpcd7cyT3B8,632
@@ -107,7 +86,7 @@ lionagi/operations/brainstorm/prompt.py,sha256=Dqi4NNeztdI4iutggRqjnOrG4a4E2JtwI
107
86
  lionagi/operations/chat/__init__.py,sha256=5y5joOZzfFWERl75auAcNcKC3lImVJ5ZZGvvHZUFCJM,112
108
87
  lionagi/operations/chat/chat.py,sha256=F5ugFtMm4OdNCQhaKN-0ezIcfInR_za5I7WbBC9qfzQ,5493
109
88
  lionagi/operations/communicate/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
110
- lionagi/operations/communicate/communicate.py,sha256=J23XkCk_oUD-cGYOuy4stwrwbeiQYLnq2l8xNX2ri5U,3670
89
+ lionagi/operations/communicate/communicate.py,sha256=AKMcLle8roqB9Yn280VnaG0Qcd6Js9L3ccAIRy1Go3Y,3658
111
90
  lionagi/operations/instruct/__init__.py,sha256=5y5joOZzfFWERl75auAcNcKC3lImVJ5ZZGvvHZUFCJM,112
112
91
  lionagi/operations/instruct/instruct.py,sha256=7pxhyP5jxwpgqjmQNb1rnGF4QAVlbMENpsyl22mbKRM,794
113
92
  lionagi/operations/interpret/__init__.py,sha256=5y5joOZzfFWERl75auAcNcKC3lImVJ5ZZGvvHZUFCJM,112
@@ -115,7 +94,7 @@ lionagi/operations/interpret/interpret.py,sha256=yl1NSp2iOm3dbycVLEcnV3absnqKoub
115
94
  lionagi/operations/operate/__init__.py,sha256=5y5joOZzfFWERl75auAcNcKC3lImVJ5ZZGvvHZUFCJM,112
116
95
  lionagi/operations/operate/operate.py,sha256=SHk-BqjUWnN5aT7Xrm3lzR6yDppq_i2sbN8Iny8PelE,7512
117
96
  lionagi/operations/parse/__init__.py,sha256=5y5joOZzfFWERl75auAcNcKC3lImVJ5ZZGvvHZUFCJM,112
118
- lionagi/operations/parse/parse.py,sha256=xS9uIxBzHLGD-1VpBVgGUhxF-tQDkF2KLmIpErM47RQ,6661
97
+ lionagi/operations/parse/parse.py,sha256=dePMjGF-ReP4Z32iTzaqNY0wSV2u_JSIV_X8qDZONqU,6649
119
98
  lionagi/operations/plan/__init__.py,sha256=yGBPll6lOqVjadbTvDLGrTlMx3FfBW-e00z7AMvg7Uo,156
120
99
  lionagi/operations/plan/plan.py,sha256=qonV5kJjJCBAWfsvH7gqUj5Gyo-N-Nh_2dr-OZcDQ1Q,15315
121
100
  lionagi/operations/plan/prompt.py,sha256=GUNZ8RpHIa89D-_y7GK--Spg0JADI3K13sjf_w3a2mI,993
@@ -140,7 +119,7 @@ lionagi/protocols/generic/__init__.py,sha256=5y5joOZzfFWERl75auAcNcKC3lImVJ5ZZGv
140
119
  lionagi/protocols/generic/element.py,sha256=yD4SWNOGZsLTgxtz6TKtJfqkUvDmUH9wIH3Liw6QmmA,15839
141
120
  lionagi/protocols/generic/event.py,sha256=n5EraAJ5bPiwegTdkxsILs7-vFJwmnXhB2om4xMQnK0,6529
142
121
  lionagi/protocols/generic/log.py,sha256=AnPr2RweSZcJdxOK0KGb1eyvAPZmME3hEm9HraUoftQ,8212
143
- lionagi/protocols/generic/pile.py,sha256=mc10zh9RdqfozPEBOgRdkrTgIWUHBz8enAcQ-8pFhRQ,37046
122
+ lionagi/protocols/generic/pile.py,sha256=zfTb2yBva6hqrPd7TB8KmwLCb4Np87LR_N-bISDTcXE,37044
144
123
  lionagi/protocols/generic/processor.py,sha256=uiNIldAYPEujuboLFyrIJADMlhRghy3H86hYintj5D4,11705
145
124
  lionagi/protocols/generic/progression.py,sha256=HCV_EnQCFvjg6D7eF4ygGrZNQPEOtu75zvW1sJbAVrM,15190
146
125
  lionagi/protocols/graph/__init__.py,sha256=UPu3OmUpjSgX2aBuBJUdG2fppGlfqAH96hU0qIMBMp0,253
@@ -171,12 +150,12 @@ lionagi/protocols/messages/templates/instruction_message.jinja2,sha256=L-ptw5OHx
171
150
  lionagi/protocols/messages/templates/system_message.jinja2,sha256=JRKJ0aFpYfaXSFouKc_N4unZ35C3yZTOWhIrIdCB5qk,215
172
151
  lionagi/protocols/messages/templates/tool_schemas.jinja2,sha256=ozIaSDCRjIAhLyA8VM6S-YqS0w2NcctALSwx4LjDwII,126
173
152
  lionagi/protocols/operatives/__init__.py,sha256=5y5joOZzfFWERl75auAcNcKC3lImVJ5ZZGvvHZUFCJM,112
174
- lionagi/protocols/operatives/operative.py,sha256=l417XukoI_ZRyVqjHy8q1BtTKBvlFxf3Fuhrxt057SI,13350
153
+ lionagi/protocols/operatives/operative.py,sha256=Y_prGR7aPQtO3ws91W_KkjJTVnb5lYkfwMKaEIN2FVU,13331
175
154
  lionagi/protocols/operatives/step.py,sha256=uF92QO2KZiY3YR1cxhrbD844VFidOKfmeQn2Fv637iY,9280
176
155
  lionagi/service/__init__.py,sha256=C_TPk1roVYz6uVLK1JVxrK3tPtYqN6W0D7FzI-s6CWY,556
177
156
  lionagi/service/imodel.py,sha256=ya406sf42-KRrKN4TJJLtI6wsKeM5hAhWr7Hubg7W0E,16371
178
157
  lionagi/service/manager.py,sha256=tN3p0kM7pg_CEs6wXK62_B_h49Q3nrU-9qniFhw2ABE,1164
179
- lionagi/service/rate_limited_processor.py,sha256=JhkuzJMHUCdndkRbAUf9wUQI9zOw-dutRy_nHf8EE5I,6101
158
+ lionagi/service/rate_limited_processor.py,sha256=h2_F71aVeBrgZ0a7ARS8-8NDaAHvfWrLykI5QcNuYbk,6099
180
159
  lionagi/service/resilience.py,sha256=91RPFtQY4QyNga_nuSNLsbzNE26pXJMTAfLaQqVdvmg,18714
181
160
  lionagi/service/token_calculator.py,sha256=piTidArzUkIMCtOLC_HBLoZNYZcENQywgeKM31bxezM,6457
182
161
  lionagi/service/types.py,sha256=9zX08BhdmPE9FE1YTyvsy14hdDGRYzyyVBmoBURzQvI,1096
@@ -185,22 +164,21 @@ lionagi/service/connections/api_calling.py,sha256=fY-fzwSJvQKpUT27TF0MTfE5TxroYK
185
164
  lionagi/service/connections/endpoint.py,sha256=kpSWQzPWh4WdjlZRuTAmPmeg-Z9g2NFx4b_pJMkWJq0,15055
186
165
  lionagi/service/connections/endpoint_config.py,sha256=6sA06uCzriT6p0kFxhDCFH8N6V6MVp8ytlOw5ctBhDI,5169
187
166
  lionagi/service/connections/header_factory.py,sha256=IYeTQQk7r8FXcdhmW7orCxHjNO-Nb1EOXhgNK7CAp-I,1821
188
- lionagi/service/connections/match_endpoint.py,sha256=Df5v3bprnJq5CqOzuK0KzwawOIfAsGZZM4CnE-sliu4,2850
167
+ lionagi/service/connections/match_endpoint.py,sha256=QlOw9CbR1peExP-b-XlkRpqqGIksfNefI2EZCw9P7_E,2575
189
168
  lionagi/service/connections/providers/__init__.py,sha256=3lzOakDoBWmMaNnT2g-YwktPKa_Wme4lnPRSmOQfayY,105
190
169
  lionagi/service/connections/providers/anthropic_.py,sha256=vok8mIyFiuV3K83tOjdYfruA6cv1h_57ML6RtpuW-bU,3157
191
- lionagi/service/connections/providers/claude_code_.py,sha256=ltk41ZdMCf-QSxqUhbb_Un9VC7J0Ek6n20LFJDeoSyY,10589
192
170
  lionagi/service/connections/providers/claude_code_cli.py,sha256=kqEOnCUOOh2O_3NGi6W7r-gdLsbW-Jcp11tm30VEv4Q,4455
193
171
  lionagi/service/connections/providers/exa_.py,sha256=kuWD7yyYRqIa4ChSn0TsxFA5V5LwvFUD-w8TZ6mx4rk,1048
194
172
  lionagi/service/connections/providers/nvidia_nim_.py,sha256=95vmo0DSONYBVHkR9SGJ5BiHNKFZNZBrjw4_7ShOXQA,3154
195
173
  lionagi/service/connections/providers/oai_.py,sha256=3x5d6Ei1hKu8Mix0N2V2K21O9dd-2jtAELHhHXj5iHk,6071
196
174
  lionagi/service/connections/providers/ollama_.py,sha256=oqYLWn81KrWoQgId4e4GD_bgrDjQLPOmhqlc5uBuFGk,4569
197
175
  lionagi/service/connections/providers/perplexity_.py,sha256=1GMmxAXsKGsB-xlqxO6hW-QdqoqkU2705NLyejetFSw,1646
198
- lionagi/service/connections/providers/types.py,sha256=nxRDBEqCVG4Nw_gfL5NYmeRUEJGAjKNZ-jlL48xYqv0,878
176
+ lionagi/service/connections/providers/types.py,sha256=omKWbmJYu_ozK_qJLcxQezVcauXTqhp4ClOWAyENEFU,807
199
177
  lionagi/service/hooks/__init__.py,sha256=Ayllxjd1fR_6NByZlE2zslQ7I0Od-s6-OVe0mzZIeu4,569
200
178
  lionagi/service/hooks/_types.py,sha256=AJKODnj0bWmXZrcMgIdZpJNTgaSCzouCheiQXPpxetg,1169
201
179
  lionagi/service/hooks/_utils.py,sha256=51dqdRrln2aJCkCz8g4L6Ik_v9atdFHPzjm9ASu6OvA,2560
202
- lionagi/service/hooks/hook_event.py,sha256=ApRCsqB0jk4IWsmm2GZ-QoIzgPXcdyxQcfRZim0h7sU,2420
203
- lionagi/service/hooks/hook_registry.py,sha256=JNpbn_Vl4oACVt0inYxunLlRftVUpjD-8NueQs98lcU,7872
180
+ lionagi/service/hooks/hook_event.py,sha256=NH3PdoWwAt96GQQi99TjqAu-zU-zTgWz6pDdIaKureE,2418
181
+ lionagi/service/hooks/hook_registry.py,sha256=IEJF3UpLCmTXkd-7daFIo_p0CVTuAoA6Z8gzXkMIGsg,7870
204
182
  lionagi/service/third_party/README.md,sha256=qFjWnI8rmLivIyr6Tc-hRZh-rQwntROp76af4MBNJJc,2214
205
183
  lionagi/service/third_party/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
206
184
  lionagi/service/third_party/anthropic_models.py,sha256=oqSPSlcayYG-fS5BLiLeTtkrpaxgkPhEK_YgneumrOo,4004
@@ -217,7 +195,7 @@ lionagi/tools/base.py,sha256=hEGnE4MD0CM4UqnF0xsDRKB0aM-pyrTFHl8utHhyJLU,1897
217
195
  lionagi/tools/types.py,sha256=XtJLY0m-Yi_ZLWhm0KycayvqMCZd--HxfQ0x9vFUYDE,230
218
196
  lionagi/tools/file/__init__.py,sha256=5y5joOZzfFWERl75auAcNcKC3lImVJ5ZZGvvHZUFCJM,112
219
197
  lionagi/tools/file/reader.py,sha256=2YKgU3VKo76zfL_buDAUQJoPLC56f6WJ4_mdJjlMDIM,9509
220
- lionagi-0.16.2.dist-info/METADATA,sha256=1_uQHVJzsHDEvYYVenSmEIz99JfbQaW6NVrCFTKn3QY,23086
221
- lionagi-0.16.2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
222
- lionagi-0.16.2.dist-info/licenses/LICENSE,sha256=VXFWsdoN5AAknBCgFqQNgPWYx7OPp-PFEP961zGdOjc,11288
223
- lionagi-0.16.2.dist-info/RECORD,,
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,,