lionagi 0.1.2__tar.gz → 0.2.1__tar.gz

Sign up to get free protection for your applications and to get access to all the features.
Files changed (339) hide show
  1. lionagi-0.2.1/LICENSE +202 -0
  2. lionagi-0.2.1/PKG-INFO +272 -0
  3. lionagi-0.2.1/README.md +47 -0
  4. lionagi-0.2.1/lionagi/__init__.py +72 -0
  5. lionagi-0.2.1/lionagi/core/_setting/_setting.py +59 -0
  6. lionagi-0.2.1/lionagi/core/action/__init__.py +14 -0
  7. lionagi-0.2.1/lionagi/core/action/function_calling.py +136 -0
  8. lionagi-0.2.1/lionagi/core/action/manual.py +1 -0
  9. lionagi-0.2.1/lionagi/core/action/node.py +109 -0
  10. lionagi-0.2.1/lionagi/core/action/tool.py +114 -0
  11. lionagi-0.2.1/lionagi/core/action/tool_manager.py +356 -0
  12. {lionagi-0.1.2 → lionagi-0.2.1}/lionagi/core/agent/base_agent.py +27 -13
  13. lionagi-0.2.1/lionagi/core/agent/eval/evaluator.py +1 -0
  14. lionagi-0.2.1/lionagi/core/agent/eval/vote.py +40 -0
  15. lionagi-0.2.1/lionagi/core/agent/learn/learner.py +59 -0
  16. lionagi-0.2.1/lionagi/core/agent/plan/unit_template.py +1 -0
  17. lionagi-0.2.1/lionagi/core/collections/__init__.py +17 -0
  18. lionagi-0.1.2/lionagi/core/generic/data_logger.py → lionagi-0.2.1/lionagi/core/collections/_logger.py +69 -55
  19. lionagi-0.2.1/lionagi/core/collections/abc/__init__.py +53 -0
  20. lionagi-0.2.1/lionagi/core/collections/abc/component.py +615 -0
  21. lionagi-0.2.1/lionagi/core/collections/abc/concepts.py +297 -0
  22. lionagi-0.2.1/lionagi/core/collections/abc/exceptions.py +150 -0
  23. lionagi-0.2.1/lionagi/core/collections/abc/util.py +45 -0
  24. lionagi-0.2.1/lionagi/core/collections/exchange.py +161 -0
  25. lionagi-0.2.1/lionagi/core/collections/flow.py +426 -0
  26. lionagi-0.2.1/lionagi/core/collections/model.py +419 -0
  27. lionagi-0.2.1/lionagi/core/collections/pile.py +913 -0
  28. lionagi-0.2.1/lionagi/core/collections/progression.py +236 -0
  29. lionagi-0.2.1/lionagi/core/collections/util.py +64 -0
  30. lionagi-0.2.1/lionagi/core/director/direct.py +314 -0
  31. lionagi-0.2.1/lionagi/core/director/director.py +2 -0
  32. lionagi-0.1.2/lionagi/core/execute/branch_executor.py → lionagi-0.2.1/lionagi/core/engine/branch_engine.py +134 -97
  33. lionagi-0.1.2/lionagi/core/execute/instruction_map_executor.py → lionagi-0.2.1/lionagi/core/engine/instruction_map_engine.py +80 -55
  34. {lionagi-0.1.2/lionagi/experimental/directive/evaluator → lionagi-0.2.1/lionagi/core/engine}/script_engine.py +17 -1
  35. lionagi-0.2.1/lionagi/core/executor/base_executor.py +90 -0
  36. lionagi-0.1.2/lionagi/core/execute/structure_executor.py → lionagi-0.2.1/lionagi/core/executor/graph_executor.py +62 -66
  37. {lionagi-0.1.2/lionagi/core/execute → lionagi-0.2.1/lionagi/core/executor}/neo4j_executor.py +70 -67
  38. lionagi-0.2.1/lionagi/core/generic/__init__.py +7 -0
  39. {lionagi-0.1.2 → lionagi-0.2.1}/lionagi/core/generic/edge.py +29 -79
  40. lionagi-0.2.1/lionagi/core/generic/edge_condition.py +16 -0
  41. lionagi-0.2.1/lionagi/core/generic/graph.py +236 -0
  42. lionagi-0.2.1/lionagi/core/generic/hyperedge.py +1 -0
  43. lionagi-0.2.1/lionagi/core/generic/node.py +220 -0
  44. lionagi-0.2.1/lionagi/core/generic/tree.py +48 -0
  45. lionagi-0.2.1/lionagi/core/generic/tree_node.py +79 -0
  46. lionagi-0.2.1/lionagi/core/mail/__init__.py +12 -0
  47. lionagi-0.2.1/lionagi/core/mail/mail.py +25 -0
  48. lionagi-0.2.1/lionagi/core/mail/mail_manager.py +181 -0
  49. lionagi-0.2.1/lionagi/core/mail/package.py +45 -0
  50. lionagi-0.2.1/lionagi/core/mail/start_mail.py +36 -0
  51. lionagi-0.2.1/lionagi/core/message/__init__.py +19 -0
  52. lionagi-0.2.1/lionagi/core/message/action_request.py +133 -0
  53. lionagi-0.2.1/lionagi/core/message/action_response.py +135 -0
  54. lionagi-0.2.1/lionagi/core/message/assistant_response.py +95 -0
  55. lionagi-0.2.1/lionagi/core/message/instruction.py +234 -0
  56. lionagi-0.2.1/lionagi/core/message/message.py +101 -0
  57. lionagi-0.2.1/lionagi/core/message/system.py +86 -0
  58. lionagi-0.2.1/lionagi/core/message/util.py +283 -0
  59. lionagi-0.2.1/lionagi/core/report/__init__.py +4 -0
  60. lionagi-0.2.1/lionagi/core/report/base.py +217 -0
  61. lionagi-0.2.1/lionagi/core/report/form.py +231 -0
  62. lionagi-0.2.1/lionagi/core/report/report.py +166 -0
  63. lionagi-0.2.1/lionagi/core/report/util.py +28 -0
  64. lionagi-0.2.1/lionagi/core/rule/_default.py +16 -0
  65. lionagi-0.2.1/lionagi/core/rule/action.py +99 -0
  66. lionagi-0.2.1/lionagi/core/rule/base.py +238 -0
  67. lionagi-0.2.1/lionagi/core/rule/boolean.py +56 -0
  68. lionagi-0.2.1/lionagi/core/rule/choice.py +47 -0
  69. lionagi-0.2.1/lionagi/core/rule/mapping.py +96 -0
  70. lionagi-0.2.1/lionagi/core/rule/number.py +71 -0
  71. lionagi-0.2.1/lionagi/core/rule/rulebook.py +109 -0
  72. lionagi-0.2.1/lionagi/core/rule/string.py +52 -0
  73. lionagi-0.2.1/lionagi/core/rule/util.py +35 -0
  74. lionagi-0.2.1/lionagi/core/session/branch.py +431 -0
  75. lionagi-0.2.1/lionagi/core/session/directive_mixin.py +287 -0
  76. lionagi-0.2.1/lionagi/core/session/session.py +311 -0
  77. lionagi-0.2.1/lionagi/core/structure/__init__.py +1 -0
  78. lionagi-0.2.1/lionagi/core/structure/chain.py +1 -0
  79. lionagi-0.2.1/lionagi/core/structure/forest.py +1 -0
  80. lionagi-0.2.1/lionagi/core/structure/graph.py +1 -0
  81. lionagi-0.2.1/lionagi/core/structure/tree.py +1 -0
  82. lionagi-0.2.1/lionagi/core/unit/__init__.py +5 -0
  83. lionagi-0.2.1/lionagi/core/unit/parallel_unit.py +245 -0
  84. lionagi-0.2.1/lionagi/core/unit/template/action.py +81 -0
  85. lionagi-0.2.1/lionagi/core/unit/template/base.py +51 -0
  86. lionagi-0.2.1/lionagi/core/unit/template/plan.py +84 -0
  87. lionagi-0.2.1/lionagi/core/unit/template/predict.py +109 -0
  88. lionagi-0.2.1/lionagi/core/unit/template/score.py +124 -0
  89. lionagi-0.2.1/lionagi/core/unit/template/select.py +104 -0
  90. lionagi-0.2.1/lionagi/core/unit/unit.py +362 -0
  91. lionagi-0.2.1/lionagi/core/unit/unit_form.py +305 -0
  92. lionagi-0.2.1/lionagi/core/unit/unit_mixin.py +1168 -0
  93. lionagi-0.2.1/lionagi/core/unit/util.py +71 -0
  94. lionagi-0.2.1/lionagi/core/validator/validator.py +364 -0
  95. lionagi-0.2.1/lionagi/core/work/work.py +76 -0
  96. lionagi-0.2.1/lionagi/core/work/work_function.py +101 -0
  97. lionagi-0.2.1/lionagi/core/work/work_queue.py +103 -0
  98. lionagi-0.2.1/lionagi/core/work/worker.py +258 -0
  99. lionagi-0.2.1/lionagi/core/work/worklog.py +120 -0
  100. lionagi-0.2.1/lionagi/experimental/compressor/base.py +46 -0
  101. lionagi-0.2.1/lionagi/experimental/compressor/llm_compressor.py +247 -0
  102. lionagi-0.2.1/lionagi/experimental/compressor/llm_summarizer.py +61 -0
  103. lionagi-0.2.1/lionagi/experimental/compressor/util.py +70 -0
  104. lionagi-0.2.1/lionagi/experimental/directive/__init__.py +19 -0
  105. {lionagi-0.1.2 → lionagi-0.2.1}/lionagi/experimental/directive/parser/base_parser.py +69 -2
  106. {lionagi-0.1.2/lionagi/experimental/directive/template_ → lionagi-0.2.1/lionagi/experimental/directive/template}/base_template.py +17 -1
  107. lionagi-0.1.2/lionagi/libs/ln_tokenizer.py → lionagi-0.2.1/lionagi/experimental/directive/tokenizer.py +16 -0
  108. {lionagi-0.1.2/lionagi/experimental/directive → lionagi-0.2.1/lionagi/experimental}/evaluator/ast_evaluator.py +16 -0
  109. {lionagi-0.1.2/lionagi/experimental/directive → lionagi-0.2.1/lionagi/experimental}/evaluator/base_evaluator.py +16 -0
  110. lionagi-0.2.1/lionagi/experimental/knowledge/base.py +10 -0
  111. lionagi-0.2.1/lionagi/experimental/strategies/base.py +1 -0
  112. lionagi-0.2.1/lionagi/integrations/__init__.py +1 -0
  113. {lionagi-0.1.2 → lionagi-0.2.1}/lionagi/integrations/bridge/langchain_/documents.py +4 -0
  114. lionagi-0.2.1/lionagi/integrations/bridge/llamaindex_/index.py +30 -0
  115. {lionagi-0.1.2 → lionagi-0.2.1}/lionagi/integrations/bridge/llamaindex_/llama_index_bridge.py +6 -0
  116. lionagi-0.2.1/lionagi/integrations/chunker/chunk.py +312 -0
  117. {lionagi-0.1.2 → lionagi-0.2.1}/lionagi/integrations/config/oai_configs.py +34 -3
  118. {lionagi-0.1.2 → lionagi-0.2.1}/lionagi/integrations/config/openrouter_configs.py +14 -2
  119. lionagi-0.2.1/lionagi/integrations/loader/load.py +253 -0
  120. {lionagi-0.1.2 → lionagi-0.2.1}/lionagi/integrations/loader/load_util.py +6 -77
  121. lionagi-0.2.1/lionagi/integrations/provider/_mapping.py +46 -0
  122. {lionagi-0.1.2 → lionagi-0.2.1}/lionagi/integrations/provider/litellm.py +2 -1
  123. {lionagi-0.1.2 → lionagi-0.2.1}/lionagi/integrations/provider/mlx_service.py +16 -9
  124. {lionagi-0.1.2 → lionagi-0.2.1}/lionagi/integrations/provider/oai.py +91 -4
  125. {lionagi-0.1.2 → lionagi-0.2.1}/lionagi/integrations/provider/ollama.py +6 -5
  126. lionagi-0.2.1/lionagi/integrations/provider/openrouter.py +160 -0
  127. {lionagi-0.1.2 → lionagi-0.2.1}/lionagi/integrations/provider/services.py +2 -2
  128. {lionagi-0.1.2 → lionagi-0.2.1}/lionagi/integrations/provider/transformers.py +18 -22
  129. lionagi-0.2.1/lionagi/integrations/storage/__init__.py +3 -0
  130. {lionagi-0.1.2 → lionagi-0.2.1}/lionagi/integrations/storage/neo4j.py +52 -60
  131. {lionagi-0.1.2 → lionagi-0.2.1}/lionagi/integrations/storage/storage_util.py +44 -46
  132. {lionagi-0.1.2 → lionagi-0.2.1}/lionagi/integrations/storage/structure_excel.py +43 -26
  133. {lionagi-0.1.2 → lionagi-0.2.1}/lionagi/integrations/storage/to_excel.py +11 -4
  134. {lionagi-0.1.2 → lionagi-0.2.1}/lionagi/libs/__init__.py +22 -1
  135. {lionagi-0.1.2 → lionagi-0.2.1}/lionagi/libs/ln_api.py +75 -20
  136. lionagi-0.2.1/lionagi/libs/ln_context.py +37 -0
  137. {lionagi-0.1.2 → lionagi-0.2.1}/lionagi/libs/ln_convert.py +21 -9
  138. {lionagi-0.1.2 → lionagi-0.2.1}/lionagi/libs/ln_func_call.py +69 -28
  139. lionagi-0.2.1/lionagi/libs/ln_image.py +107 -0
  140. {lionagi-0.1.2 → lionagi-0.2.1}/lionagi/libs/ln_nested.py +26 -11
  141. {lionagi-0.1.2 → lionagi-0.2.1}/lionagi/libs/ln_parse.py +82 -23
  142. {lionagi-0.1.2 → lionagi-0.2.1}/lionagi/libs/ln_queue.py +16 -0
  143. lionagi-0.2.1/lionagi/libs/ln_tokenize.py +164 -0
  144. {lionagi-0.1.2 → lionagi-0.2.1}/lionagi/libs/ln_validate.py +16 -0
  145. lionagi-0.2.1/lionagi/libs/special_tokens.py +172 -0
  146. {lionagi-0.1.2 → lionagi-0.2.1}/lionagi/libs/sys_util.py +95 -24
  147. lionagi-0.2.1/lionagi/lions/coder/code_form.py +13 -0
  148. {lionagi-0.1.2 → lionagi-0.2.1}/lionagi/lions/coder/coder.py +50 -3
  149. {lionagi-0.1.2 → lionagi-0.2.1}/lionagi/lions/coder/util.py +30 -25
  150. {lionagi-0.1.2 → lionagi-0.2.1}/lionagi/tests/libs/test_func_call.py +23 -21
  151. {lionagi-0.1.2 → lionagi-0.2.1}/lionagi/tests/libs/test_nested.py +36 -21
  152. {lionagi-0.1.2 → lionagi-0.2.1}/lionagi/tests/libs/test_parse.py +1 -1
  153. lionagi-0.2.1/lionagi/tests/test_core/collections/test_component.py +206 -0
  154. lionagi-0.2.1/lionagi/tests/test_core/collections/test_exchange.py +138 -0
  155. lionagi-0.2.1/lionagi/tests/test_core/collections/test_flow.py +145 -0
  156. lionagi-0.2.1/lionagi/tests/test_core/collections/test_pile.py +171 -0
  157. lionagi-0.2.1/lionagi/tests/test_core/collections/test_progression.py +129 -0
  158. lionagi-0.2.1/lionagi/tests/test_core/generic/test_edge.py +67 -0
  159. lionagi-0.2.1/lionagi/tests/test_core/generic/test_graph.py +96 -0
  160. lionagi-0.2.1/lionagi/tests/test_core/generic/test_node.py +106 -0
  161. lionagi-0.2.1/lionagi/tests/test_core/generic/test_tree_node.py +73 -0
  162. lionagi-0.2.1/lionagi/tests/test_core/test_branch.py +115 -0
  163. lionagi-0.2.1/lionagi/tests/test_core/test_form.py +46 -0
  164. lionagi-0.2.1/lionagi/tests/test_core/test_report.py +105 -0
  165. lionagi-0.2.1/lionagi/tests/test_core/test_validator.py +111 -0
  166. lionagi-0.2.1/lionagi/version.py +1 -0
  167. lionagi-0.2.1/lionagi.egg-info/PKG-INFO +272 -0
  168. lionagi-0.2.1/lionagi.egg-info/SOURCES.txt +245 -0
  169. {lionagi-0.1.2 → lionagi-0.2.1}/setup.py +1 -1
  170. lionagi-0.1.2/LICENSE +0 -9
  171. lionagi-0.1.2/PKG-INFO +0 -174
  172. lionagi-0.1.2/README.md +0 -143
  173. lionagi-0.1.2/lionagi/__init__.py +0 -17
  174. lionagi-0.1.2/lionagi/core/__init__.py +0 -26
  175. lionagi-0.1.2/lionagi/core/branch/base.py +0 -653
  176. lionagi-0.1.2/lionagi/core/branch/branch.py +0 -474
  177. lionagi-0.1.2/lionagi/core/branch/flow_mixin.py +0 -96
  178. lionagi-0.1.2/lionagi/core/branch/util.py +0 -323
  179. lionagi-0.1.2/lionagi/core/direct/__init__.py +0 -19
  180. lionagi-0.1.2/lionagi/core/direct/cot.py +0 -123
  181. lionagi-0.1.2/lionagi/core/direct/plan.py +0 -164
  182. lionagi-0.1.2/lionagi/core/direct/predict.py +0 -166
  183. lionagi-0.1.2/lionagi/core/direct/react.py +0 -171
  184. lionagi-0.1.2/lionagi/core/direct/score.py +0 -279
  185. lionagi-0.1.2/lionagi/core/direct/select.py +0 -170
  186. lionagi-0.1.2/lionagi/core/direct/sentiment.py +0 -1
  187. lionagi-0.1.2/lionagi/core/direct/utils.py +0 -110
  188. lionagi-0.1.2/lionagi/core/direct/vote.py +0 -64
  189. lionagi-0.1.2/lionagi/core/execute/base_executor.py +0 -47
  190. lionagi-0.1.2/lionagi/core/flow/baseflow.py +0 -23
  191. lionagi-0.1.2/lionagi/core/flow/monoflow/ReAct.py +0 -240
  192. lionagi-0.1.2/lionagi/core/flow/monoflow/__init__.py +0 -9
  193. lionagi-0.1.2/lionagi/core/flow/monoflow/chat.py +0 -95
  194. lionagi-0.1.2/lionagi/core/flow/monoflow/chat_mixin.py +0 -253
  195. lionagi-0.1.2/lionagi/core/flow/monoflow/followup.py +0 -215
  196. lionagi-0.1.2/lionagi/core/flow/polyflow/__init__.py +0 -1
  197. lionagi-0.1.2/lionagi/core/flow/polyflow/chat.py +0 -251
  198. lionagi-0.1.2/lionagi/core/form/action_form.py +0 -26
  199. lionagi-0.1.2/lionagi/core/form/field_validator.py +0 -287
  200. lionagi-0.1.2/lionagi/core/form/form.py +0 -302
  201. lionagi-0.1.2/lionagi/core/form/mixin.py +0 -214
  202. lionagi-0.1.2/lionagi/core/form/scored_form.py +0 -13
  203. lionagi-0.1.2/lionagi/core/generic/__init__.py +0 -37
  204. lionagi-0.1.2/lionagi/core/generic/action.py +0 -26
  205. lionagi-0.1.2/lionagi/core/generic/component.py +0 -532
  206. lionagi-0.1.2/lionagi/core/generic/condition.py +0 -46
  207. lionagi-0.1.2/lionagi/core/generic/mail.py +0 -90
  208. lionagi-0.1.2/lionagi/core/generic/mailbox.py +0 -36
  209. lionagi-0.1.2/lionagi/core/generic/node.py +0 -285
  210. lionagi-0.1.2/lionagi/core/generic/relation.py +0 -70
  211. lionagi-0.1.2/lionagi/core/generic/signal.py +0 -22
  212. lionagi-0.1.2/lionagi/core/generic/structure.py +0 -362
  213. lionagi-0.1.2/lionagi/core/generic/transfer.py +0 -20
  214. lionagi-0.1.2/lionagi/core/generic/work.py +0 -40
  215. lionagi-0.1.2/lionagi/core/graph/graph.py +0 -126
  216. lionagi-0.1.2/lionagi/core/graph/tree.py +0 -190
  217. lionagi-0.1.2/lionagi/core/mail/mail_manager.py +0 -100
  218. lionagi-0.1.2/lionagi/core/mail/schema.py +0 -63
  219. lionagi-0.1.2/lionagi/core/messages/schema.py +0 -325
  220. lionagi-0.1.2/lionagi/core/session/session.py +0 -985
  221. lionagi-0.1.2/lionagi/core/tool/__init__.py +0 -5
  222. lionagi-0.1.2/lionagi/core/tool/tool.py +0 -28
  223. lionagi-0.1.2/lionagi/core/tool/tool_manager.py +0 -283
  224. lionagi-0.1.2/lionagi/experimental/report/form.py +0 -64
  225. lionagi-0.1.2/lionagi/experimental/report/report.py +0 -138
  226. lionagi-0.1.2/lionagi/experimental/report/util.py +0 -47
  227. lionagi-0.1.2/lionagi/experimental/tool/function_calling.py +0 -43
  228. lionagi-0.1.2/lionagi/experimental/tool/manual.py +0 -66
  229. lionagi-0.1.2/lionagi/experimental/tool/schema.py +0 -59
  230. lionagi-0.1.2/lionagi/experimental/tool/tool_manager.py +0 -138
  231. lionagi-0.1.2/lionagi/experimental/tool/util.py +0 -16
  232. lionagi-0.1.2/lionagi/experimental/validator/rule.py +0 -139
  233. lionagi-0.1.2/lionagi/experimental/validator/validator.py +0 -56
  234. lionagi-0.1.2/lionagi/experimental/work/__init__.py +0 -10
  235. lionagi-0.1.2/lionagi/experimental/work/async_queue.py +0 -54
  236. lionagi-0.1.2/lionagi/experimental/work/schema.py +0 -73
  237. lionagi-0.1.2/lionagi/experimental/work/work_function.py +0 -67
  238. lionagi-0.1.2/lionagi/experimental/work/worker.py +0 -56
  239. lionagi-0.1.2/lionagi/experimental/work2/form.py +0 -371
  240. lionagi-0.1.2/lionagi/experimental/work2/report.py +0 -289
  241. lionagi-0.1.2/lionagi/experimental/work2/schema.py +0 -30
  242. lionagi-0.1.2/lionagi/experimental/work2/tests.py +0 -72
  243. lionagi-0.1.2/lionagi/experimental/work2/work_function.py +0 -89
  244. lionagi-0.1.2/lionagi/experimental/work2/worker.py +0 -12
  245. lionagi-0.1.2/lionagi/integrations/bridge/llamaindex_/get_index.py +0 -294
  246. lionagi-0.1.2/lionagi/integrations/chunker/chunk.py +0 -175
  247. lionagi-0.1.2/lionagi/integrations/loader/load.py +0 -152
  248. lionagi-0.1.2/lionagi/integrations/provider/openrouter.py +0 -53
  249. lionagi-0.1.2/lionagi/integrations/storage/__init__.py +0 -3
  250. lionagi-0.1.2/lionagi/tests/test_core/generic/test_component.py +0 -89
  251. lionagi-0.1.2/lionagi/tests/test_core/test_base_branch.py +0 -426
  252. lionagi-0.1.2/lionagi/tests/test_core/test_branch.py +0 -294
  253. lionagi-0.1.2/lionagi/tests/test_core/test_chat_flow.py +0 -63
  254. lionagi-0.1.2/lionagi/tests/test_core/test_mail_manager.py +0 -75
  255. lionagi-0.1.2/lionagi/tests/test_core/test_prompts.py +0 -51
  256. lionagi-0.1.2/lionagi/tests/test_core/test_session.py +0 -254
  257. lionagi-0.1.2/lionagi/tests/test_core/test_session_base_util.py +0 -313
  258. lionagi-0.1.2/lionagi/tests/test_core/test_tool_manager.py +0 -95
  259. lionagi-0.1.2/lionagi/version.py +0 -1
  260. lionagi-0.1.2/lionagi.egg-info/PKG-INFO +0 -174
  261. lionagi-0.1.2/lionagi.egg-info/SOURCES.txt +0 -211
  262. {lionagi-0.1.2 → lionagi-0.2.1}/README.rst +0 -0
  263. {lionagi-0.1.2/lionagi/integrations → lionagi-0.2.1/lionagi/core}/__init__.py +0 -0
  264. {lionagi-0.1.2/lionagi/core/agent → lionagi-0.2.1/lionagi/core/_setting}/__init__.py +0 -0
  265. {lionagi-0.1.2/lionagi/core/branch → lionagi-0.2.1/lionagi/core/agent}/__init__.py +0 -0
  266. {lionagi-0.1.2/lionagi/core/execute → lionagi-0.2.1/lionagi/core/agent/eval}/__init__.py +0 -0
  267. {lionagi-0.1.2/lionagi/core/flow → lionagi-0.2.1/lionagi/core/agent/learn}/__init__.py +0 -0
  268. {lionagi-0.1.2/lionagi/core/form → lionagi-0.2.1/lionagi/core/agent/plan}/__init__.py +0 -0
  269. /lionagi-0.1.2/lionagi/core/branch/executable_branch.py → /lionagi-0.2.1/lionagi/core/agent/plan/plan.py +0 -0
  270. {lionagi-0.1.2/lionagi/core/graph → lionagi-0.2.1/lionagi/core/director}/__init__.py +0 -0
  271. {lionagi-0.1.2/lionagi/core/mail → lionagi-0.2.1/lionagi/core/engine}/__init__.py +0 -0
  272. {lionagi-0.1.2/lionagi/experimental/directive/evaluator → lionagi-0.2.1/lionagi/core/engine}/sandbox_.py +0 -0
  273. {lionagi-0.1.2/lionagi/core/messages → lionagi-0.2.1/lionagi/core/executor}/__init__.py +0 -0
  274. {lionagi-0.1.2/lionagi/core/session → lionagi-0.2.1/lionagi/core/rule}/__init__.py +0 -0
  275. {lionagi-0.1.2/lionagi/experimental → lionagi-0.2.1/lionagi/core/session}/__init__.py +0 -0
  276. {lionagi-0.1.2/lionagi/experimental/directive → lionagi-0.2.1/lionagi/core/unit/template}/__init__.py +0 -0
  277. {lionagi-0.1.2/lionagi/experimental/directive/evaluator → lionagi-0.2.1/lionagi/core/validator}/__init__.py +0 -0
  278. {lionagi-0.1.2/lionagi/experimental/directive/parser → lionagi-0.2.1/lionagi/core/work}/__init__.py +0 -0
  279. {lionagi-0.1.2/lionagi/experimental/directive/template_ → lionagi-0.2.1/lionagi/experimental}/__init__.py +0 -0
  280. {lionagi-0.1.2/lionagi/experimental/report → lionagi-0.2.1/lionagi/experimental/compressor}/__init__.py +0 -0
  281. {lionagi-0.1.2/lionagi/experimental/tool → lionagi-0.2.1/lionagi/experimental/directive/parser}/__init__.py +0 -0
  282. {lionagi-0.1.2/lionagi/experimental/validator → lionagi-0.2.1/lionagi/experimental/directive/template}/__init__.py +0 -0
  283. {lionagi-0.1.2/lionagi/experimental/directive → lionagi-0.2.1/lionagi/experimental/directive/template}/schema.py +0 -0
  284. {lionagi-0.1.2/lionagi/experimental/work2 → lionagi-0.2.1/lionagi/experimental/evaluator}/__init__.py +0 -0
  285. {lionagi-0.1.2/lionagi/integrations/bridge/autogen_ → lionagi-0.2.1/lionagi/experimental/knowledge}/__init__.py +0 -0
  286. /lionagi-0.1.2/lionagi/core/flow/mono_chat_mixin.py → /lionagi-0.2.1/lionagi/experimental/knowledge/graph.py +0 -0
  287. {lionagi-0.1.2/lionagi/integrations/bridge/langchain_ → lionagi-0.2.1/lionagi/experimental/memory}/__init__.py +0 -0
  288. {lionagi-0.1.2/lionagi/integrations/bridge/llamaindex_ → lionagi-0.2.1/lionagi/experimental/strategies}/__init__.py +0 -0
  289. {lionagi-0.1.2 → lionagi-0.2.1}/lionagi/integrations/bridge/__init__.py +0 -0
  290. {lionagi-0.1.2/lionagi/integrations/bridge/pydantic_ → lionagi-0.2.1/lionagi/integrations/bridge/autogen_}/__init__.py +0 -0
  291. {lionagi-0.1.2 → lionagi-0.2.1}/lionagi/integrations/bridge/autogen_/autogen_.py +0 -0
  292. {lionagi-0.1.2/lionagi/integrations/bridge/transformers_ → lionagi-0.2.1/lionagi/integrations/bridge/langchain_}/__init__.py +0 -0
  293. {lionagi-0.1.2 → lionagi-0.2.1}/lionagi/integrations/bridge/langchain_/langchain_bridge.py +0 -0
  294. {lionagi-0.1.2/lionagi/integrations/chunker → lionagi-0.2.1/lionagi/integrations/bridge/llamaindex_}/__init__.py +0 -0
  295. {lionagi-0.1.2 → lionagi-0.2.1}/lionagi/integrations/bridge/llamaindex_/llama_pack.py +0 -0
  296. {lionagi-0.1.2 → lionagi-0.2.1}/lionagi/integrations/bridge/llamaindex_/node_parser.py +0 -0
  297. {lionagi-0.1.2 → lionagi-0.2.1}/lionagi/integrations/bridge/llamaindex_/reader.py +0 -0
  298. {lionagi-0.1.2 → lionagi-0.2.1}/lionagi/integrations/bridge/llamaindex_/textnode.py +0 -0
  299. {lionagi-0.1.2/lionagi/integrations/loader → lionagi-0.2.1/lionagi/integrations/bridge/pydantic_}/__init__.py +0 -0
  300. {lionagi-0.1.2 → lionagi-0.2.1}/lionagi/integrations/bridge/pydantic_/pydantic_bridge.py +0 -0
  301. {lionagi-0.1.2/lionagi/lions → lionagi-0.2.1/lionagi/integrations/bridge/transformers_}/__init__.py +0 -0
  302. {lionagi-0.1.2 → lionagi-0.2.1}/lionagi/integrations/bridge/transformers_/install_.py +0 -0
  303. {lionagi-0.1.2/lionagi/lions/coder → lionagi-0.2.1/lionagi/integrations/chunker}/__init__.py +0 -0
  304. {lionagi-0.1.2 → lionagi-0.2.1}/lionagi/integrations/config/__init__.py +0 -0
  305. {lionagi-0.1.2 → lionagi-0.2.1}/lionagi/integrations/config/mlx_configs.py +0 -0
  306. {lionagi-0.1.2 → lionagi-0.2.1}/lionagi/integrations/config/ollama_configs.py +0 -0
  307. {lionagi-0.1.2/lionagi/lions/researcher → lionagi-0.2.1/lionagi/integrations/loader}/__init__.py +0 -0
  308. {lionagi-0.1.2 → lionagi-0.2.1}/lionagi/integrations/provider/__init__.py +0 -0
  309. {lionagi-0.1.2 → lionagi-0.2.1}/lionagi/integrations/provider/mistralai.py +0 -0
  310. {lionagi-0.1.2 → lionagi-0.2.1}/lionagi/integrations/storage/to_csv.py +0 -0
  311. {lionagi-0.1.2 → lionagi-0.2.1}/lionagi/libs/ln_async.py +0 -0
  312. {lionagi-0.1.2 → lionagi-0.2.1}/lionagi/libs/ln_dataframe.py +0 -0
  313. {lionagi-0.1.2 → lionagi-0.2.1}/lionagi/libs/ln_knowledge_graph.py +0 -0
  314. {lionagi-0.1.2/lionagi/lions/researcher/data_source → lionagi-0.2.1/lionagi/lions}/__init__.py +0 -0
  315. {lionagi-0.1.2/lionagi/tests → lionagi-0.2.1/lionagi/lions/coder}/__init__.py +0 -0
  316. {lionagi-0.1.2 → lionagi-0.2.1}/lionagi/lions/coder/add_feature.py +0 -0
  317. {lionagi-0.1.2 → lionagi-0.2.1}/lionagi/lions/coder/base_prompts.py +0 -0
  318. {lionagi-0.1.2/lionagi/tests/integrations → lionagi-0.2.1/lionagi/lions/researcher}/__init__.py +0 -0
  319. {lionagi-0.1.2/lionagi/tests/libs → lionagi-0.2.1/lionagi/lions/researcher/data_source}/__init__.py +0 -0
  320. {lionagi-0.1.2 → lionagi-0.2.1}/lionagi/lions/researcher/data_source/finhub_.py +0 -0
  321. {lionagi-0.1.2 → lionagi-0.2.1}/lionagi/lions/researcher/data_source/google_.py +0 -0
  322. {lionagi-0.1.2 → lionagi-0.2.1}/lionagi/lions/researcher/data_source/wiki_.py +0 -0
  323. {lionagi-0.1.2 → lionagi-0.2.1}/lionagi/lions/researcher/data_source/yfinance_.py +0 -0
  324. {lionagi-0.1.2/lionagi/tests/test_core → lionagi-0.2.1/lionagi/tests}/__init__.py +0 -0
  325. {lionagi-0.1.2/lionagi/tests/test_core/generic → lionagi-0.2.1/lionagi/tests/integrations}/__init__.py +0 -0
  326. /lionagi-0.1.2/lionagi/experimental/work2/util.py → /lionagi-0.2.1/lionagi/tests/libs/__init__.py +0 -0
  327. {lionagi-0.1.2 → lionagi-0.2.1}/lionagi/tests/libs/test_api.py +0 -0
  328. {lionagi-0.1.2 → lionagi-0.2.1}/lionagi/tests/libs/test_convert.py +0 -0
  329. {lionagi-0.1.2 → lionagi-0.2.1}/lionagi/tests/libs/test_field_validators.py +0 -0
  330. {lionagi-0.1.2 → lionagi-0.2.1}/lionagi/tests/libs/test_queue.py +0 -0
  331. {lionagi-0.1.2 → lionagi-0.2.1}/lionagi/tests/libs/test_sys_util.py +0 -0
  332. /lionagi-0.1.2/lionagi/experimental/work2/work.py → /lionagi-0.2.1/lionagi/tests/test_core/__init__.py +0 -0
  333. /lionagi-0.1.2/lionagi/integrations/bridge/llamaindex_/index.py → /lionagi-0.2.1/lionagi/tests/test_core/collections/__init__.py +0 -0
  334. /lionagi-0.1.2/lionagi/tests/libs/test_async.py → /lionagi-0.2.1/lionagi/tests/test_core/generic/__init__.py +0 -0
  335. {lionagi-0.1.2 → lionagi-0.2.1}/lionagi.egg-info/dependency_links.txt +0 -0
  336. {lionagi-0.1.2 → lionagi-0.2.1}/lionagi.egg-info/requires.txt +0 -0
  337. {lionagi-0.1.2 → lionagi-0.2.1}/lionagi.egg-info/top_level.txt +0 -0
  338. {lionagi-0.1.2 → lionagi-0.2.1}/pyproject.toml +0 -0
  339. {lionagi-0.1.2 → lionagi-0.2.1}/setup.cfg +0 -0
