lionagi 0.5.2__tar.gz → 0.5.4__tar.gz

Sign up to get free protection for your applications and to get access to all the features.
Files changed (393) hide show
  1. {lionagi-0.5.2 → lionagi-0.5.4}/.env.example +1 -1
  2. {lionagi-0.5.2 → lionagi-0.5.4}/PKG-INFO +2 -2
  3. {lionagi-0.5.2 → lionagi-0.5.4}/README.md +1 -1
  4. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/__init__.py +4 -1
  5. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/core/session/branch.py +3 -2
  6. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/core/session/session.py +3 -3
  7. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/libs/func/async_calls/alcall.py +7 -0
  8. lionagi-0.5.4/lionagi/operations/brainstorm/brainstorm.py +429 -0
  9. lionagi-0.5.4/lionagi/operations/brainstorm/prompt.py +8 -0
  10. lionagi-0.5.4/lionagi/operations/plan/plan.py +385 -0
  11. lionagi-0.5.4/lionagi/operations/plan/prompt.py +22 -0
  12. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/protocols/operatives/instruct.py +0 -6
  13. lionagi-0.5.4/lionagi/protocols/operatives/prompts.py +83 -0
  14. lionagi-0.5.4/lionagi/version.py +1 -0
  15. {lionagi-0.5.2 → lionagi-0.5.4}/pyproject.toml +1 -1
  16. {lionagi-0.5.2 → lionagi-0.5.4}/uv.lock +162 -162
  17. lionagi-0.5.2/lionagi/operations/brainstorm/brainstorm.py +0 -204
  18. lionagi-0.5.2/lionagi/operations/brainstorm/prompt.py +0 -1
  19. lionagi-0.5.2/lionagi/operations/plan/plan.py +0 -172
  20. lionagi-0.5.2/lionagi/operations/plan/prompt.py +0 -21
  21. lionagi-0.5.2/lionagi/protocols/operatives/prompts.py +0 -236
  22. lionagi-0.5.2/lionagi/version.py +0 -1
  23. {lionagi-0.5.2 → lionagi-0.5.4}/.github/FUNDING.yml +0 -0
  24. {lionagi-0.5.2 → lionagi-0.5.4}/.github/dependabot.yml +0 -0
  25. {lionagi-0.5.2 → lionagi-0.5.4}/.github/workflows/ci.yml +0 -0
  26. {lionagi-0.5.2 → lionagi-0.5.4}/.github/workflows/codeql.yml +0 -0
  27. {lionagi-0.5.2 → lionagi-0.5.4}/.github/workflows/release.yml +0 -0
  28. {lionagi-0.5.2 → lionagi-0.5.4}/.gitignore +0 -0
  29. {lionagi-0.5.2 → lionagi-0.5.4}/.pre-commit-config.yaml +0 -0
  30. {lionagi-0.5.2 → lionagi-0.5.4}/.python-version +0 -0
  31. {lionagi-0.5.2 → lionagi-0.5.4}/CODE_OF_CONDUCT.md +0 -0
  32. {lionagi-0.5.2 → lionagi-0.5.4}/CONTRIBUTING.md +0 -0
  33. {lionagi-0.5.2 → lionagi-0.5.4}/LICENSE +0 -0
  34. {lionagi-0.5.2 → lionagi-0.5.4}/docs/api_reference/action.md +0 -0
  35. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/core/__init__.py +0 -0
  36. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/core/_class_registry.py +0 -0
  37. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/core/action/__init__.py +0 -0
  38. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/core/action/action_manager.py +0 -0
  39. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/core/action/base.py +0 -0
  40. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/core/action/function_calling.py +0 -0
  41. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/core/action/tool.py +0 -0
  42. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/core/action/types.py +0 -0
  43. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/core/communication/__init__.py +0 -0
  44. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/core/communication/action_request.py +0 -0
  45. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/core/communication/action_response.py +0 -0
  46. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/core/communication/assistant_response.py +0 -0
  47. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/core/communication/base_mail.py +0 -0
  48. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/core/communication/instruction.py +0 -0
  49. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/core/communication/message.py +0 -0
  50. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/core/communication/message_manager.py +0 -0
  51. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/core/communication/system.py +0 -0
  52. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/core/communication/templates/README.md +0 -0
  53. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/core/communication/templates/action_request.jinja2 +0 -0
  54. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/core/communication/templates/action_response.jinja2 +0 -0
  55. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/core/communication/templates/assistant_response.jinja2 +0 -0
  56. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/core/communication/templates/instruction_message.jinja2 +0 -0
  57. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/core/communication/templates/system_message.jinja2 +0 -0
  58. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/core/communication/templates/tool_schemas.jinja2 +0 -0
  59. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/core/communication/types.py +0 -0
  60. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/core/communication/utils.py +0 -0
  61. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/core/forms/__init__.py +0 -0
  62. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/core/forms/base.py +0 -0
  63. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/core/forms/form.py +0 -0
  64. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/core/forms/report.py +0 -0
  65. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/core/forms/types.py +0 -0
  66. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/core/forms/utils.py +0 -0
  67. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/core/generic/__init__.py +0 -0
  68. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/core/generic/component.py +0 -0
  69. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/core/generic/edge.py +0 -0
  70. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/core/generic/element.py +0 -0
  71. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/core/generic/graph.py +0 -0
  72. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/core/generic/log.py +0 -0
  73. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/core/generic/log_manager.py +0 -0
  74. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/core/generic/node.py +0 -0
  75. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/core/generic/pile.py +0 -0
  76. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/core/generic/progression.py +0 -0
  77. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/core/generic/types.py +0 -0
  78. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/core/generic/utils.py +0 -0
  79. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/core/models/__init__.py +0 -0
  80. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/core/models/base.py +0 -0
  81. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/core/models/field_model.py +0 -0
  82. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/core/models/model_params.py +0 -0
  83. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/core/models/note.py +0 -0
  84. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/core/models/operable_model.py +0 -0
  85. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/core/models/schema_model.py +0 -0
  86. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/core/models/types.py +0 -0
  87. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/core/session/__init__.py +0 -0
  88. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/core/session/branch_mixins.py +0 -0
  89. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/core/session/types.py +0 -0
  90. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/core/typing/__init__.py +0 -0
  91. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/core/typing/_concepts.py +0 -0
  92. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/core/typing/_id.py +0 -0
  93. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/core/typing/_pydantic.py +0 -0
  94. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/core/typing/_typing.py +0 -0
  95. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/__init__.py +0 -0
  96. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/_services.py +0 -0
  97. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/anthropic_/AnthropicModel.py +0 -0
  98. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/anthropic_/AnthropicService.py +0 -0
  99. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/anthropic_/__init__.py +0 -0
  100. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/anthropic_/anthropic_max_output_token_data.yaml +0 -0
  101. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/anthropic_/anthropic_price_data.yaml +0 -0
  102. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/anthropic_/api_endpoints/__init__.py +0 -0
  103. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/anthropic_/api_endpoints/api_request.py +0 -0
  104. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/anthropic_/api_endpoints/data_models.py +0 -0
  105. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/anthropic_/api_endpoints/match_response.py +0 -0
  106. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/anthropic_/api_endpoints/messages/__init__.py +0 -0
  107. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/anthropic_/api_endpoints/messages/request/__init__.py +0 -0
  108. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/anthropic_/api_endpoints/messages/request/message_models.py +0 -0
  109. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/anthropic_/api_endpoints/messages/request/request_body.py +0 -0
  110. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/anthropic_/api_endpoints/messages/response/__init__.py +0 -0
  111. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/anthropic_/api_endpoints/messages/response/content_models.py +0 -0
  112. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/anthropic_/api_endpoints/messages/response/response_body.py +0 -0
  113. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/anthropic_/api_endpoints/messages/response/usage_models.py +0 -0
  114. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/anthropic_/version.py +0 -0
  115. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/groq_/GroqModel.py +0 -0
  116. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/groq_/GroqService.py +0 -0
  117. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/groq_/__init__.py +0 -0
  118. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/groq_/api_endpoints/__init__.py +0 -0
  119. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/groq_/api_endpoints/data_models.py +0 -0
  120. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/groq_/api_endpoints/groq_request.py +0 -0
  121. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/groq_/api_endpoints/match_response.py +0 -0
  122. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/groq_/api_endpoints/response_utils.py +0 -0
  123. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/groq_/groq_max_output_token_data.yaml +0 -0
  124. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/groq_/groq_price_data.yaml +0 -0
  125. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/groq_/groq_rate_limits.yaml +0 -0
  126. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/groq_/version.py +0 -0
  127. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/litellm_/__init__.py +0 -0
  128. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/litellm_/imodel.py +0 -0
  129. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/ollama_/OllamaModel.py +0 -0
  130. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/ollama_/OllamaService.py +0 -0
  131. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/ollama_/__init__.py +0 -0
  132. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/ollama_/api_endpoints/__init__.py +0 -0
  133. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/ollama_/api_endpoints/api_request.py +0 -0
  134. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/ollama_/api_endpoints/chat_completion/__init__.py +0 -0
  135. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/ollama_/api_endpoints/chat_completion/message_models.py +0 -0
  136. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/ollama_/api_endpoints/chat_completion/request_body.py +0 -0
  137. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/ollama_/api_endpoints/chat_completion/response_body.py +0 -0
  138. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/ollama_/api_endpoints/chat_completion/tool_models.py +0 -0
  139. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/ollama_/api_endpoints/completion/__init__.py +0 -0
  140. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/ollama_/api_endpoints/completion/request_body.py +0 -0
  141. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/ollama_/api_endpoints/completion/response_body.py +0 -0
  142. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/ollama_/api_endpoints/data_models.py +0 -0
  143. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/ollama_/api_endpoints/embedding/__init__.py +0 -0
  144. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/ollama_/api_endpoints/embedding/request_body.py +0 -0
  145. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/ollama_/api_endpoints/embedding/response_body.py +0 -0
  146. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/ollama_/api_endpoints/match_data_model.py +0 -0
  147. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/ollama_/api_endpoints/match_response.py +0 -0
  148. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/ollama_/api_endpoints/model/__init__.py +0 -0
  149. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/ollama_/api_endpoints/model/copy_model.py +0 -0
  150. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/ollama_/api_endpoints/model/create_model.py +0 -0
  151. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/ollama_/api_endpoints/model/delete_model.py +0 -0
  152. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/ollama_/api_endpoints/model/list_model.py +0 -0
  153. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/ollama_/api_endpoints/model/pull_model.py +0 -0
  154. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/ollama_/api_endpoints/model/push_model.py +0 -0
  155. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/ollama_/api_endpoints/model/show_model.py +0 -0
  156. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/ollama_/api_endpoints/option_models.py +0 -0
  157. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/openai_/OpenAIModel.py +0 -0
  158. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/openai_/OpenAIService.py +0 -0
  159. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/openai_/__init__.py +0 -0
  160. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/openai_/api_endpoints/__init__.py +0 -0
  161. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/openai_/api_endpoints/api_request.py +0 -0
  162. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/openai_/api_endpoints/audio/__init__.py +0 -0
  163. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/openai_/api_endpoints/audio/speech_models.py +0 -0
  164. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/openai_/api_endpoints/audio/transcription_models.py +0 -0
  165. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/openai_/api_endpoints/audio/translation_models.py +0 -0
  166. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/openai_/api_endpoints/audio/types.py +0 -0
  167. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/openai_/api_endpoints/batch/__init__.py +0 -0
  168. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/openai_/api_endpoints/batch/batch_models.py +0 -0
  169. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/openai_/api_endpoints/batch/cancel_batch.py +0 -0
  170. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/openai_/api_endpoints/batch/create_batch.py +0 -0
  171. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/openai_/api_endpoints/batch/list_batch.py +0 -0
  172. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/openai_/api_endpoints/batch/request_object_models.py +0 -0
  173. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/openai_/api_endpoints/batch/retrieve_batch.py +0 -0
  174. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/openai_/api_endpoints/batch/types.py +0 -0
  175. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/openai_/api_endpoints/chat_completions/__init__.py +0 -0
  176. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/openai_/api_endpoints/chat_completions/request/__init__.py +0 -0
  177. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/openai_/api_endpoints/chat_completions/request/message_models.py +0 -0
  178. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/openai_/api_endpoints/chat_completions/request/request_body.py +0 -0
  179. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/openai_/api_endpoints/chat_completions/request/response_format.py +0 -0
  180. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/openai_/api_endpoints/chat_completions/request/stream_options.py +0 -0
  181. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/openai_/api_endpoints/chat_completions/request/tool_choice_models.py +0 -0
  182. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/openai_/api_endpoints/chat_completions/request/tool_models.py +0 -0
  183. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/openai_/api_endpoints/chat_completions/request/types.py +0 -0
  184. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/openai_/api_endpoints/chat_completions/response/__init__.py +0 -0
  185. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/openai_/api_endpoints/chat_completions/response/choice_models.py +0 -0
  186. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/openai_/api_endpoints/chat_completions/response/function_models.py +0 -0
  187. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/openai_/api_endpoints/chat_completions/response/log_prob_models.py +0 -0
  188. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/openai_/api_endpoints/chat_completions/response/message_models.py +0 -0
  189. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/openai_/api_endpoints/chat_completions/response/response_body.py +0 -0
  190. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/openai_/api_endpoints/chat_completions/response/types.py +0 -0
  191. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/openai_/api_endpoints/chat_completions/response/usage_models.py +0 -0
  192. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/openai_/api_endpoints/chat_completions/util.py +0 -0
  193. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/openai_/api_endpoints/data_models.py +0 -0
  194. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/openai_/api_endpoints/embeddings/__init__.py +0 -0
  195. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/openai_/api_endpoints/embeddings/request_body.py +0 -0
  196. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/openai_/api_endpoints/embeddings/response_body.py +0 -0
  197. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/openai_/api_endpoints/files/__init__.py +0 -0
  198. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/openai_/api_endpoints/files/delete_file.py +0 -0
  199. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/openai_/api_endpoints/files/file_models.py +0 -0
  200. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/openai_/api_endpoints/files/list_files.py +0 -0
  201. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/openai_/api_endpoints/files/retrieve_file.py +0 -0
  202. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/openai_/api_endpoints/files/upload_file.py +0 -0
  203. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/openai_/api_endpoints/fine_tuning/__init__.py +0 -0
  204. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/openai_/api_endpoints/fine_tuning/cancel_jobs.py +0 -0
  205. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/openai_/api_endpoints/fine_tuning/create_jobs.py +0 -0
  206. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/openai_/api_endpoints/fine_tuning/fine_tuning_job_checkpoint_models.py +0 -0
  207. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/openai_/api_endpoints/fine_tuning/fine_tuning_job_event_models.py +0 -0
  208. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/openai_/api_endpoints/fine_tuning/fine_tuning_job_models.py +0 -0
  209. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/openai_/api_endpoints/fine_tuning/list_fine_tuning_checkpoints.py +0 -0
  210. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/openai_/api_endpoints/fine_tuning/list_fine_tuning_events.py +0 -0
  211. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/openai_/api_endpoints/fine_tuning/list_fine_tuning_jobs.py +0 -0
  212. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/openai_/api_endpoints/fine_tuning/retrieve_jobs.py +0 -0
  213. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/openai_/api_endpoints/fine_tuning/training_format.py +0 -0
  214. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/openai_/api_endpoints/images/__init__.py +0 -0
  215. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/openai_/api_endpoints/images/image_edit_models.py +0 -0
  216. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/openai_/api_endpoints/images/image_models.py +0 -0
  217. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/openai_/api_endpoints/images/image_variation_models.py +0 -0
  218. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/openai_/api_endpoints/images/response_body.py +0 -0
  219. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/openai_/api_endpoints/match_data_model.py +0 -0
  220. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/openai_/api_endpoints/match_response.py +0 -0
  221. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/openai_/api_endpoints/models/__init__.py +0 -0
  222. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/openai_/api_endpoints/models/delete_fine_tuned_model.py +0 -0
  223. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/openai_/api_endpoints/models/models_models.py +0 -0
  224. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/openai_/api_endpoints/models/retrieve_model.py +0 -0
  225. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/openai_/api_endpoints/moderations/__init__.py +0 -0
  226. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/openai_/api_endpoints/moderations/request_body.py +0 -0
  227. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/openai_/api_endpoints/moderations/response_body.py +0 -0
  228. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/openai_/api_endpoints/uploads/__init__.py +0 -0
  229. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/openai_/api_endpoints/uploads/add_upload_part.py +0 -0
  230. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/openai_/api_endpoints/uploads/cancel_upload.py +0 -0
  231. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/openai_/api_endpoints/uploads/complete_upload.py +0 -0
  232. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/openai_/api_endpoints/uploads/create_upload.py +0 -0
  233. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/openai_/api_endpoints/uploads/uploads_models.py +0 -0
  234. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/openai_/image_token_calculator/__init__.py +0 -0
  235. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/openai_/image_token_calculator/image_token_calculator.py +0 -0
  236. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/openai_/image_token_calculator/openai_image_token_data.yaml +0 -0
  237. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/openai_/openai_max_output_token_data.yaml +0 -0
  238. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/openai_/openai_price_data.yaml +0 -0
  239. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/openai_/version.py +0 -0
  240. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/pandas_/__init__.py +0 -0
  241. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/pandas_/extend_df.py +0 -0
  242. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/pandas_/read.py +0 -0
  243. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/pandas_/remove_rows.py +0 -0
  244. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/pandas_/replace_keywords.py +0 -0
  245. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/pandas_/save.py +0 -0
  246. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/pandas_/search_keywords.py +0 -0
  247. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/pandas_/to_df.py +0 -0
  248. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/pandas_/update_cells.py +0 -0
  249. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/perplexity_/PerplexityModel.py +0 -0
  250. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/perplexity_/PerplexityService.py +0 -0
  251. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/perplexity_/__init__.py +0 -0
  252. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/perplexity_/api_endpoints/__init__.py +0 -0
  253. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/perplexity_/api_endpoints/api_request.py +0 -0
  254. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/perplexity_/api_endpoints/chat_completions/__init__.py +0 -0
  255. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/perplexity_/api_endpoints/chat_completions/request/__init__.py +0 -0
  256. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/perplexity_/api_endpoints/chat_completions/request/request_body.py +0 -0
  257. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/perplexity_/api_endpoints/chat_completions/response/__init__.py +0 -0
  258. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/perplexity_/api_endpoints/chat_completions/response/response_body.py +0 -0
  259. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/perplexity_/api_endpoints/data_models.py +0 -0
  260. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/perplexity_/api_endpoints/match_response.py +0 -0
  261. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/perplexity_/perplexity_max_output_token_data.yaml +0 -0
  262. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/perplexity_/perplexity_price_data.yaml +0 -0
  263. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/perplexity_/version.py +0 -0
  264. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/pydantic_/__init__.py +0 -0
  265. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/pydantic_/break_down_annotation.py +0 -0
  266. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/integrations/pydantic_/new_model.py +0 -0
  267. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/libs/__init__.py +0 -0
  268. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/libs/compress/__init__.py +0 -0
  269. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/libs/compress/models.py +0 -0
  270. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/libs/compress/utils.py +0 -0
  271. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/libs/constants.py +0 -0
  272. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/libs/file/__init__.py +0 -0
  273. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/libs/file/chunk.py +0 -0
  274. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/libs/file/file_ops.py +0 -0
  275. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/libs/file/params.py +0 -0
  276. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/libs/file/path.py +0 -0
  277. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/libs/file/process.py +0 -0
  278. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/libs/file/save.py +0 -0
  279. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/libs/file/types.py +0 -0
  280. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/libs/func/__init__.py +0 -0
  281. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/libs/func/async_calls/__init__.py +0 -0
  282. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/libs/func/async_calls/bcall.py +0 -0
  283. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/libs/func/async_calls/mcall.py +0 -0
  284. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/libs/func/async_calls/pcall.py +0 -0
  285. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/libs/func/async_calls/rcall.py +0 -0
  286. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/libs/func/async_calls/tcall.py +0 -0
  287. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/libs/func/async_calls/ucall.py +0 -0
  288. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/libs/func/decorators.py +0 -0
  289. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/libs/func/lcall.py +0 -0
  290. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/libs/func/params.py +0 -0
  291. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/libs/func/throttle.py +0 -0
  292. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/libs/func/types.py +0 -0
  293. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/libs/func/utils.py +0 -0
  294. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/libs/package/__init__.py +0 -0
  295. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/libs/package/imports.py +0 -0
  296. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/libs/package/management.py +0 -0
  297. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/libs/package/params.py +0 -0
  298. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/libs/package/system.py +0 -0
  299. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/libs/package/types.py +0 -0
  300. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/libs/parse/__init__.py +0 -0
  301. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/libs/parse/flatten/__init__.py +0 -0
  302. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/libs/parse/flatten/flatten.py +0 -0
  303. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/libs/parse/flatten/params.py +0 -0
  304. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/libs/parse/flatten/unflatten.py +0 -0
  305. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/libs/parse/json/__init__.py +0 -0
  306. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/libs/parse/json/as_readable.py +0 -0
  307. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/libs/parse/json/extract.py +0 -0
  308. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/libs/parse/json/parse.py +0 -0
  309. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/libs/parse/json/schema.py +0 -0
  310. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/libs/parse/json/to_json.py +0 -0
  311. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/libs/parse/nested/__init__.py +0 -0
  312. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/libs/parse/nested/nfilter.py +0 -0
  313. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/libs/parse/nested/nget.py +0 -0
  314. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/libs/parse/nested/ninsert.py +0 -0
  315. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/libs/parse/nested/nmerge.py +0 -0
  316. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/libs/parse/nested/npop.py +0 -0
  317. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/libs/parse/nested/nset.py +0 -0
  318. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/libs/parse/nested/to_flat_list.py +0 -0
  319. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/libs/parse/nested/utils.py +0 -0
  320. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/libs/parse/params.py +0 -0
  321. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/libs/parse/string_parse/__init__.py +0 -0
  322. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/libs/parse/string_parse/code_block.py +0 -0
  323. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/libs/parse/string_parse/docstring.py +0 -0
  324. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/libs/parse/string_parse/function_.py +0 -0
  325. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/libs/parse/type_convert/__init__.py +0 -0
  326. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/libs/parse/type_convert/params.py +0 -0
  327. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/libs/parse/type_convert/to_dict.py +0 -0
  328. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/libs/parse/type_convert/to_list.py +0 -0
  329. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/libs/parse/type_convert/to_num.py +0 -0
  330. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/libs/parse/type_convert/to_str.py +0 -0
  331. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/libs/parse/types.py +0 -0
  332. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/libs/parse/validate/__init__.py +0 -0
  333. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/libs/parse/validate/boolean.py +0 -0
  334. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/libs/parse/validate/keys.py +0 -0
  335. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/libs/parse/validate/mapping.py +0 -0
  336. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/libs/parse/validate/params.py +0 -0
  337. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/libs/parse/xml/__init__.py +0 -0
  338. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/libs/parse/xml/convert.py +0 -0
  339. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/libs/parse/xml/parser.py +0 -0
  340. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/libs/string_similarity/__init__.py +0 -0
  341. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/libs/string_similarity/algorithms.py +0 -0
  342. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/libs/string_similarity/matcher.py +0 -0
  343. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/libs/string_similarity/utils.py +0 -0
  344. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/libs/utils.py +0 -0
  345. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/operations/__init__.py +0 -0
  346. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/operations/brainstorm/__init__.py +0 -0
  347. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/operations/plan/__init__.py +0 -0
  348. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/operations/select/__init__.py +0 -0
  349. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/operations/select/prompt.py +0 -0
  350. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/operations/select/select.py +0 -0
  351. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/operations/select/utils.py +0 -0
  352. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/operations/utils.py +0 -0
  353. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/protocols/__init__.py +0 -0
  354. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/protocols/adapters/__init__.py +0 -0
  355. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/protocols/adapters/adapter.py +0 -0
  356. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/protocols/adapters/json_adapter.py +0 -0
  357. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/protocols/adapters/pandas_adapter.py +0 -0
  358. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/protocols/configs/__init__.py +0 -0
  359. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/protocols/configs/branch_config.py +0 -0
  360. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/protocols/configs/id_config.py +0 -0
  361. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/protocols/configs/imodel_config.py +0 -0
  362. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/protocols/configs/log_config.py +0 -0
  363. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/protocols/configs/retry_config.py +0 -0
  364. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/protocols/configs/types.py +0 -0
  365. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/protocols/operatives/__init__.py +0 -0
  366. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/protocols/operatives/action.py +0 -0
  367. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/protocols/operatives/operative.py +0 -0
  368. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/protocols/operatives/reason.py +0 -0
  369. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/protocols/operatives/step.py +0 -0
  370. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/protocols/operatives/types.py +0 -0
  371. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/protocols/registries/__init__.py +0 -0
  372. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/protocols/registries/_component_registry.py +0 -0
  373. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/protocols/registries/_pile_registry.py +0 -0
  374. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/service/__init__.py +0 -0
  375. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/service/complete_request_info.py +0 -0
  376. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/service/imodel.py +0 -0
  377. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/service/rate_limiter.py +0 -0
  378. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/service/service.py +0 -0
  379. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/service/service_match_util.py +0 -0
  380. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/service/service_util.py +0 -0
  381. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/service/token_calculator.py +0 -0
  382. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/settings.py +0 -0
  383. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/strategies/__init__.py +0 -0
  384. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/strategies/base.py +0 -0
  385. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/strategies/concurrent.py +0 -0
  386. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/strategies/concurrent_chunk.py +0 -0
  387. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/strategies/concurrent_sequential_chunk.py +0 -0
  388. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/strategies/params.py +0 -0
  389. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/strategies/sequential.py +0 -0
  390. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/strategies/sequential_chunk.py +0 -0
  391. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/strategies/sequential_concurrent_chunk.py +0 -0
  392. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/strategies/types.py +0 -0
  393. {lionagi-0.5.2 → lionagi-0.5.4}/lionagi/strategies/utils.py +0 -0
