lionagi 0.16.0__py3-none-any.whl → 0.16.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.
- lionagi/adapters/async_postgres_adapter.py +1 -1
- lionagi/libs/file/save.py +8 -1
- lionagi/libs/nested/ninsert.py +3 -6
- lionagi/libs/nested/nmerge.py +1 -2
- lionagi/ln/__init__.py +6 -0
- lionagi/ln/_json_dump.py +322 -49
- lionagi/models/note.py +8 -4
- lionagi/operations/ReAct/utils.py +1 -2
- lionagi/operations/brainstorm/brainstorm.py +10 -10
- lionagi/protocols/action/function_calling.py +1 -4
- lionagi/protocols/generic/element.py +6 -72
- lionagi/protocols/generic/log.py +2 -2
- lionagi/protocols/graph/graph.py +1 -2
- lionagi/protocols/graph/node.py +2 -4
- lionagi/protocols/messages/instruction.py +1 -2
- lionagi/protocols/messages/manager.py +1 -2
- lionagi/protocols/messages/message.py +9 -5
- lionagi/service/connections/endpoint.py +7 -0
- lionagi/service/connections/providers/claude_code_.py +7 -3
- lionagi/service/resilience.py +1 -2
- lionagi/session/branch.py +1 -101
- lionagi/session/session.py +9 -14
- lionagi/utils.py +2 -1
- lionagi/version.py +1 -1
- {lionagi-0.16.0.dist-info → lionagi-0.16.2.dist-info}/METADATA +3 -4
- {lionagi-0.16.0.dist-info → lionagi-0.16.2.dist-info}/RECORD +28 -54
- lionagi/libs/file/params.py +0 -175
- lionagi/libs/token_transform/__init__.py +0 -0
- lionagi/libs/token_transform/base.py +0 -54
- lionagi/libs/token_transform/llmlingua.py +0 -1
- lionagi/libs/token_transform/perplexity.py +0 -450
- lionagi/libs/token_transform/symbolic_compress_context.py +0 -152
- lionagi/libs/token_transform/synthlang.py +0 -9
- lionagi/libs/token_transform/synthlang_/base.py +0 -128
- lionagi/libs/token_transform/synthlang_/resources/frameworks/abstract_algebra.toml +0 -11
- lionagi/libs/token_transform/synthlang_/resources/frameworks/category_theory.toml +0 -11
- lionagi/libs/token_transform/synthlang_/resources/frameworks/complex_analysis.toml +0 -11
- lionagi/libs/token_transform/synthlang_/resources/frameworks/framework_options.json +0 -52
- lionagi/libs/token_transform/synthlang_/resources/frameworks/group_theory.toml +0 -11
- lionagi/libs/token_transform/synthlang_/resources/frameworks/math_logic.toml +0 -11
- lionagi/libs/token_transform/synthlang_/resources/frameworks/reflective_patterns.toml +0 -11
- lionagi/libs/token_transform/synthlang_/resources/frameworks/set_theory.toml +0 -11
- lionagi/libs/token_transform/synthlang_/resources/frameworks/topology_fundamentals.toml +0 -11
- lionagi/libs/token_transform/synthlang_/resources/mapping/lion_emoji_mapping.toml +0 -61
- lionagi/libs/token_transform/synthlang_/resources/mapping/python_math_mapping.toml +0 -41
- lionagi/libs/token_transform/synthlang_/resources/mapping/rust_chinese_mapping.toml +0 -60
- lionagi/libs/token_transform/synthlang_/resources/utility/base_synthlang_system_prompt.toml +0 -11
- lionagi/libs/token_transform/synthlang_/translate_to_synthlang.py +0 -140
- lionagi/libs/token_transform/types.py +0 -15
- lionagi/operations/translate/__init__.py +0 -0
- lionagi/operations/translate/translate.py +0 -47
- lionagi/tools/memory/tools.py +0 -497
- {lionagi-0.16.0.dist-info → lionagi-0.16.2.dist-info}/WHEEL +0 -0
- {lionagi-0.16.0.dist-info → lionagi-0.16.2.dist-info}/licenses/LICENSE +0 -0
@@ -5,11 +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=
|
9
|
-
lionagi/version.py,sha256=
|
8
|
+
lionagi/utils.py,sha256=DEE3ycbUvBDpJIliPfCY7B2HC-nnAcA4p7Xn5HPMTUM,27525
|
9
|
+
lionagi/version.py,sha256=EHpjUSkwlknz5LyeqzgJmyU4YsLCQqDv3RGeURQ4Phg,23
|
10
10
|
lionagi/adapters/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
11
11
|
lionagi/adapters/_utils.py,sha256=n4DS27CZfC-0O_UFaYtlUdjiMx9IeYsGpP7MVaFO5ZA,885
|
12
|
-
lionagi/adapters/async_postgres_adapter.py,sha256=
|
12
|
+
lionagi/adapters/async_postgres_adapter.py,sha256=StjdjzHVkYOC_xVfmaVBd0E34tdsUrbR3ENSpmZIfeI,3169
|
13
13
|
lionagi/adapters/postgres_model_adapter.py,sha256=uwWrbnihtYsCIttHExmtAIZwyohFtKoxnHU1N1M2NvQ,4519
|
14
14
|
lionagi/fields/__init__.py,sha256=yrn9NDAM6_v73kK7aJeb-Pvqigeu8WASaV-My-6CDsc,939
|
15
15
|
lionagi/fields/action.py,sha256=OziEpbaUeEVo34KdtbzDxXJBgkf3QLxlcKIQAfHe4O0,5791
|
@@ -28,15 +28,14 @@ lionagi/libs/file/chunk.py,sha256=XeVMwM33JF0X1W6udz_nhlb3DCevA_EK6A50Hn_e5SY,93
|
|
28
28
|
lionagi/libs/file/concat.py,sha256=YSauXVBL3WWx5Mvpn208Cj7q9TLt_aq-0M9J1fm-ins,3864
|
29
29
|
lionagi/libs/file/concat_files.py,sha256=FoI983oWFzp9VfFDP7kmbRb3t1CPe5F5LCtsux0ASAs,3089
|
30
30
|
lionagi/libs/file/file_ops.py,sha256=HBiIh1EljIJ5VTIXuyvJM0ppSs0YYOPUWmgDMJT634U,3430
|
31
|
-
lionagi/libs/file/params.py,sha256=SZ5DkoffWfxWudOAYCfCxpL8UIm-1UjeyTtploo-Lqs,5824
|
32
31
|
lionagi/libs/file/process.py,sha256=XTfh1JDPancjFU0qr4-ONB2OXfKKkhQxL49sChYLl-0,8672
|
33
|
-
lionagi/libs/file/save.py,sha256=
|
32
|
+
lionagi/libs/file/save.py,sha256=jTiJMTOK3IiuCz1XbYZlzFmsqiy2q_Xz6subc4ZTJps,3063
|
34
33
|
lionagi/libs/nested/__init__.py,sha256=5y5joOZzfFWERl75auAcNcKC3lImVJ5ZZGvvHZUFCJM,112
|
35
34
|
lionagi/libs/nested/flatten.py,sha256=sB4jxZRoaUbjak9RbIWVWNKz2hzkhQJPFffV_Ws1GA0,5479
|
36
35
|
lionagi/libs/nested/nfilter.py,sha256=kF7AWjLFHr22SOjRBSTx-7iRPaR7gs0FY5Y4XF2sWJ8,1768
|
37
36
|
lionagi/libs/nested/nget.py,sha256=sQRz3OKx3bYlgoyLSHOXlHzd3ob-f_jmsMfTCNZkJfo,1284
|
38
|
-
lionagi/libs/nested/ninsert.py,sha256=
|
39
|
-
lionagi/libs/nested/nmerge.py,sha256=
|
37
|
+
lionagi/libs/nested/ninsert.py,sha256=NiQk4Ne5YKGGW4qiKXDkOkNvrIOeNQsM0lPVCQZ-KMg,3822
|
38
|
+
lionagi/libs/nested/nmerge.py,sha256=Jve5-BC4XXGVPbYNewrOOb57WOSV50CKMLbwqI0qwgs,5289
|
40
39
|
lionagi/libs/nested/npop.py,sha256=jxzjDPF-3gGPjrs_jWaG-g1u-kSa74jOI3EotOS4s8I,2173
|
41
40
|
lionagi/libs/nested/nset.py,sha256=vkLR970hSzj8xCk-Z3RNQMJL2x0uMHmx1pw0VZQx2T0,3393
|
42
41
|
lionagi/libs/nested/unflatten.py,sha256=lTON1LfCyhZ3xeTEdBiIONcHLQouPcBNARTbXzHZ03U,2618
|
@@ -48,28 +47,6 @@ lionagi/libs/schema/extract_docstring.py,sha256=uWyUevXS4JSN60tfouoBBAyE4_jyE-fz
|
|
48
47
|
lionagi/libs/schema/function_to_schema.py,sha256=XAB031WbYu3a7eFJyYjXVMAjmtWYSYr5kC_DYgjiuyM,5604
|
49
48
|
lionagi/libs/schema/json_schema.py,sha256=cuHcaMr748O9g6suNGmRx4tRXcidd5-c7AMGjTIZyHM,7670
|
50
49
|
lionagi/libs/schema/load_pydantic_model_from_schema.py,sha256=WIgJPmOu558az35CfOHvwyyTYQ5OBlk0hchvaEOADjQ,10109
|
51
|
-
lionagi/libs/token_transform/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
52
|
-
lionagi/libs/token_transform/base.py,sha256=LBnaDgi4HNgaJJGwIzWcQjVMdu49i_93rRvOvMU22Rw,1545
|
53
|
-
lionagi/libs/token_transform/llmlingua.py,sha256=DkeLUlrb7rGx3nZ04aADU9HXXu5mZTf_DBwT0xhzIv4,7
|
54
|
-
lionagi/libs/token_transform/perplexity.py,sha256=m-n_ErNfFZ9fvM9TReBnfSmp-89PKM7bCmtAAszFnS0,14458
|
55
|
-
lionagi/libs/token_transform/symbolic_compress_context.py,sha256=hcYxvL0q2Lr8SIOPN09339TIQ8iROCwhBEUnwt9llXU,4636
|
56
|
-
lionagi/libs/token_transform/synthlang.py,sha256=W6e-_265UXqVosM9X0TLKW53rNHvWCKhsWbVAop49Ac,259
|
57
|
-
lionagi/libs/token_transform/types.py,sha256=4HgAfNDlJ_Hu18kLt59GHr_76eF3xLpNCTbOXlAYVlA,491
|
58
|
-
lionagi/libs/token_transform/synthlang_/base.py,sha256=djsR3Lc0UH1PYy2q4fpqL9tp-ZNKOYbmVTDP-_d1Poo,4107
|
59
|
-
lionagi/libs/token_transform/synthlang_/translate_to_synthlang.py,sha256=guA5v8CQRdAOsznsUSoK_x2JFzGbHE079AijDqqPPOw,4946
|
60
|
-
lionagi/libs/token_transform/synthlang_/resources/frameworks/abstract_algebra.toml,sha256=2TuOAo97g8mNhdPH96HP8vYZpnC8neiP-KlhVqbp1Us,970
|
61
|
-
lionagi/libs/token_transform/synthlang_/resources/frameworks/category_theory.toml,sha256=Stg9W3h8o7VkQ9tdAfSZmR3LctFqcH6OhOPdaw9BlIg,1064
|
62
|
-
lionagi/libs/token_transform/synthlang_/resources/frameworks/complex_analysis.toml,sha256=iE6FS7Cn5_uJRG5-StLuMM4XVAk95bxhbYWwlstw_tA,1044
|
63
|
-
lionagi/libs/token_transform/synthlang_/resources/frameworks/framework_options.json,sha256=phAkedPGrwgNGW8hgPyH6pKU47pvKEAnG7vheWFvOLc,1760
|
64
|
-
lionagi/libs/token_transform/synthlang_/resources/frameworks/group_theory.toml,sha256=iVlcS250YMosNRv3l8bz3BT9Tx1xCmiwhfNt4CjjRYc,713
|
65
|
-
lionagi/libs/token_transform/synthlang_/resources/frameworks/math_logic.toml,sha256=jeFOF8gjRhb4hYXpW7AxTX8uk9c6DvGulJK5Bowxhq4,1037
|
66
|
-
lionagi/libs/token_transform/synthlang_/resources/frameworks/reflective_patterns.toml,sha256=LxBIVLHNLfvVdXjLAzqivrYaHNix514DLNYsbA-VSQ4,5730
|
67
|
-
lionagi/libs/token_transform/synthlang_/resources/frameworks/set_theory.toml,sha256=SZpBvUySZ3_0pIrRko24a3KfbPHd55LyNwzFHyznjs4,1457
|
68
|
-
lionagi/libs/token_transform/synthlang_/resources/frameworks/topology_fundamentals.toml,sha256=nnhfbIJQ5pTGlX7lo1XzjyOevaZOHuusvBuhwWHzbLk,1008
|
69
|
-
lionagi/libs/token_transform/synthlang_/resources/mapping/lion_emoji_mapping.toml,sha256=THLrry9RTHMCMv-g6VCwrlaE4_9_fjXkABgyAyhokew,1323
|
70
|
-
lionagi/libs/token_transform/synthlang_/resources/mapping/python_math_mapping.toml,sha256=Q0MqTf9t5rWuKHLsKu9WS8NSBSb9FsGAAaG5EYQiGCA,964
|
71
|
-
lionagi/libs/token_transform/synthlang_/resources/mapping/rust_chinese_mapping.toml,sha256=o-7KACVDQYkpAGSFgsMCeIy_S93CilUP9w1ZKM0w62A,1217
|
72
|
-
lionagi/libs/token_transform/synthlang_/resources/utility/base_synthlang_system_prompt.toml,sha256=8xhY14WdDRF6GIToqzRPM7EjM6-uO6-hQ9Muei1A2Iw,3458
|
73
50
|
lionagi/libs/unstructured/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
74
51
|
lionagi/libs/unstructured/pdf_to_image.py,sha256=lJ2CVxOYh61-3-55nusHXMOGqtEyLXsXmDjZ9yjkM48,1394
|
75
52
|
lionagi/libs/unstructured/read_image_to_base64.py,sha256=EJXWBJxCTa9vHBIFPRqQj0jeFXyDv1cs2oPBrWt-waQ,897
|
@@ -81,10 +58,10 @@ lionagi/libs/validate/string_similarity.py,sha256=kuOQFNnI773bV8KKj_PUYxx8vLRdWa
|
|
81
58
|
lionagi/libs/validate/to_num.py,sha256=ZRHDjpTCykPfDIZZa4rZKNaR_8ZHbPDFlw9rc02DrII,11610
|
82
59
|
lionagi/libs/validate/validate_boolean.py,sha256=bjiX_WZ3Bg8XcqoWLzE1G9BpO0AisrlZUxrpye_mlGk,3614
|
83
60
|
lionagi/libs/validate/xml_parser.py,sha256=PHBYAre4hhthPpDP9Yrp3UYSWdANPx60F1qhxe0m4uw,7004
|
84
|
-
lionagi/ln/__init__.py,sha256=
|
61
|
+
lionagi/ln/__init__.py,sha256=1D21gwXiZ8rLr9dP7y85MupXkBULRKMO22e5x-iTKN4,1603
|
85
62
|
lionagi/ln/_async_call.py,sha256=mnqq5l-hNIBWrWh7X7CtmwPafg1kT-lnWWm3nJnbPoI,9384
|
86
63
|
lionagi/ln/_hash.py,sha256=WLwKsbJISE7KtOrpiE30AFtfwyOCSBjb1GslBlvj5ac,4529
|
87
|
-
lionagi/ln/_json_dump.py,sha256=
|
64
|
+
lionagi/ln/_json_dump.py,sha256=r3Hwsl94Z9b4Kr6PCT-AYXWZkEeFXuPwpbpLDPjooew,10550
|
88
65
|
lionagi/ln/_list_call.py,sha256=zvISmCeNAH7yjBcusQI1s17n556tILgePhRMdAM2plA,2831
|
89
66
|
lionagi/ln/_to_list.py,sha256=YOlrMplSpQhXDSTK4fkMF7Mhuw1wS0jGip5mS88Otro,6610
|
90
67
|
lionagi/ln/_utils.py,sha256=5Z_AsDxdtH5wNB-P4IiihhH0dYUcZMT-hTxFQBQPwL0,4303
|
@@ -109,7 +86,7 @@ lionagi/models/__init__.py,sha256=R7DEGWuhH-izP7eN6SOw24-I4Mr2IVPXF4gNysmF2zQ,45
|
|
109
86
|
lionagi/models/field_model.py,sha256=JdmCp2pmwoy5HuduF21ivqyvMaJ04CTXu6Un-AeSwLU,23652
|
110
87
|
lionagi/models/hashable_model.py,sha256=oOqR3OJCU9cJfWHiG0WaEw0GMqfE2WTt4cy7WsAsiRg,829
|
111
88
|
lionagi/models/model_params.py,sha256=zVU-PHp3skjK5ZVjpsPs1k_VJiS8X0hgct0xs6Z6W_Y,10955
|
112
|
-
lionagi/models/note.py,sha256=
|
89
|
+
lionagi/models/note.py,sha256=OsTxh5D931Pcd0uiIk4BadX45iBEW0Id0K8wM8QjXB8,12242
|
113
90
|
lionagi/models/operable_model.py,sha256=Zm_Hxdauqyh0za3_TJLCZ3g6nR4F45Rrnc0ZM3d54Gs,20111
|
114
91
|
lionagi/models/schema_model.py,sha256=ghRIM8aBNaToAknwNlhQKpuKXcwzyCw5pDE31bVKxs0,667
|
115
92
|
lionagi/operations/__init__.py,sha256=a1EqxC5jRgVM1z_srZsxXtTC2Q6iA79ofpcd7cyT3B8,632
|
@@ -121,11 +98,11 @@ lionagi/operations/types.py,sha256=fM8HphnbBifMzhoKKvdl3JxGCBHlEGPJEYkLWj9b7vE,7
|
|
121
98
|
lionagi/operations/utils.py,sha256=b8HmpF5vRgmf6PTzg3_fZCIKMnhoGa0HCyOlX6JCz7g,1263
|
122
99
|
lionagi/operations/ReAct/ReAct.py,sha256=UzW3MClv9_w1AqrZIuATOZ9ASTb8HPD0Rlotlp0mYOg,13388
|
123
100
|
lionagi/operations/ReAct/__init__.py,sha256=5y5joOZzfFWERl75auAcNcKC3lImVJ5ZZGvvHZUFCJM,112
|
124
|
-
lionagi/operations/ReAct/utils.py,sha256=
|
101
|
+
lionagi/operations/ReAct/utils.py,sha256=qYh-zTRCHXyuNpSgBmooTG0TVp9Pdht0tONPwdv8BT4,4102
|
125
102
|
lionagi/operations/_act/__init__.py,sha256=5y5joOZzfFWERl75auAcNcKC3lImVJ5ZZGvvHZUFCJM,112
|
126
103
|
lionagi/operations/_act/act.py,sha256=LfN4UqTTHVvO1h9tqmDhVfVafVUOry4YGEivIZbmLqc,2810
|
127
104
|
lionagi/operations/brainstorm/__init__.py,sha256=5y5joOZzfFWERl75auAcNcKC3lImVJ5ZZGvvHZUFCJM,112
|
128
|
-
lionagi/operations/brainstorm/brainstorm.py,sha256=
|
105
|
+
lionagi/operations/brainstorm/brainstorm.py,sha256=FBgw0YIx18fFms_6Oiz9kklKWrq-ncJeJV-d05MH_BI,18781
|
129
106
|
lionagi/operations/brainstorm/prompt.py,sha256=Dqi4NNeztdI4iutggRqjnOrG4a4E2JtwIAtRnjZ_ghQ,610
|
130
107
|
lionagi/operations/chat/__init__.py,sha256=5y5joOZzfFWERl75auAcNcKC3lImVJ5ZZGvvHZUFCJM,112
|
131
108
|
lionagi/operations/chat/chat.py,sha256=F5ugFtMm4OdNCQhaKN-0ezIcfInR_za5I7WbBC9qfzQ,5493
|
@@ -145,15 +122,13 @@ lionagi/operations/plan/prompt.py,sha256=GUNZ8RpHIa89D-_y7GK--Spg0JADI3K13sjf_w3
|
|
145
122
|
lionagi/operations/select/__init__.py,sha256=5y5joOZzfFWERl75auAcNcKC3lImVJ5ZZGvvHZUFCJM,112
|
146
123
|
lionagi/operations/select/select.py,sha256=2l16ySPiqp5vyAMYm0CNBpNRVB0zvS76QwNAyFQ7tB4,2491
|
147
124
|
lionagi/operations/select/utils.py,sha256=1S4Wo59hr0rbZG72EPnVExfx4G72sIeUh2vlqVtslqE,3711
|
148
|
-
lionagi/operations/translate/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
149
|
-
lionagi/operations/translate/translate.py,sha256=6eBVoQRarGEJ8Tfcl6Z__PLHQTTIbM5MaPVYNeKHRIs,1397
|
150
125
|
lionagi/protocols/__init__.py,sha256=5y5joOZzfFWERl75auAcNcKC3lImVJ5ZZGvvHZUFCJM,112
|
151
126
|
lionagi/protocols/_concepts.py,sha256=ZBN5OYpLMWLrl9uZqSg9GD4uwf60V4VHcxRnBTRWIRc,1555
|
152
127
|
lionagi/protocols/contracts.py,sha256=ii7luaPJsEKOb3J-rcaNysPDGU3nEzpgy_8g1z5_CCA,1398
|
153
128
|
lionagi/protocols/ids.py,sha256=RM40pP_4waMJcfCGmEK_PfS8-k_DuDbC1fG-2Peuf6s,2472
|
154
129
|
lionagi/protocols/types.py,sha256=EEmgYcaMCbgLU2rk7lTyKyRh_B15BeMccciv097j3Eg,2828
|
155
130
|
lionagi/protocols/action/__init__.py,sha256=5y5joOZzfFWERl75auAcNcKC3lImVJ5ZZGvvHZUFCJM,112
|
156
|
-
lionagi/protocols/action/function_calling.py,sha256=
|
131
|
+
lionagi/protocols/action/function_calling.py,sha256=jFy6Ruh3QWkERtBHXqPWVwrOH5aDitEo8oJHZgW5xnI,5066
|
157
132
|
lionagi/protocols/action/manager.py,sha256=XmdQIaVgSpmFBFW9kbW_rdwdQmlBteP4VRanxh_f918,8549
|
158
133
|
lionagi/protocols/action/tool.py,sha256=h2FAY1b8y3LXrvAtfFhvdv1nu8cwz2knUeRCi2G9k1E,5243
|
159
134
|
lionagi/protocols/forms/__init__.py,sha256=5y5joOZzfFWERl75auAcNcKC3lImVJ5ZZGvvHZUFCJM,112
|
@@ -162,17 +137,17 @@ lionagi/protocols/forms/flow.py,sha256=t9Ycvmb-stj0rCyvXXwd7WBcDtuCCTEKYst2aqFDV
|
|
162
137
|
lionagi/protocols/forms/form.py,sha256=B4903km_Ljz-OxYkb1ZT_cpHZSaAYYJpZMsffWlooo8,3062
|
163
138
|
lionagi/protocols/forms/report.py,sha256=SvJJjOSCTfVuqK7AKaY8ldQIGJeSK2zoyPWUV41ge2c,1609
|
164
139
|
lionagi/protocols/generic/__init__.py,sha256=5y5joOZzfFWERl75auAcNcKC3lImVJ5ZZGvvHZUFCJM,112
|
165
|
-
lionagi/protocols/generic/element.py,sha256=
|
140
|
+
lionagi/protocols/generic/element.py,sha256=yD4SWNOGZsLTgxtz6TKtJfqkUvDmUH9wIH3Liw6QmmA,15839
|
166
141
|
lionagi/protocols/generic/event.py,sha256=n5EraAJ5bPiwegTdkxsILs7-vFJwmnXhB2om4xMQnK0,6529
|
167
|
-
lionagi/protocols/generic/log.py,sha256=
|
142
|
+
lionagi/protocols/generic/log.py,sha256=AnPr2RweSZcJdxOK0KGb1eyvAPZmME3hEm9HraUoftQ,8212
|
168
143
|
lionagi/protocols/generic/pile.py,sha256=mc10zh9RdqfozPEBOgRdkrTgIWUHBz8enAcQ-8pFhRQ,37046
|
169
144
|
lionagi/protocols/generic/processor.py,sha256=uiNIldAYPEujuboLFyrIJADMlhRghy3H86hYintj5D4,11705
|
170
145
|
lionagi/protocols/generic/progression.py,sha256=HCV_EnQCFvjg6D7eF4ygGrZNQPEOtu75zvW1sJbAVrM,15190
|
171
146
|
lionagi/protocols/graph/__init__.py,sha256=UPu3OmUpjSgX2aBuBJUdG2fppGlfqAH96hU0qIMBMp0,253
|
172
147
|
lionagi/protocols/graph/_utils.py,sha256=mts4M2wcGKdY9hC-1917lxIJT5oycW9VnRgfRx8ydbI,605
|
173
148
|
lionagi/protocols/graph/edge.py,sha256=YxSGj4w_fG7khm-zpKduuK5fJzhJDx23JhU1dZp29d8,5241
|
174
|
-
lionagi/protocols/graph/graph.py,sha256=
|
175
|
-
lionagi/protocols/graph/node.py,sha256=
|
149
|
+
lionagi/protocols/graph/graph.py,sha256=eczTdL6XoeSmG6gqF-iTQXDurPAq0y1jMF0FNoCjUX4,10586
|
150
|
+
lionagi/protocols/graph/node.py,sha256=DZapkk4SJSzDEB1BfD3S2DUelcheTha2JoW8rSIcqxY,4562
|
176
151
|
lionagi/protocols/mail/__init__.py,sha256=5y5joOZzfFWERl75auAcNcKC3lImVJ5ZZGvvHZUFCJM,112
|
177
152
|
lionagi/protocols/mail/exchange.py,sha256=P1PcrFylIBeiQa8kox9H1qyJ4kjhUlbLiTUT8rs1OXg,7041
|
178
153
|
lionagi/protocols/mail/mail.py,sha256=RB5CUft_4J85H9nM9g6aRXomTaqKwF5xVjJacPAhoa8,1356
|
@@ -184,9 +159,9 @@ lionagi/protocols/messages/action_request.py,sha256=-tG9ViTSiZ2beM0onE6C552H5oth
|
|
184
159
|
lionagi/protocols/messages/action_response.py,sha256=SM3_vA9QPXz3Gc9uPhXm3zOXYheHZZGtl67Yff48Vu8,5272
|
185
160
|
lionagi/protocols/messages/assistant_response.py,sha256=jrzRPVHHDnPw86Xp0IHnPy0tOZdsk7rBwhG5xnBXAjs,6912
|
186
161
|
lionagi/protocols/messages/base.py,sha256=Ng1Q8yIIIFauUv53LnwDeyOrM-cSCfsHM1GwkxChf2o,2317
|
187
|
-
lionagi/protocols/messages/instruction.py,sha256=
|
188
|
-
lionagi/protocols/messages/manager.py,sha256=
|
189
|
-
lionagi/protocols/messages/message.py,sha256=
|
162
|
+
lionagi/protocols/messages/instruction.py,sha256=Qpme1oSc406V3-F2iOyqC8TVT2GWVduZaoDfdGdBnDI,21127
|
163
|
+
lionagi/protocols/messages/manager.py,sha256=ABDiN-QULbfbSrHVlPe3kqBxr7e7sYoT49wHQMLiT6c,16897
|
164
|
+
lionagi/protocols/messages/message.py,sha256=y8jSG5GQUjppvvMRDOWGlPNQn_I8MgATiU1AjsH2TKQ,7953
|
190
165
|
lionagi/protocols/messages/system.py,sha256=x0F1C57SFHaO2-Z9cy1QshYlxv8wjl7VppooaGKbMIg,4658
|
191
166
|
lionagi/protocols/messages/templates/README.md,sha256=Ch4JrKSjd85fLitAYO1OhZjNOGKHoEwaKQlcV16jiUI,1286
|
192
167
|
lionagi/protocols/messages/templates/action_request.jinja2,sha256=d6OmxHKyvvNDSK4bnBM3TGSUk_HeE_Q2EtLAQ0ZBEJg,120
|
@@ -202,18 +177,18 @@ lionagi/service/__init__.py,sha256=C_TPk1roVYz6uVLK1JVxrK3tPtYqN6W0D7FzI-s6CWY,5
|
|
202
177
|
lionagi/service/imodel.py,sha256=ya406sf42-KRrKN4TJJLtI6wsKeM5hAhWr7Hubg7W0E,16371
|
203
178
|
lionagi/service/manager.py,sha256=tN3p0kM7pg_CEs6wXK62_B_h49Q3nrU-9qniFhw2ABE,1164
|
204
179
|
lionagi/service/rate_limited_processor.py,sha256=JhkuzJMHUCdndkRbAUf9wUQI9zOw-dutRy_nHf8EE5I,6101
|
205
|
-
lionagi/service/resilience.py,sha256=
|
180
|
+
lionagi/service/resilience.py,sha256=91RPFtQY4QyNga_nuSNLsbzNE26pXJMTAfLaQqVdvmg,18714
|
206
181
|
lionagi/service/token_calculator.py,sha256=piTidArzUkIMCtOLC_HBLoZNYZcENQywgeKM31bxezM,6457
|
207
182
|
lionagi/service/types.py,sha256=9zX08BhdmPE9FE1YTyvsy14hdDGRYzyyVBmoBURzQvI,1096
|
208
183
|
lionagi/service/connections/__init__.py,sha256=yHQZ7OJpCftd6CStYR8inbxjJydYdmv9kCvbUBhJ2zU,362
|
209
184
|
lionagi/service/connections/api_calling.py,sha256=fY-fzwSJvQKpUT27TF0MTfE5TxroYKkL4SHWYrmYznI,9958
|
210
|
-
lionagi/service/connections/endpoint.py,sha256=
|
185
|
+
lionagi/service/connections/endpoint.py,sha256=kpSWQzPWh4WdjlZRuTAmPmeg-Z9g2NFx4b_pJMkWJq0,15055
|
211
186
|
lionagi/service/connections/endpoint_config.py,sha256=6sA06uCzriT6p0kFxhDCFH8N6V6MVp8ytlOw5ctBhDI,5169
|
212
187
|
lionagi/service/connections/header_factory.py,sha256=IYeTQQk7r8FXcdhmW7orCxHjNO-Nb1EOXhgNK7CAp-I,1821
|
213
188
|
lionagi/service/connections/match_endpoint.py,sha256=Df5v3bprnJq5CqOzuK0KzwawOIfAsGZZM4CnE-sliu4,2850
|
214
189
|
lionagi/service/connections/providers/__init__.py,sha256=3lzOakDoBWmMaNnT2g-YwktPKa_Wme4lnPRSmOQfayY,105
|
215
190
|
lionagi/service/connections/providers/anthropic_.py,sha256=vok8mIyFiuV3K83tOjdYfruA6cv1h_57ML6RtpuW-bU,3157
|
216
|
-
lionagi/service/connections/providers/claude_code_.py,sha256=
|
191
|
+
lionagi/service/connections/providers/claude_code_.py,sha256=ltk41ZdMCf-QSxqUhbb_Un9VC7J0Ek6n20LFJDeoSyY,10589
|
217
192
|
lionagi/service/connections/providers/claude_code_cli.py,sha256=kqEOnCUOOh2O_3NGi6W7r-gdLsbW-Jcp11tm30VEv4Q,4455
|
218
193
|
lionagi/service/connections/providers/exa_.py,sha256=kuWD7yyYRqIa4ChSn0TsxFA5V5LwvFUD-w8TZ6mx4rk,1048
|
219
194
|
lionagi/service/connections/providers/nvidia_nim_.py,sha256=95vmo0DSONYBVHkR9SGJ5BiHNKFZNZBrjw4_7ShOXQA,3154
|
@@ -234,16 +209,15 @@ lionagi/service/third_party/exa_models.py,sha256=G_hnekcy-DillPLzMoDQ8ZisVAL8Mp7
|
|
234
209
|
lionagi/service/third_party/openai_model_names.py,sha256=C44tnqexgc4ZU2-3I_sn5d688hf3WWx-25xBd50bvas,5121
|
235
210
|
lionagi/service/third_party/pplx_models.py,sha256=-EhyJgOWR6rzSv3zczUtk80X6c19p18Dg9KC6l8BFRQ,6473
|
236
211
|
lionagi/session/__init__.py,sha256=kDypY6L3kGPnatAw7YNQAykgg-9MlIBnlhHExaXvt-c,202
|
237
|
-
lionagi/session/branch.py,sha256=
|
212
|
+
lionagi/session/branch.py,sha256=3AZMLLinpVGRd6e99I9AxYx03U2CBG68dgJRKe1NGDo,64808
|
238
213
|
lionagi/session/prompts.py,sha256=GPr0jibyAAqS3awDzGC8SoCL6aWJLLCCbXY0JUuxOC0,3170
|
239
|
-
lionagi/session/session.py,sha256=
|
214
|
+
lionagi/session/session.py,sha256=OZPLXmKP-WGBU_TW1gAp4sv5WsNqO0VphWCXfbQf5YE,13382
|
240
215
|
lionagi/tools/__init__.py,sha256=5y5joOZzfFWERl75auAcNcKC3lImVJ5ZZGvvHZUFCJM,112
|
241
216
|
lionagi/tools/base.py,sha256=hEGnE4MD0CM4UqnF0xsDRKB0aM-pyrTFHl8utHhyJLU,1897
|
242
217
|
lionagi/tools/types.py,sha256=XtJLY0m-Yi_ZLWhm0KycayvqMCZd--HxfQ0x9vFUYDE,230
|
243
218
|
lionagi/tools/file/__init__.py,sha256=5y5joOZzfFWERl75auAcNcKC3lImVJ5ZZGvvHZUFCJM,112
|
244
219
|
lionagi/tools/file/reader.py,sha256=2YKgU3VKo76zfL_buDAUQJoPLC56f6WJ4_mdJjlMDIM,9509
|
245
|
-
lionagi/
|
246
|
-
lionagi-0.16.
|
247
|
-
lionagi-0.16.
|
248
|
-
lionagi-0.16.
|
249
|
-
lionagi-0.16.0.dist-info/RECORD,,
|
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,,
|
lionagi/libs/file/params.py
DELETED
@@ -1,175 +0,0 @@
|
|
1
|
-
# Copyright (c) 2023 - 2025, HaiyangLi <quantocean.li at gmail dot com>
|
2
|
-
#
|
3
|
-
# SPDX-License-Identifier: Apache-2.0
|
4
|
-
|
5
|
-
from collections.abc import Callable
|
6
|
-
from pathlib import Path
|
7
|
-
from typing import Any, Literal
|
8
|
-
|
9
|
-
from pydantic import BaseModel, Field
|
10
|
-
|
11
|
-
|
12
|
-
class ChunkContentParams(BaseModel):
|
13
|
-
"""Parameters for chunking text content into smaller pieces.
|
14
|
-
|
15
|
-
This model defines parameters used by the chunk_content function to split text
|
16
|
-
content into chunks, with support for both character-based and token-based chunking.
|
17
|
-
"""
|
18
|
-
|
19
|
-
content: str = Field(description="The text content to be chunked")
|
20
|
-
chunk_by: Literal["chars", "tokens"] = Field(
|
21
|
-
default="chars",
|
22
|
-
description="Method to use for chunking: 'chars' for character-based or 'tokens' for token-based",
|
23
|
-
)
|
24
|
-
tokenizer: Callable[[str], list[str]] | None = Field(
|
25
|
-
default=None,
|
26
|
-
description="Function to use for tokenization. Defaults to str.split if None",
|
27
|
-
)
|
28
|
-
chunk_size: int = Field(
|
29
|
-
default=1024, ge=1, description="Target size for each chunk"
|
30
|
-
)
|
31
|
-
overlap: float = Field(
|
32
|
-
default=0.0,
|
33
|
-
ge=0.0,
|
34
|
-
le=1.0,
|
35
|
-
description="Fraction of overlap between chunks (0.0 to 1.0)",
|
36
|
-
)
|
37
|
-
threshold: int = Field(
|
38
|
-
default=256,
|
39
|
-
ge=0,
|
40
|
-
description="Minimum size threshold for the last chunk",
|
41
|
-
)
|
42
|
-
metadata: dict[str, Any] = Field(
|
43
|
-
default_factory=dict,
|
44
|
-
description="Additional metadata to include with each chunk",
|
45
|
-
)
|
46
|
-
return_tokens: bool = Field(
|
47
|
-
default=False,
|
48
|
-
description="If True, return chunks as token lists; if False, return as joined strings",
|
49
|
-
)
|
50
|
-
|
51
|
-
|
52
|
-
class DirToFilesParams(BaseModel):
|
53
|
-
"""Parameters for processing directories and collecting file paths.
|
54
|
-
|
55
|
-
This model defines parameters used by the dir_to_files function to recursively
|
56
|
-
process directories and collect matching file paths.
|
57
|
-
"""
|
58
|
-
|
59
|
-
directory: Path | str = Field(
|
60
|
-
description="Directory to process recursively"
|
61
|
-
)
|
62
|
-
file_types: list[str] | None = Field(
|
63
|
-
default=None,
|
64
|
-
description="List of file extensions to include (e.g., ['.txt', '.pdf']). If None, includes all types",
|
65
|
-
)
|
66
|
-
max_workers: int | None = Field(
|
67
|
-
default=None,
|
68
|
-
description="Maximum number of worker threads for concurrent processing",
|
69
|
-
)
|
70
|
-
ignore_errors: bool = Field(
|
71
|
-
default=False,
|
72
|
-
description="If True, log warnings for errors instead of raising exceptions",
|
73
|
-
)
|
74
|
-
verbose: bool = Field(
|
75
|
-
default=False,
|
76
|
-
description="If True, print verbose output during processing",
|
77
|
-
)
|
78
|
-
|
79
|
-
|
80
|
-
class FileToChunksParams(BaseModel):
|
81
|
-
"""Parameters for splitting file content into chunks.
|
82
|
-
|
83
|
-
This model defines parameters used by the file_to_chunks function to read
|
84
|
-
and split file content into chunks with metadata.
|
85
|
-
"""
|
86
|
-
|
87
|
-
file_path: Path | str = Field(
|
88
|
-
description="Path to the file to be processed"
|
89
|
-
)
|
90
|
-
chunk_func: Callable[[str, int, float, int], list[str]] = Field(
|
91
|
-
description="Function to use for chunking the content"
|
92
|
-
)
|
93
|
-
chunk_size: int = Field(
|
94
|
-
default=1500, ge=1, description="Target size for each chunk"
|
95
|
-
)
|
96
|
-
overlap: float = Field(
|
97
|
-
default=0.1,
|
98
|
-
ge=0.0,
|
99
|
-
le=1.0,
|
100
|
-
description="Fraction of overlap between chunks (0.0 to 1.0)",
|
101
|
-
)
|
102
|
-
threshold: int = Field(
|
103
|
-
default=200,
|
104
|
-
ge=0,
|
105
|
-
description="Minimum size threshold for the last chunk",
|
106
|
-
)
|
107
|
-
encoding: str = Field(
|
108
|
-
default="utf-8",
|
109
|
-
description="File encoding to use when reading the file",
|
110
|
-
)
|
111
|
-
custom_metadata: dict[str, Any] | None = Field(
|
112
|
-
default=None,
|
113
|
-
description="Additional metadata to include with each chunk",
|
114
|
-
)
|
115
|
-
output_dir: Path | str | None = Field(
|
116
|
-
default=None,
|
117
|
-
description="Directory to save output chunks (if provided)",
|
118
|
-
)
|
119
|
-
verbose: bool = Field(
|
120
|
-
default=False,
|
121
|
-
description="If True, print verbose output during processing",
|
122
|
-
)
|
123
|
-
timestamp: bool = Field(
|
124
|
-
default=True,
|
125
|
-
description="If True, include timestamp in output filenames",
|
126
|
-
)
|
127
|
-
random_hash_digits: int = Field(
|
128
|
-
default=4,
|
129
|
-
ge=0,
|
130
|
-
description="Number of random hash digits to include in output filenames",
|
131
|
-
)
|
132
|
-
|
133
|
-
|
134
|
-
class SaveToFileParams(BaseModel):
|
135
|
-
"""Parameters for saving text content to a file.
|
136
|
-
|
137
|
-
This model defines parameters used by the save_to_file function to save
|
138
|
-
text content to a file with various options for naming and handling.
|
139
|
-
"""
|
140
|
-
|
141
|
-
text: str = Field(description="The text content to save to file")
|
142
|
-
directory: Path | str = Field(
|
143
|
-
description="Directory where the file will be saved"
|
144
|
-
)
|
145
|
-
filename: str = Field(description="Name of the file to create")
|
146
|
-
extension: str | None = Field(
|
147
|
-
default=None,
|
148
|
-
description="File extension (with or without leading dot)",
|
149
|
-
)
|
150
|
-
timestamp: bool = Field(
|
151
|
-
default=False, description="If True, append timestamp to filename"
|
152
|
-
)
|
153
|
-
dir_exist_ok: bool = Field(
|
154
|
-
default=True,
|
155
|
-
description="If True, creates directory if it doesn't exist",
|
156
|
-
)
|
157
|
-
file_exist_ok: bool = Field(
|
158
|
-
default=False, description="If True, allows overwriting existing files"
|
159
|
-
)
|
160
|
-
time_prefix: bool = Field(
|
161
|
-
default=False,
|
162
|
-
description="If True, prepend timestamp instead of append",
|
163
|
-
)
|
164
|
-
timestamp_format: str | None = Field(
|
165
|
-
default=None,
|
166
|
-
description="Custom format for timestamp (strftime format)",
|
167
|
-
)
|
168
|
-
random_hash_digits: int = Field(
|
169
|
-
default=0,
|
170
|
-
ge=0,
|
171
|
-
description="Number of random hash digits to append to filename",
|
172
|
-
)
|
173
|
-
verbose: bool = Field(
|
174
|
-
default=True, description="If True, logs the file path after saving"
|
175
|
-
)
|
File without changes
|
@@ -1,54 +0,0 @@
|
|
1
|
-
from __future__ import annotations
|
2
|
-
|
3
|
-
from enum import Enum
|
4
|
-
from pathlib import Path
|
5
|
-
|
6
|
-
from pydantic import Field
|
7
|
-
|
8
|
-
from lionagi.tools.base import Resource, ResourceCategory
|
9
|
-
|
10
|
-
here = Path(__file__).parent.resolve()
|
11
|
-
MAPPING_PATH = "synthlang_/resources/mapping"
|
12
|
-
|
13
|
-
|
14
|
-
class TokenMappingTemplate(str, Enum):
|
15
|
-
RUST_CHINESE = "rust_chinese"
|
16
|
-
LION_EMOJI = "lion_emoji"
|
17
|
-
PYTHON_MATH = "python_math"
|
18
|
-
|
19
|
-
@property
|
20
|
-
def fp(self) -> Path:
|
21
|
-
return here / MAPPING_PATH / f"{self.value}_mapping.toml"
|
22
|
-
|
23
|
-
|
24
|
-
class TokenMapping(Resource):
|
25
|
-
category: ResourceCategory = Field(
|
26
|
-
default=ResourceCategory.UTILITY, frozen=True
|
27
|
-
)
|
28
|
-
content: dict
|
29
|
-
|
30
|
-
@classmethod
|
31
|
-
def load_from_template(
|
32
|
-
cls, template: TokenMappingTemplate | str
|
33
|
-
) -> TokenMapping:
|
34
|
-
if isinstance(template, str):
|
35
|
-
template = template.lower().strip()
|
36
|
-
template = (
|
37
|
-
template.replace(".toml", "")
|
38
|
-
.replace(" ", "_")
|
39
|
-
.replace("-", "_")
|
40
|
-
.strip()
|
41
|
-
)
|
42
|
-
if template.endswith("_mapping"):
|
43
|
-
template = template[:-8]
|
44
|
-
if "/" in template:
|
45
|
-
template = template.split("/")[-1]
|
46
|
-
template = TokenMappingTemplate(template)
|
47
|
-
|
48
|
-
if isinstance(template, TokenMappingTemplate):
|
49
|
-
template = template.fp
|
50
|
-
return cls.adapt_from(template, ".toml", many=False)
|
51
|
-
|
52
|
-
raise ValueError(
|
53
|
-
f"Invalid template: {template}. Must be a TokenMappingTemplate or a valid path."
|
54
|
-
)
|
@@ -1 +0,0 @@
|
|
1
|
-
# TODO
|