lionagi-0.2.1/LICENSE ADDED
@@ -0,0 +1,202 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+
190
+ Copyright 2024 HaiyangLi
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
lionagi-0.2.1/PKG-INFO ADDED
@@ -0,0 +1,272 @@
1
+ Metadata-Version: 2.1
2
+ Name: lionagi
3
+ Version: 0.2.1
4
+ Summary: Towards automated general intelligence.
5
+ Author: HaiyangLi
6
+ Author-email: Haiyang Li <ocean@lionagi.ai>
7
+ License: Apache License
8
+ Version 2.0, January 2004
9
+ http://www.apache.org/licenses/
10
+
11
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
12
+
13
+ 1. Definitions.
14
+
15
+ "License" shall mean the terms and conditions for use, reproduction,
16
+ and distribution as defined by Sections 1 through 9 of this document.
17
+
18
+ "Licensor" shall mean the copyright owner or entity authorized by
19
+ the copyright owner that is granting the License.
20
+
21
+ "Legal Entity" shall mean the union of the acting entity and all
22
+ other entities that control, are controlled by, or are under common
23
+ control with that entity. For the purposes of this definition,
24
+ "control" means (i) the power, direct or indirect, to cause the
25
+ direction or management of such entity, whether by contract or
26
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
27
+ outstanding shares, or (iii) beneficial ownership of such entity.
28
+
29
+ "You" (or "Your") shall mean an individual or Legal Entity
30
+ exercising permissions granted by this License.
31
+
32
+ "Source" form shall mean the preferred form for making modifications,
33
+ including but not limited to software source code, documentation
34
+ source, and configuration files.
35
+
36
+ "Object" form shall mean any form resulting from mechanical
37
+ transformation or translation of a Source form, including but
38
+ not limited to compiled object code, generated documentation,
39
+ and conversions to other media types.
40
+
41
+ "Work" shall mean the work of authorship, whether in Source or
42
+ Object form, made available under the License, as indicated by a
43
+ copyright notice that is included in or attached to the work
44
+ (an example is provided in the Appendix below).
45
+
46
+ "Derivative Works" shall mean any work, whether in Source or Object
47
+ form, that is based on (or derived from) the Work and for which the
48
+ editorial revisions, annotations, elaborations, or other modifications
49
+ represent, as a whole, an original work of authorship. For the purposes
50
+ of this License, Derivative Works shall not include works that remain
51
+ separable from, or merely link (or bind by name) to the interfaces of,
52
+ the Work and Derivative Works thereof.
53
+
54
+ "Contribution" shall mean any work of authorship, including
55
+ the original version of the Work and any modifications or additions
56
+ to that Work or Derivative Works thereof, that is intentionally
57
+ submitted to Licensor for inclusion in the Work by the copyright owner
58
+ or by an individual or Legal Entity authorized to submit on behalf of
59
+ the copyright owner. For the purposes of this definition, "submitted"
60
+ means any form of electronic, verbal, or written communication sent
61
+ to the Licensor or its representatives, including but not limited to
62
+ communication on electronic mailing lists, source code control systems,
63
+ and issue tracking systems that are managed by, or on behalf of, the
64
+ Licensor for the purpose of discussing and improving the Work, but
65
+ excluding communication that is conspicuously marked or otherwise
66
+ designated in writing by the copyright owner as "Not a Contribution."
67
+
68
+ "Contributor" shall mean Licensor and any individual or Legal Entity
69
+ on behalf of whom a Contribution has been received by Licensor and
70
+ subsequently incorporated within the Work.
71
+
72
+ 2. Grant of Copyright License. Subject to the terms and conditions of
73
+ this License, each Contributor hereby grants to You a perpetual,
74
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
75
+ copyright license to reproduce, prepare Derivative Works of,
76
+ publicly display, publicly perform, sublicense, and distribute the
77
+ Work and such Derivative Works in Source or Object form.
78
+
79
+ 3. Grant of Patent License. Subject to the terms and conditions of
80
+ this License, each Contributor hereby grants to You a perpetual,
81
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
82
+ (except as stated in this section) patent license to make, have made,
83
+ use, offer to sell, sell, import, and otherwise transfer the Work,
84
+ where such license applies only to those patent claims licensable
85
+ by such Contributor that are necessarily infringed by their
86
+ Contribution(s) alone or by combination of their Contribution(s)
87
+ with the Work to which such Contribution(s) was submitted. If You
88
+ institute patent litigation against any entity (including a
89
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
90
+ or a Contribution incorporated within the Work constitutes direct
91
+ or contributory patent infringement, then any patent licenses
92
+ granted to You under this License for that Work shall terminate
93
+ as of the date such litigation is filed.
94
+
95
+ 4. Redistribution. You may reproduce and distribute copies of the
96
+ Work or Derivative Works thereof in any medium, with or without
97
+ modifications, and in Source or Object form, provided that You
98
+ meet the following conditions:
99
+
100
+ (a) You must give any other recipients of the Work or
101
+ Derivative Works a copy of this License; and
102
+
103
+ (b) You must cause any modified files to carry prominent notices
104
+ stating that You changed the files; and
105
+
106
+ (c) You must retain, in the Source form of any Derivative Works
107
+ that You distribute, all copyright, patent, trademark, and
108
+ attribution notices from the Source form of the Work,
109
+ excluding those notices that do not pertain to any part of
110
+ the Derivative Works; and
111
+
112
+ (d) If the Work includes a "NOTICE" text file as part of its
113
+ distribution, then any Derivative Works that You distribute must
114
+ include a readable copy of the attribution notices contained
115
+ within such NOTICE file, excluding those notices that do not
116
+ pertain to any part of the Derivative Works, in at least one
117
+ of the following places: within a NOTICE text file distributed
118
+ as part of the Derivative Works; within the Source form or
119
+ documentation, if provided along with the Derivative Works; or,
120
+ within a display generated by the Derivative Works, if and
121
+ wherever such third-party notices normally appear. The contents
122
+ of the NOTICE file are for informational purposes only and
123
+ do not modify the License. You may add Your own attribution
124
+ notices within Derivative Works that You distribute, alongside
125
+ or as an addendum to the NOTICE text from the Work, provided
126
+ that such additional attribution notices cannot be construed
127
+ as modifying the License.
128
+
129
+ You may add Your own copyright statement to Your modifications and
130
+ may provide additional or different license terms and conditions
131
+ for use, reproduction, or distribution of Your modifications, or
132
+ for any such Derivative Works as a whole, provided Your use,
133
+ reproduction, and distribution of the Work otherwise complies with
134
+ the conditions stated in this License.
135
+
136
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
137
+ any Contribution intentionally submitted for inclusion in the Work
138
+ by You to the Licensor shall be under the terms and conditions of
139
+ this License, without any additional terms or conditions.
140
+ Notwithstanding the above, nothing herein shall supersede or modify
141
+ the terms of any separate license agreement you may have executed
142
+ with Licensor regarding such Contributions.
143
+
144
+ 6. Trademarks. This License does not grant permission to use the trade
145
+ names, trademarks, service marks, or product names of the Licensor,
146
+ except as required for reasonable and customary use in describing the
147
+ origin of the Work and reproducing the content of the NOTICE file.
148
+
149
+ 7. Disclaimer of Warranty. Unless required by applicable law or
150
+ agreed to in writing, Licensor provides the Work (and each
151
+ Contributor provides its Contributions) on an "AS IS" BASIS,
152
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
153
+ implied, including, without limitation, any warranties or conditions
154
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
155
+ PARTICULAR PURPOSE. You are solely responsible for determining the
156
+ appropriateness of using or redistributing the Work and assume any
157
+ risks associated with Your exercise of permissions under this License.
158
+
159
+ 8. Limitation of Liability. In no event and under no legal theory,
160
+ whether in tort (including negligence), contract, or otherwise,
161
+ unless required by applicable law (such as deliberate and grossly
162
+ negligent acts) or agreed to in writing, shall any Contributor be
163
+ liable to You for damages, including any direct, indirect, special,
164
+ incidental, or consequential damages of any character arising as a
165
+ result of this License or out of the use or inability to use the
166
+ Work (including but not limited to damages for loss of goodwill,
167
+ work stoppage, computer failure or malfunction, or any and all
168
+ other commercial damages or losses), even if such Contributor
169
+ has been advised of the possibility of such damages.
170
+
171
+ 9. Accepting Warranty or Additional Liability. While redistributing
172
+ the Work or Derivative Works thereof, You may choose to offer,
173
+ and charge a fee for, acceptance of support, warranty, indemnity,
174
+ or other liability obligations and/or rights consistent with this
175
+ License. However, in accepting such obligations, You may act only
176
+ on Your own behalf and on Your sole responsibility, not on behalf
177
+ of any other Contributor, and only if You agree to indemnify,
178
+ defend, and hold each Contributor harmless for any liability
179
+ incurred by, or claims asserted against, such Contributor by reason
180
+ of your accepting any such warranty or additional liability.
181
+
182
+ END OF TERMS AND CONDITIONS
183
+
184
+ APPENDIX: How to apply the Apache License to your work.
185
+
186
+ To apply the Apache License to your work, attach the following
187
+ boilerplate notice, with the fields enclosed by brackets "[]"
188
+ replaced with your own identifying information. (Don't include
189
+ the brackets!) The text should be enclosed in the appropriate
190
+ comment syntax for the file format. We also recommend that a
191
+ file or class name and description of purpose be included on the
192
+ same "printed page" as the copyright notice for easier
193
+ identification within third-party archives.
194
+
195
+
196
+ Copyright 2024 HaiyangLi
197
+
198
+ Licensed under the Apache License, Version 2.0 (the "License");
199
+ you may not use this file except in compliance with the License.
200
+ You may obtain a copy of the License at
201
+
202
+ http://www.apache.org/licenses/LICENSE-2.0
203
+
204
+ Unless required by applicable law or agreed to in writing, software
205
+ distributed under the License is distributed on an "AS IS" BASIS,
206
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
207
+ See the License for the specific language governing permissions and
208
+ limitations under the License.
209
+
210
+ Project-URL: PyPI, https://pypi.org/project/lionagi/
211
+ Project-URL: Repository, https://github.com/lion-agi/lionagi
212
+ Project-URL: Discord, https://discord.gg/ACnynvvPjt
213
+ Classifier: Programming Language :: Python :: 3
214
+ Classifier: License :: OSI Approved :: Apache Software License
215
+ Classifier: Operating System :: OS Independent
216
+ Requires-Python: >=3.10
217
+ Description-Content-Type: text/markdown
218
+ License-File: LICENSE
219
+ Requires-Dist: aiohttp>=3.9.3
220
+ Requires-Dist: python-dotenv==1.0.0
221
+ Requires-Dist: tiktoken>=0.5.1
222
+ Requires-Dist: pydantic>=2.6.0
223
+ Requires-Dist: aiocache>=0.12.2
224
+ Requires-Dist: pandas>=2.1.0
225
+
226
+ ![PyPI - Version](https://img.shields.io/pypi/v/lionagi?labelColor=233476aa&color=231fc935) ![PyPI - Downloads](https://img.shields.io/pypi/dm/lionagi?color=blue)
227
+
228
+
229
+ [PyPI](https://pypi.org/project/lionagi/) | [Documentation](https://ocean-lion.com/Welcome) | [Discord](https://discord.gg/xCkA5ErGmV)
230
+
231
+
232
+ # Language InterOperable Network - LION
233
+
234
+ ```
235
+ lionagi version 0.2.1
236
+ ```
237
+
238
+ **Powerful Intelligent Workflow Automation**
239
+
240
+ lionagi is an intelligent agentic workflow automation framework. It introduces advanced ML models into any existing workflows and data infrastructure.
241
+
242
+
243
+ ### Why Automating Workflows?
244
+
245
+ Intelligent AI models such as [Large Language Model (LLM)](https://en.wikipedia.org/wiki/Large_language_model), introduced new possibilities of human-computer interaction. LLMs is drawing a lot of attention worldwide due to its “one model fits all”, and incredible performance. One way of using LLM is to use as search engine, however, this usage is complicated by the fact that LLMs [hallucinate](https://arxiv.org/abs/2311.05232).
246
+
247
+ What goes inside of a LLM is more akin to a [black-box](https://pauldeepakraj-r.medium.com/demystifying-the-black-box-a-deep-dive-into-llm-interpretability-971524966fdf), lacking interpretability, meaning we don’t know how it reaches certain answer or conclusion, thus we cannot fully trust/rely the output from such a system. Another approach of using LLM is to treat them as [intelligent agent](https://arxiv.org/html/2401.03428v1), that are equipped with various tools and data sources. A workflow conducted by such an intelligent agent have clear steps, and we can specify, observe, evaluate and optimize the logic for each decision that the `agent` made to perform actions. This approach, though we still cannot pinpoint how LLM output what it outputs, but the flow itself is **explainable**.
248
+
249
+
250
+
251
+ ### Community
252
+
253
+ We encourage contributions to LionAGI and invite you to enrich its features and capabilities. Engage with us and other community members [Join Our Discord](https://discord.gg/7RGWqpSxze)
254
+
255
+ ### Citation
256
+
257
+ When referencing LionAGI in your projects or research, please cite:
258
+
259
+ ```bibtex
260
+ @software{Li_LionAGI_2023,
261
+ author = {Haiyang Li},
262
+ month = {12},
263
+ year = {2023},
264
+ title = {LionAGI: Towards Automated General Intelligence},
265
+ url = {https://github.com/lion-agi/lionagi},
266
+ }
267
+ ```
268
+
269
+
270
+ ### Requirements
271
+ Python 3.10 or higher.
272
+
@@ -0,0 +1,47 @@
1
+ ![PyPI - Version](https://img.shields.io/pypi/v/lionagi?labelColor=233476aa&color=231fc935) ![PyPI - Downloads](https://img.shields.io/pypi/dm/lionagi?color=blue)
2
+
3
+
4
+ [PyPI](https://pypi.org/project/lionagi/) | [Documentation](https://ocean-lion.com/Welcome) | [Discord](https://discord.gg/xCkA5ErGmV)
5
+
6
+
7
+ # Language InterOperable Network - LION
8
+
9
+ ```
10
+ lionagi version 0.2.1
11
+ ```
12
+
13
+ **Powerful Intelligent Workflow Automation**
14
+
15
+ lionagi is an intelligent agentic workflow automation framework. It introduces advanced ML models into any existing workflows and data infrastructure.
16
+
17
+
18
+ ### Why Automating Workflows?
19
+
20
+ Intelligent AI models such as [Large Language Model (LLM)](https://en.wikipedia.org/wiki/Large_language_model), introduced new possibilities of human-computer interaction. LLMs is drawing a lot of attention worldwide due to its “one model fits all”, and incredible performance. One way of using LLM is to use as search engine, however, this usage is complicated by the fact that LLMs [hallucinate](https://arxiv.org/abs/2311.05232).
21
+
22
+ What goes inside of a LLM is more akin to a [black-box](https://pauldeepakraj-r.medium.com/demystifying-the-black-box-a-deep-dive-into-llm-interpretability-971524966fdf), lacking interpretability, meaning we don’t know how it reaches certain answer or conclusion, thus we cannot fully trust/rely the output from such a system. Another approach of using LLM is to treat them as [intelligent agent](https://arxiv.org/html/2401.03428v1), that are equipped with various tools and data sources. A workflow conducted by such an intelligent agent have clear steps, and we can specify, observe, evaluate and optimize the logic for each decision that the `agent` made to perform actions. This approach, though we still cannot pinpoint how LLM output what it outputs, but the flow itself is **explainable**.
23
+
24
+
25
+
26
+ ### Community
27
+
28
+ We encourage contributions to LionAGI and invite you to enrich its features and capabilities. Engage with us and other community members [Join Our Discord](https://discord.gg/7RGWqpSxze)
29
+
30
+ ### Citation
31
+
32
+ When referencing LionAGI in your projects or research, please cite:
33
+
34
+ ```bibtex
35
+ @software{Li_LionAGI_2023,
36
+ author = {Haiyang Li},
37
+ month = {12},
38
+ year = {2023},
39
+ title = {LionAGI: Towards Automated General Intelligence},
40
+ url = {https://github.com/lion-agi/lionagi},
41
+ }
42
+ ```
43
+
44
+
45
+ ### Requirements
46
+ Python 3.10 or higher.
47
+
@@ -0,0 +1,72 @@
1
+ """
2
+ Copyright 2024 HaiyangLi
3
+
4
+ Licensed under the Apache License, Version 2.0 (the "License");
5
+ you may not use this file except in compliance with the License.
6
+ You may obtain a copy of the License at
7
+
8
+ http://www.apache.org/licenses/LICENSE-2.0
9
+
10
+ Unless required by applicable law or agreed to in writing, software
11
+ distributed under the License is distributed on an "AS IS" BASIS,
12
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ See the License for the specific language governing permissions and
14
+ limitations under the License.
15
+ """
16
+
17
+ import logging
18
+ from .version import __version__
19
+ from dotenv import load_dotenv
20
+
21
+ from lionagi.libs.ln_convert import to_list, to_dict, to_df, to_readable_dict
22
+ from lionagi.libs.ln_func_call import alcall, bcall, lcall, CallDecorator as cd, tcall
23
+ from lionagi.core.collections.abc import Field
24
+ from lionagi.core.collections import progression, flow, pile, iModel
25
+ from lionagi.core.generic import Node, Graph, Tree, Edge
26
+ from lionagi.core.action import func_to_tool
27
+ from lionagi.core.report import Form, Report
28
+ from lionagi.core.session.branch import Branch
29
+ from lionagi.core.session.session import Session
30
+ from lionagi.core.work.worker import work, Worker
31
+ from lionagi.integrations.provider.services import Services
32
+ from lionagi.integrations.chunker.chunk import chunk
33
+ from lionagi.integrations.loader.load import load
34
+ import lionagi.core.director.direct as direct
35
+
36
+
37
+ __all__ = [
38
+ "Field",
39
+ "progression",
40
+ "flow",
41
+ "pile",
42
+ "iModel",
43
+ "work",
44
+ "Worker",
45
+ "Branch",
46
+ "Session",
47
+ "Form",
48
+ "Report",
49
+ "Services",
50
+ "direct",
51
+ "Node",
52
+ "Graph",
53
+ "Tree",
54
+ "Edge",
55
+ "chunk",
56
+ "load",
57
+ "func_to_tool",
58
+ "cd",
59
+ "alcall",
60
+ "bcall",
61
+ "to_list",
62
+ "to_dict",
63
+ "lcall",
64
+ "to_df",
65
+ "tcall",
66
+ "to_readable_dict",
67
+ ]
68
+
69
+
70
+ logger = logging.getLogger(__name__)
71
+ logger.setLevel(logging.INFO)
72
+ load_dotenv()
@@ -0,0 +1,59 @@
1
+ # TODO
2
+
3
+ # import csv
4
+ # import json
5
+ # import threading
6
+ # from contextlib import contextmanager
7
+
8
+
9
+ # class Settings:
10
+ # def __init__(self):
11
+ # self._lock = threading.Lock()
12
+ # self._config = {}
13
+ # self._default_service = None
14
+
15
+ # def load_from_json(self, file_path):
16
+ # with self._lock:
17
+ # with open(file_path, "r") as file:
18
+ # self._config = json.load(file)
19
+
20
+ # def save_to_json(self, file_path):
21
+ # with self._lock:
22
+ # with open(file_path, "w") as file:
23
+ # json.dump(self._config, file, indent=4)
24
+
25
+ # def load_default_service(self, file_path):
26
+ # with self._lock:
27
+ # with open(file_path, "r") as file:
28
+ # reader = csv.DictReader(file)
29
+ # self._default_service = next(reader)
30
+
31
+ # def save_default_service(self, file_path):
32
+ # with self._lock:
33
+ # fieldnames = ["provider", "api_key", "rate_limit"]
34
+ # with open(file_path, "w", newline="") as file:
35
+ # writer = csv.DictWriter(file, fieldnames=fieldnames)
36
+ # writer.writeheader()
37
+ # writer.writerow(self._default_service)
38
+
39
+ # @contextmanager
40
+ # def service_context(self, provider=None, api_key=None, rate_limit=None):
41
+ # with self._lock:
42
+ # service_config = {
43
+ # "provider": provider or self._default_service["provider"],
44
+ # "api_key": api_key or self._default_service["api_key"],
45
+ # "rate_limit": rate_limit or self._default_service["rate_limit"],
46
+ # }
47
+ # yield service_config
48
+
49
+ # def get_config(self, key):
50
+ # with self._lock:
51
+ # return self._config.get(key)
52
+
53
+ # def set_config(self, key, value):
54
+ # with self._lock:
55
+ # self._config[key] = value
56
+
57
+
58
+ # # Singleton instance
59
+ # lionagi_settings = Settings()
@@ -0,0 +1,14 @@
1
+ from .function_calling import FunctionCalling
2
+ from .tool import Tool
3
+ from .tool_manager import ToolManager, func_to_tool
4
+ from .node import ActionNode, DirectiveSelection
5
+
6
+
7
+ __all__ = [
8
+ "FunctionCalling",
9
+ "Tool",
10
+ "ToolManager",
11
+ "func_to_tool",
12
+ "ActionNode",
13
+ "DirectiveSelection",
14
+ ]