@@ -3,4 +3,4 @@
3
3
  # OPENAI_API_KEY=
4
4
  # ANTHROPIC_API_KEY=
5
5
  # PERPLEXITY_API_KEY=
6
- # GROK_API_KEY=
6
+ # GROQ_API_KEY=
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: lionagi
3
- Version: 0.5.2
3
+ Version: 0.5.4
4
4
  Summary: An AGentic Intelligence Operating System.
5
5
  Author-email: HaiyangLi <quantocean.li@gmail.com>
6
6
  License: Apache License
@@ -336,7 +336,7 @@ pplx_small = iModel(
336
336
  b = await hunter.communicate(
337
337
  instruction="What makes a well-behaved dragon?",
338
338
  clear_messages=True, # refresh the conversation
339
- imodel=pplx_small, # use sonnet model
339
+ imodel=pplx_small, # use perplexity model
340
340
  )
341
341
 
342
342
  print(b)
@@ -107,7 +107,7 @@ pplx_small = iModel(
107
107
  b = await hunter.communicate(
108
108
  instruction="What makes a well-behaved dragon?",
109
109
  clear_messages=True, # refresh the conversation
110
- imodel=pplx_small, # use sonnet model
110
+ imodel=pplx_small, # use perplexity model
111
111
  )
112
112
 
113
113
  print(b)
@@ -4,7 +4,8 @@ import logging
4
4
 
5
5
  from dotenv import load_dotenv
6
6
 
7
- from .core.session.types import Branch
7
+ from .core.session.types import Branch, Session
8
+ from .integrations.litellm_.imodel import LiteiModel
8
9
  from .protocols.operatives.step import Step
9
10
  from .service import iModel
10
11
  from .settings import Settings
@@ -20,6 +21,8 @@ __all__ = [
20
21
  "LiteiModel",
21
22
  "Branch",
22
23
  "Step",
24
+ "Session",
25
+ "LiteiModel",
23
26
  ]
24
27
 
25
28
  logger = logging.getLogger(__name__)
@@ -9,6 +9,7 @@ from pydantic import model_validator
9
9
 
10
10
  from lionagi.core.generic.types import Component, LogManager, Pile, Progression
11
11
  from lionagi.core.typing import ID
12
+ from lionagi.integrations.litellm_.imodel import LiteiModel
12
13
  from lionagi.protocols.operatives.instruct import Instruct, OperationInstruct
13
14
  from lionagi.service import iModel
14
15
  from lionagi.settings import Settings
@@ -24,8 +25,8 @@ class Branch(Component, BranchActionMixin, BranchOperationMixin):
24
25
  name: str | None = None
25
26
  msgs: MessageManager = None
26
27
  acts: ActionManager = None
27
- imodel: iModel | None = None
28
- parse_imodel: iModel | None = None
28
+ imodel: iModel | LiteiModel | None = None
29
+ parse_imodel: iModel | LiteiModel | None = None
29
30
 
30
31
  @model_validator(mode="before")
31
32
  def _validate_data(cls, data: dict) -> dict:
@@ -128,9 +128,9 @@ class Session(Component):
128
128
  branch: The branch to set as default or its identifier.
129
129
  """
130
130
  branch = self.branches[branch]
131
- if branch and len(branch) == 1:
132
- self.default_branch = branch
133
- raise ValueError("Session can only have one default branch.")
131
+ if not isinstance(branch, Branch):
132
+ raise ValueError("Input value for branch is not a valid branch.")
133
+ self.default_branch = branch
134
134
 
135
135
  def to_df(self, branches: ID.RefSeq = None) -> pd.DataFrame:
136
136
  out = self.concat_messages(branches=branches)
@@ -148,6 +148,13 @@ async def alcall(
148
148
  ucall(func, i, **kwargs), retry_timeout
149
149
  )
150
150
  return index, result
151
+
152
+ except InterruptedError:
153
+ return index, None
154
+
155
+ except asyncio.CancelledError:
156
+ return index, None
157
+
151
158
  except TimeoutError as e:
152
159
  raise TimeoutError(
153
160
  f"{error_msg or ''} Timeout {retry_timeout} seconds "
@@ -0,0 +1,429 @@
1
+ # Copyright (c) 2023 - 2024, HaiyangLi <quantocean.li at gmail dot com>
2
+ #
3
+ # SPDX-License-Identifier: Apache-2.0
4
+
5
+ import logging
6
+ from typing import Literal
7
+
8
+ from lionagi.core.session.branch import Branch
9
+ from lionagi.core.session.session import Session
10
+ from lionagi.core.typing import ID, Any, BaseModel
11
+ from lionagi.libs.func.types import alcall
12
+ from lionagi.libs.parse import to_flat_list
13
+ from lionagi.protocols.operatives.instruct import (
14
+ INSTRUCT_FIELD_MODEL,
15
+ Instruct,
16
+ InstructResponse,
17
+ )
18
+
19
+ from ..utils import prepare_instruct, prepare_session
20
+ from .prompt import PROMPT
21
+
22
+ # ---------------------------------------------------------------------
23
+ # Data Models & Utilities
24
+ # ---------------------------------------------------------------------
25
+
26
+
27
+ class BrainstormOperation(BaseModel):
28
+ """
29
+ Container for the outcomes of a brainstorming session:
30
+ 1. initial: the initial result of the 'brainstorm' prompt
31
+ 2. brainstorm: the results of auto-run instructions (if auto_run = True)
32
+ 3. explore: the results of exploring those instructions (if auto_explore = True)
33
+ """
34
+
35
+ initial: Any
36
+ brainstorm: list[Instruct] | None = None
37
+ explore: list[InstructResponse] | None = None
38
+
39
+
40
+ def chunked(iterable, n):
41
+ """
42
+ Yield successive n-sized chunks from an iterable.
43
+
44
+ Example:
45
+ >>> list(chunked([1,2,3,4,5], 2))
46
+ [[1,2],[3,4],[5]]
47
+ """
48
+ for i in range(0, len(iterable), n):
49
+ yield iterable[i : i + n]
50
+
51
+
52
+ # ---------------------------------------------------------------------
53
+ # Core Instruction Execution
54
+ # ---------------------------------------------------------------------
55
+
56
+
57
+ async def run_instruct(
58
+ ins: Instruct,
59
+ session: Session,
60
+ branch: Branch,
61
+ auto_run: bool,
62
+ verbose: bool = True,
63
+ **kwargs: Any,
64
+ ) -> Any:
65
+ """
66
+ Execute a single instruction within a brainstorming session.
67
+ Optionally auto-run any child instructions that result.
68
+ """
69
+
70
+ async def _run_child_instruction(child_ins: Instruct):
71
+ """
72
+ Helper for recursively running child instructions.
73
+ """
74
+ if verbose:
75
+ snippet = (
76
+ child_ins.guidance[:100] + "..."
77
+ if len(child_ins.guidance) > 100
78
+ else child_ins.guidance
79
+ )
80
+ print(f"\n-----Running instruction-----\n{snippet}")
81
+ child_branch = session.split(branch)
82
+ return await run_instruct(
83
+ child_ins, session, child_branch, False, verbose=verbose, **kwargs
84
+ )
85
+
86
+ # Prepare config for the branch operation
87
+ config = {**ins.model_dump(), **kwargs}
88
+ result = await branch.operate(**config)
89
+ branch.msgs.logger.dump()
90
+
91
+ # Extract any newly generated instructions
92
+ instructs = []
93
+ if hasattr(result, "instruct_models"):
94
+ instructs = result.instruct_models
95
+
96
+ # If we're allowed to auto-run child instructions, handle them
97
+ if auto_run and instructs:
98
+ child_results = await alcall(instructs, _run_child_instruction)
99
+ combined = []
100
+ for c in child_results:
101
+ if isinstance(c, list):
102
+ combined.extend(c)
103
+ else:
104
+ combined.append(c)
105
+ combined.insert(0, result)
106
+ return combined
107
+
108
+ return result
109
+
110
+
111
+ async def brainstorm(
112
+ instruct: Instruct | dict[str, Any],
113
+ num_instruct: int = 2,
114
+ session: Session | None = None,
115
+ branch: Branch | ID.Ref | None = None,
116
+ auto_run: bool = True,
117
+ auto_explore: bool = False,
118
+ explore_kwargs: dict[str, Any] | None = None,
119
+ explore_strategy: Literal[
120
+ "concurrent",
121
+ "sequential",
122
+ "sequential_concurrent_chunk",
123
+ "concurrent_sequential_chunk",
124
+ ] = "concurrent",
125
+ branch_kwargs: dict[str, Any] | None = None,
126
+ return_session: bool = False,
127
+ verbose: bool = False,
128
+ branch_as_default: bool = True,
129
+ **kwargs: Any,
130
+ ) -> Any:
131
+ """
132
+ High-level function to perform a brainstorming session.
133
+
134
+ Steps:
135
+ 1. Run the initial 'instruct' prompt to generate suggestions.
136
+ 2. Optionally auto-run those suggestions (auto_run=True).
137
+ 3. Optionally explore the resulting instructions (auto_explore=True)
138
+ using the chosen strategy (concurrent, sequential, etc.).
139
+ """
140
+
141
+ # -----------------------------------------------------------------
142
+ # Basic Validations and Setup
143
+ # -----------------------------------------------------------------
144
+ if auto_explore and not auto_run:
145
+ raise ValueError("auto_explore requires auto_run to be True.")
146
+
147
+ if verbose:
148
+ print("Starting brainstorming...")
149
+
150
+ # Make sure the correct field model is present
151
+ field_models: list = kwargs.get("field_models", [])
152
+ if INSTRUCT_FIELD_MODEL not in field_models:
153
+ field_models.append(INSTRUCT_FIELD_MODEL)
154
+ kwargs["field_models"] = field_models
155
+
156
+ # Prepare session, branch, and the instruction
157
+ session, branch = prepare_session(session, branch, branch_kwargs)
158
+ prompt_str = PROMPT.format(num_instruct=num_instruct)
159
+ instruct = prepare_instruct(instruct, prompt_str)
160
+
161
+ # -----------------------------------------------------------------
162
+ # 1. Initial Brainstorm
163
+ # -----------------------------------------------------------------
164
+ res1 = await branch.operate(**instruct, **kwargs)
165
+ out = BrainstormOperation(initial=res1)
166
+
167
+ if verbose:
168
+ print("Initial brainstorming complete.")
169
+
170
+ # Helper to run single instructions from the 'brainstorm'
171
+ async def run_brainstorm_instruction(ins_):
172
+ if verbose:
173
+ snippet = (
174
+ ins_.guidance[:100] + "..."
175
+ if len(ins_.guidance) > 100
176
+ else ins_.guidance
177
+ )
178
+ print(f"\n-----Running instruction-----\n{snippet}")
179
+ new_branch = session.split(branch)
180
+ return await run_instruct(
181
+ ins_, session, new_branch, auto_run, verbose=verbose, **kwargs
182
+ )
183
+
184
+ # -----------------------------------------------------------------
185
+ # 2. Auto-run child instructions if requested
186
+ # -----------------------------------------------------------------
187
+ if not auto_run:
188
+ if return_session:
189
+ return out, session
190
+ return out
191
+
192
+ # We run inside the context manager for branching
193
+ async with session.branches:
194
+ response_ = []
195
+
196
+ # If the initial result has instructions, run them
197
+ if hasattr(res1, "instruct_models"):
198
+ instructs: list[Instruct] = res1.instruct_models
199
+ brainstorm_results = await alcall(
200
+ instructs, run_brainstorm_instruction
201
+ )
202
+ brainstorm_results = to_flat_list(brainstorm_results, dropna=True)
203
+
204
+ # Filter out plain str/dict responses, keep model-based
205
+ filtered = [
206
+ r if not isinstance(r, (str, dict)) else None
207
+ for r in brainstorm_results
208
+ ]
209
+ filtered = to_flat_list(filtered, unique=True, dropna=True)
210
+
211
+ out.brainstorm = (
212
+ filtered if isinstance(filtered, list) else [filtered]
213
+ )
214
+ # Insert the initial result at index 0 for reference
215
+ filtered.insert(0, res1)
216
+ response_ = filtered
217
+
218
+ # -----------------------------------------------------------------
219
+ # 3. Explore the results (if auto_explore = True)
220
+ # -----------------------------------------------------------------
221
+ if response_ and auto_explore:
222
+ # Gather all newly generated instructions
223
+ all_explore_instructs = to_flat_list(
224
+ [
225
+ r.instruct_models
226
+ for r in response_
227
+ if hasattr(r, "instruct_models")
228
+ ],
229
+ dropna=True,
230
+ unique=True,
231
+ )
232
+
233
+ # Decide how to explore based on the strategy
234
+ match explore_strategy:
235
+ # ---------------------------------------------------------
236
+ # Strategy A: CONCURRENT
237
+ # ---------------------------------------------------------
238
+ case "concurrent":
239
+
240
+ async def explore_concurrently(ins_: Instruct):
241
+ if verbose:
242
+ snippet = (
243
+ ins_.guidance[:100] + "..."
244
+ if len(ins_.guidance) > 100
245
+ else ins_.guidance
246
+ )
247
+ print(f"\n-----Exploring Idea-----\n{snippet}")
248
+ new_branch = session.split(branch)
249
+ resp = await new_branch.instruct(
250
+ ins_, **(explore_kwargs or {})
251
+ )
252
+ return InstructResponse(instruct=ins_, response=resp)
253
+
254
+ res_explore = await alcall(
255
+ all_explore_instructs, explore_concurrently
256
+ )
257
+ out.explore = res_explore
258
+
259
+ # Add messages for logging / auditing
260
+ branch.msgs.add_message(
261
+ instruction="\n".join(
262
+ i.model_dump_json() for i in all_explore_instructs
263
+ )
264
+ )
265
+ branch.msgs.add_message(
266
+ assistant_response="\n".join(
267
+ i.model_dump_json() for i in res_explore
268
+ )
269
+ )
270
+
271
+ # ---------------------------------------------------------
272
+ # Strategy B: SEQUENTIAL
273
+ # ---------------------------------------------------------
274
+ case "sequential":
275
+ explore_results = []
276
+
277
+ # Warn/log if a large number of instructions
278
+ if len(all_explore_instructs) > 30:
279
+ all_explore_instructs = all_explore_instructs[:30]
280
+ logging.warning(
281
+ "Maximum number of instructions for sequential exploration is 50. defaulting to 50."
282
+ )
283
+ if len(all_explore_instructs) > 10:
284
+ logging.warning(
285
+ "Large number of instructions for sequential exploration. This may take a while."
286
+ )
287
+
288
+ for i in all_explore_instructs:
289
+ if verbose:
290
+ snippet = (
291
+ i.guidance[:100] + "..."
292
+ if len(i.guidance) > 100
293
+ else i.guidance
294
+ )
295
+ print(f"\n-----Exploring Idea-----\n{snippet}")
296
+ seq_res = await branch.instruct(
297
+ i, **(explore_kwargs or {})
298
+ )
299
+ explore_results.append(
300
+ InstructResponse(instruct=i, response=seq_res)
301
+ )
302
+
303
+ out.explore = explore_results
304
+
305
+ # ---------------------------------------------------------
306
+ # Strategy C: SEQUENTIAL_CONCURRENT_CHUNK
307
+ # (chunks processed sequentially, each chunk in parallel)
308
+ # ---------------------------------------------------------
309
+ case "sequential_concurrent_chunk":
310
+ chunk_size = (explore_kwargs or {}).get("chunk_size", 5)
311
+ all_responses = []
312
+
313
+ async def explore_concurrent_chunk(
314
+ sub_instructs: list[Instruct], base_branch: Branch
315
+ ):
316
+ """
317
+ Explore instructions in a single chunk concurrently.
318
+ """
319
+ if verbose:
320
+ print(
321
+ f"\n--- Exploring a chunk of size {len(sub_instructs)} ---\n"
322
+ )
323
+
324
+ async def _explore(ins_: Instruct):
325
+ child_branch = session.split(base_branch)
326
+ child_resp = await child_branch.instruct(
327
+ ins_, **(explore_kwargs or {})
328
+ )
329
+ return InstructResponse(
330
+ instruct=ins_, response=child_resp
331
+ )
332
+
333
+ # Run all instructions in the chunk concurrently
334
+ res_chunk = await alcall(sub_instructs, _explore)
335
+
336
+ # Log messages for debugging / auditing
337
+ next_branch = session.split(base_branch)
338
+ next_branch.msgs.add_message(
339
+ instruction="\n".join(
340
+ i.model_dump_json() for i in sub_instructs
341
+ )
342
+ )
343
+ next_branch.msgs.add_message(
344
+ assistant_response="\n".join(
345
+ i.model_dump_json() for i in res_chunk
346
+ )
347
+ )
348
+ return res_chunk, next_branch
349
+
350
+ # Process each chunk sequentially
351
+ for chunk in chunked(all_explore_instructs, chunk_size):
352
+ chunk_result, branch = await explore_concurrent_chunk(
353
+ chunk, branch
354
+ )
355
+ all_responses.extend(chunk_result)
356
+
357
+ out.explore = all_responses
358
+
359
+ # ---------------------------------------------------------
360
+ # Strategy D: CONCURRENT_SEQUENTIAL_CHUNK
361
+ # (all chunks processed concurrently, each chunk sequentially)
362
+ # ---------------------------------------------------------
363
+ case "concurrent_sequential_chunk":
364
+ chunk_size = (explore_kwargs or {}).get("chunk_size", 5)
365
+ all_chunks = list(
366
+ chunked(all_explore_instructs, chunk_size)
367
+ )
368
+
369
+ async def explore_chunk_sequentially(
370
+ sub_instructs: list[Instruct],
371
+ ):
372
+ """
373
+ Explore instructions in a single chunk, one at a time.
374
+ """
375
+ chunk_results = []
376
+ local_branch = session.split(branch)
377
+
378
+ for ins_ in sub_instructs:
379
+ if verbose:
380
+ snippet = (
381
+ ins_.guidance[:100] + "..."
382
+ if len(ins_.guidance) > 100
383
+ else ins_.guidance
384
+ )
385
+ print(
386
+ f"\n-----Exploring Idea (sequential in chunk)-----\n{snippet}"
387
+ )
388
+
389
+ seq_resp = await local_branch.instruct(
390
+ ins_, **(explore_kwargs or {})
391
+ )
392
+ chunk_results.append(
393
+ InstructResponse(
394
+ instruct=ins_, response=seq_resp
395
+ )
396
+ )
397
+
398
+ return chunk_results
399
+
400
+ # Run all chunks in parallel
401
+ all_responses = await alcall(
402
+ all_chunks,
403
+ explore_chunk_sequentially,
404
+ flatten=True,
405
+ dropna=True,
406
+ )
407
+ out.explore = all_responses
408
+
409
+ # Log final messages
410
+ branch.msgs.add_message(
411
+ instruction="\n".join(
412
+ i.model_dump_json() for i in all_explore_instructs
413
+ )
414
+ )
415
+ branch.msgs.add_message(
416
+ assistant_response="\n".join(
417
+ i.model_dump_json() for i in all_responses
418
+ )
419
+ )
420
+
421
+ if branch_as_default:
422
+ session.change_default_branch(branch)
423
+
424
+ # -----------------------------------------------------------------
425
+ # 4. Return Results
426
+ # -----------------------------------------------------------------
427
+ if return_session:
428
+ return out, session
429
+ return out
@@ -0,0 +1,8 @@
1
+ PROMPT = """Perform a brainstorm session. Generate {num_instruct} concise and distinct instructions (Instruct), each representing a potential next step. We will run them in parallel under the same context. Ensure each idea:
2
+
3
+ 1. Adheres to project guidelines and standards.
4
+ 2. Maintains a unique perspective or approach.
5
+ 3. Remains succinct yet sufficiently detailed.
6
+ 4. Flags any step that needs deeper expansion.
7
+
8
+ Aim for clarity, practicality, and adherence to the project's core principles."""