lionagi 0.5.1__tar.gz → 0.5.3__tar.gz

Sign up to get free protection for your applications and to get access to all the features.
Files changed (397) hide show
  1. {lionagi-0.5.1 → lionagi-0.5.3}/PKG-INFO +5 -3
  2. {lionagi-0.5.1 → lionagi-0.5.3}/README.md +1 -1
  3. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/__init__.py +3 -1
  4. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/core/action/tool.py +3 -5
  5. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/core/communication/action_request.py +3 -3
  6. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/core/communication/message.py +3 -3
  7. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/core/communication/utils.py +3 -3
  8. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/core/generic/component.py +4 -4
  9. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/core/generic/element.py +51 -47
  10. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/core/generic/graph.py +1 -1
  11. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/core/generic/log.py +2 -2
  12. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/core/generic/pile.py +10 -11
  13. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/core/generic/progression.py +19 -12
  14. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/core/generic/utils.py +6 -3
  15. lionagi-0.5.3/lionagi/core/models/base.py +28 -0
  16. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/core/models/field_model.py +42 -19
  17. lionagi-0.5.1/lionagi/core/models/new_model_params.py → lionagi-0.5.3/lionagi/core/models/model_params.py +5 -6
  18. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/core/models/note.py +2 -2
  19. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/core/models/operable_model.py +8 -4
  20. lionagi-0.5.3/lionagi/core/models/schema_model.py +28 -0
  21. lionagi-0.5.3/lionagi/core/models/types.py +19 -0
  22. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/core/session/branch.py +8 -4
  23. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/core/session/branch_mixins.py +11 -12
  24. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/core/session/session.py +1 -2
  25. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/core/typing/__init__.py +4 -4
  26. lionagi-0.5.1/lionagi/core/typing/concepts.py → lionagi-0.5.3/lionagi/core/typing/_concepts.py +43 -2
  27. lionagi-0.5.3/lionagi/core/typing/_id.py +104 -0
  28. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/anthropic_/AnthropicModel.py +8 -3
  29. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/groq_/GroqModel.py +11 -4
  30. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/litellm_/imodel.py +6 -8
  31. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/openai_/OpenAIModel.py +8 -3
  32. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/openai_/image_token_calculator/image_token_calculator.py +14 -8
  33. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/perplexity_/PerplexityModel.py +8 -3
  34. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/libs/func/async_calls/__init__.py +6 -3
  35. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/libs/func/async_calls/alcall.py +46 -0
  36. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/libs/func/async_calls/bcall.py +49 -1
  37. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/libs/func/async_calls/rcall.py +32 -0
  38. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/libs/utils.py +12 -1
  39. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/operations/brainstorm/brainstorm.py +4 -4
  40. lionagi-0.5.3/lionagi/operations/brainstorm/prompt.py +8 -0
  41. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/operations/plan/plan.py +3 -3
  42. lionagi-0.5.3/lionagi/operations/plan/prompt.py +22 -0
  43. lionagi-0.5.3/lionagi/protocols/__init__.py +3 -0
  44. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/protocols/configs/branch_config.py +1 -1
  45. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/protocols/configs/imodel_config.py +2 -2
  46. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/protocols/configs/log_config.py +1 -1
  47. lionagi-0.5.3/lionagi/protocols/operatives/__init__.py +3 -0
  48. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/protocols/operatives/action.py +4 -0
  49. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/protocols/operatives/instruct.py +6 -8
  50. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/protocols/operatives/operative.py +9 -21
  51. lionagi-0.5.3/lionagi/protocols/operatives/prompts.py +83 -0
  52. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/protocols/operatives/reason.py +4 -0
  53. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/protocols/operatives/step.py +11 -23
  54. lionagi-0.5.1/lionagi/protocols/operatives/__init__.py → lionagi-0.5.3/lionagi/protocols/operatives/types.py +4 -0
  55. lionagi-0.5.3/lionagi/protocols/registries/__init__.py +3 -0
  56. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/protocols/registries/_component_registry.py +4 -0
  57. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/protocols/registries/_pile_registry.py +4 -0
  58. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/service/__init__.py +3 -0
  59. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/service/service_match_util.py +4 -4
  60. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/settings.py +10 -18
  61. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/strategies/base.py +4 -5
  62. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/strategies/concurrent.py +4 -3
  63. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/strategies/concurrent_chunk.py +3 -3
  64. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/strategies/concurrent_sequential_chunk.py +3 -3
  65. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/strategies/params.py +7 -4
  66. lionagi-0.5.3/lionagi/version.py +1 -0
  67. {lionagi-0.5.1 → lionagi-0.5.3}/pyproject.toml +4 -2
  68. {lionagi-0.5.1 → lionagi-0.5.3}/uv.lock +179 -175
  69. lionagi-0.5.1/lionagi/core/models/base.py +0 -85
  70. lionagi-0.5.1/lionagi/core/models/schema_model.py +0 -50
  71. lionagi-0.5.1/lionagi/core/models/types.py +0 -10
  72. lionagi-0.5.1/lionagi/core/typing/config.py +0 -15
  73. lionagi-0.5.1/lionagi/core/typing/id.py +0 -221
  74. lionagi-0.5.1/lionagi/operations/brainstorm/prompt.py +0 -1
  75. lionagi-0.5.1/lionagi/operations/plan/prompt.py +0 -21
  76. lionagi-0.5.1/lionagi/protocols/operatives/prompts.py +0 -232
  77. lionagi-0.5.1/lionagi/strategies/__init__.py +0 -0
  78. lionagi-0.5.1/lionagi/version.py +0 -1
  79. {lionagi-0.5.1 → lionagi-0.5.3}/.env.example +0 -0
  80. {lionagi-0.5.1 → lionagi-0.5.3}/.github/FUNDING.yml +0 -0
  81. {lionagi-0.5.1 → lionagi-0.5.3}/.github/dependabot.yml +0 -0
  82. {lionagi-0.5.1 → lionagi-0.5.3}/.github/workflows/ci.yml +0 -0
  83. {lionagi-0.5.1 → lionagi-0.5.3}/.github/workflows/codeql.yml +0 -0
  84. {lionagi-0.5.1 → lionagi-0.5.3}/.github/workflows/release.yml +0 -0
  85. {lionagi-0.5.1 → lionagi-0.5.3}/.gitignore +0 -0
  86. {lionagi-0.5.1 → lionagi-0.5.3}/.pre-commit-config.yaml +0 -0
  87. {lionagi-0.5.1 → lionagi-0.5.3}/.python-version +0 -0
  88. {lionagi-0.5.1 → lionagi-0.5.3}/CODE_OF_CONDUCT.md +0 -0
  89. {lionagi-0.5.1 → lionagi-0.5.3}/CONTRIBUTING.md +0 -0
  90. {lionagi-0.5.1 → lionagi-0.5.3}/LICENSE +0 -0
  91. {lionagi-0.5.1 → lionagi-0.5.3}/docs/api_reference/action.md +0 -0
  92. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/core/__init__.py +0 -0
  93. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/core/_class_registry.py +0 -0
  94. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/core/action/__init__.py +0 -0
  95. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/core/action/action_manager.py +0 -0
  96. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/core/action/base.py +0 -0
  97. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/core/action/function_calling.py +0 -0
  98. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/core/action/types.py +0 -0
  99. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/core/communication/__init__.py +0 -0
  100. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/core/communication/action_response.py +0 -0
  101. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/core/communication/assistant_response.py +0 -0
  102. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/core/communication/base_mail.py +0 -0
  103. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/core/communication/instruction.py +0 -0
  104. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/core/communication/message_manager.py +0 -0
  105. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/core/communication/system.py +0 -0
  106. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/core/communication/templates/README.md +0 -0
  107. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/core/communication/templates/action_request.jinja2 +0 -0
  108. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/core/communication/templates/action_response.jinja2 +0 -0
  109. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/core/communication/templates/assistant_response.jinja2 +0 -0
  110. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/core/communication/templates/instruction_message.jinja2 +0 -0
  111. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/core/communication/templates/system_message.jinja2 +0 -0
  112. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/core/communication/templates/tool_schemas.jinja2 +0 -0
  113. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/core/communication/types.py +0 -0
  114. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/core/forms/__init__.py +0 -0
  115. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/core/forms/base.py +0 -0
  116. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/core/forms/form.py +0 -0
  117. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/core/forms/report.py +0 -0
  118. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/core/forms/types.py +0 -0
  119. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/core/forms/utils.py +0 -0
  120. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/core/generic/__init__.py +0 -0
  121. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/core/generic/edge.py +0 -0
  122. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/core/generic/log_manager.py +0 -0
  123. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/core/generic/node.py +0 -0
  124. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/core/generic/types.py +0 -0
  125. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/core/models/__init__.py +0 -0
  126. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/core/session/__init__.py +0 -0
  127. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/core/session/types.py +0 -0
  128. /lionagi-0.5.1/lionagi/core/typing/pydantic_.py → /lionagi-0.5.3/lionagi/core/typing/_pydantic.py +0 -0
  129. /lionagi-0.5.1/lionagi/core/typing/typing_.py → /lionagi-0.5.3/lionagi/core/typing/_typing.py +0 -0
  130. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/__init__.py +0 -0
  131. /lionagi-0.5.1/lionagi/integrations/services.py → /lionagi-0.5.3/lionagi/integrations/_services.py +0 -0
  132. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/anthropic_/AnthropicService.py +0 -0
  133. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/anthropic_/__init__.py +0 -0
  134. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/anthropic_/anthropic_max_output_token_data.yaml +0 -0
  135. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/anthropic_/anthropic_price_data.yaml +0 -0
  136. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/anthropic_/api_endpoints/__init__.py +0 -0
  137. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/anthropic_/api_endpoints/api_request.py +0 -0
  138. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/anthropic_/api_endpoints/data_models.py +0 -0
  139. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/anthropic_/api_endpoints/match_response.py +0 -0
  140. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/anthropic_/api_endpoints/messages/__init__.py +0 -0
  141. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/anthropic_/api_endpoints/messages/request/__init__.py +0 -0
  142. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/anthropic_/api_endpoints/messages/request/message_models.py +0 -0
  143. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/anthropic_/api_endpoints/messages/request/request_body.py +0 -0
  144. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/anthropic_/api_endpoints/messages/response/__init__.py +0 -0
  145. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/anthropic_/api_endpoints/messages/response/content_models.py +0 -0
  146. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/anthropic_/api_endpoints/messages/response/response_body.py +0 -0
  147. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/anthropic_/api_endpoints/messages/response/usage_models.py +0 -0
  148. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/anthropic_/version.py +0 -0
  149. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/groq_/GroqService.py +0 -0
  150. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/groq_/__init__.py +0 -0
  151. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/groq_/api_endpoints/__init__.py +0 -0
  152. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/groq_/api_endpoints/data_models.py +0 -0
  153. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/groq_/api_endpoints/groq_request.py +0 -0
  154. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/groq_/api_endpoints/match_response.py +0 -0
  155. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/groq_/api_endpoints/response_utils.py +0 -0
  156. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/groq_/groq_max_output_token_data.yaml +0 -0
  157. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/groq_/groq_price_data.yaml +0 -0
  158. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/groq_/groq_rate_limits.yaml +0 -0
  159. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/groq_/version.py +0 -0
  160. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/litellm_/__init__.py +0 -0
  161. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/ollama_/OllamaModel.py +0 -0
  162. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/ollama_/OllamaService.py +0 -0
  163. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/ollama_/__init__.py +0 -0
  164. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/ollama_/api_endpoints/__init__.py +0 -0
  165. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/ollama_/api_endpoints/api_request.py +0 -0
  166. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/ollama_/api_endpoints/chat_completion/__init__.py +0 -0
  167. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/ollama_/api_endpoints/chat_completion/message_models.py +0 -0
  168. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/ollama_/api_endpoints/chat_completion/request_body.py +0 -0
  169. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/ollama_/api_endpoints/chat_completion/response_body.py +0 -0
  170. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/ollama_/api_endpoints/chat_completion/tool_models.py +0 -0
  171. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/ollama_/api_endpoints/completion/__init__.py +0 -0
  172. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/ollama_/api_endpoints/completion/request_body.py +0 -0
  173. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/ollama_/api_endpoints/completion/response_body.py +0 -0
  174. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/ollama_/api_endpoints/data_models.py +0 -0
  175. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/ollama_/api_endpoints/embedding/__init__.py +0 -0
  176. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/ollama_/api_endpoints/embedding/request_body.py +0 -0
  177. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/ollama_/api_endpoints/embedding/response_body.py +0 -0
  178. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/ollama_/api_endpoints/match_data_model.py +0 -0
  179. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/ollama_/api_endpoints/match_response.py +0 -0
  180. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/ollama_/api_endpoints/model/__init__.py +0 -0
  181. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/ollama_/api_endpoints/model/copy_model.py +0 -0
  182. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/ollama_/api_endpoints/model/create_model.py +0 -0
  183. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/ollama_/api_endpoints/model/delete_model.py +0 -0
  184. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/ollama_/api_endpoints/model/list_model.py +0 -0
  185. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/ollama_/api_endpoints/model/pull_model.py +0 -0
  186. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/ollama_/api_endpoints/model/push_model.py +0 -0
  187. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/ollama_/api_endpoints/model/show_model.py +0 -0
  188. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/ollama_/api_endpoints/option_models.py +0 -0
  189. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/openai_/OpenAIService.py +0 -0
  190. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/openai_/__init__.py +0 -0
  191. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/openai_/api_endpoints/__init__.py +0 -0
  192. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/openai_/api_endpoints/api_request.py +0 -0
  193. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/openai_/api_endpoints/audio/__init__.py +0 -0
  194. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/openai_/api_endpoints/audio/speech_models.py +0 -0
  195. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/openai_/api_endpoints/audio/transcription_models.py +0 -0
  196. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/openai_/api_endpoints/audio/translation_models.py +0 -0
  197. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/openai_/api_endpoints/audio/types.py +0 -0
  198. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/openai_/api_endpoints/batch/__init__.py +0 -0
  199. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/openai_/api_endpoints/batch/batch_models.py +0 -0
  200. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/openai_/api_endpoints/batch/cancel_batch.py +0 -0
  201. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/openai_/api_endpoints/batch/create_batch.py +0 -0
  202. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/openai_/api_endpoints/batch/list_batch.py +0 -0
  203. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/openai_/api_endpoints/batch/request_object_models.py +0 -0
  204. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/openai_/api_endpoints/batch/retrieve_batch.py +0 -0
  205. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/openai_/api_endpoints/batch/types.py +0 -0
  206. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/openai_/api_endpoints/chat_completions/__init__.py +0 -0
  207. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/openai_/api_endpoints/chat_completions/request/__init__.py +0 -0
  208. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/openai_/api_endpoints/chat_completions/request/message_models.py +0 -0
  209. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/openai_/api_endpoints/chat_completions/request/request_body.py +0 -0
  210. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/openai_/api_endpoints/chat_completions/request/response_format.py +0 -0
  211. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/openai_/api_endpoints/chat_completions/request/stream_options.py +0 -0
  212. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/openai_/api_endpoints/chat_completions/request/tool_choice_models.py +0 -0
  213. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/openai_/api_endpoints/chat_completions/request/tool_models.py +0 -0
  214. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/openai_/api_endpoints/chat_completions/request/types.py +0 -0
  215. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/openai_/api_endpoints/chat_completions/response/__init__.py +0 -0
  216. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/openai_/api_endpoints/chat_completions/response/choice_models.py +0 -0
  217. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/openai_/api_endpoints/chat_completions/response/function_models.py +0 -0
  218. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/openai_/api_endpoints/chat_completions/response/log_prob_models.py +0 -0
  219. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/openai_/api_endpoints/chat_completions/response/message_models.py +0 -0
  220. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/openai_/api_endpoints/chat_completions/response/response_body.py +0 -0
  221. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/openai_/api_endpoints/chat_completions/response/types.py +0 -0
  222. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/openai_/api_endpoints/chat_completions/response/usage_models.py +0 -0
  223. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/openai_/api_endpoints/chat_completions/util.py +0 -0
  224. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/openai_/api_endpoints/data_models.py +0 -0
  225. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/openai_/api_endpoints/embeddings/__init__.py +0 -0
  226. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/openai_/api_endpoints/embeddings/request_body.py +0 -0
  227. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/openai_/api_endpoints/embeddings/response_body.py +0 -0
  228. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/openai_/api_endpoints/files/__init__.py +0 -0
  229. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/openai_/api_endpoints/files/delete_file.py +0 -0
  230. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/openai_/api_endpoints/files/file_models.py +0 -0
  231. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/openai_/api_endpoints/files/list_files.py +0 -0
  232. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/openai_/api_endpoints/files/retrieve_file.py +0 -0
  233. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/openai_/api_endpoints/files/upload_file.py +0 -0
  234. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/openai_/api_endpoints/fine_tuning/__init__.py +0 -0
  235. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/openai_/api_endpoints/fine_tuning/cancel_jobs.py +0 -0
  236. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/openai_/api_endpoints/fine_tuning/create_jobs.py +0 -0
  237. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/openai_/api_endpoints/fine_tuning/fine_tuning_job_checkpoint_models.py +0 -0
  238. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/openai_/api_endpoints/fine_tuning/fine_tuning_job_event_models.py +0 -0
  239. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/openai_/api_endpoints/fine_tuning/fine_tuning_job_models.py +0 -0
  240. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/openai_/api_endpoints/fine_tuning/list_fine_tuning_checkpoints.py +0 -0
  241. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/openai_/api_endpoints/fine_tuning/list_fine_tuning_events.py +0 -0
  242. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/openai_/api_endpoints/fine_tuning/list_fine_tuning_jobs.py +0 -0
  243. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/openai_/api_endpoints/fine_tuning/retrieve_jobs.py +0 -0
  244. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/openai_/api_endpoints/fine_tuning/training_format.py +0 -0
  245. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/openai_/api_endpoints/images/__init__.py +0 -0
  246. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/openai_/api_endpoints/images/image_edit_models.py +0 -0
  247. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/openai_/api_endpoints/images/image_models.py +0 -0
  248. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/openai_/api_endpoints/images/image_variation_models.py +0 -0
  249. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/openai_/api_endpoints/images/response_body.py +0 -0
  250. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/openai_/api_endpoints/match_data_model.py +0 -0
  251. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/openai_/api_endpoints/match_response.py +0 -0
  252. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/openai_/api_endpoints/models/__init__.py +0 -0
  253. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/openai_/api_endpoints/models/delete_fine_tuned_model.py +0 -0
  254. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/openai_/api_endpoints/models/models_models.py +0 -0
  255. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/openai_/api_endpoints/models/retrieve_model.py +0 -0
  256. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/openai_/api_endpoints/moderations/__init__.py +0 -0
  257. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/openai_/api_endpoints/moderations/request_body.py +0 -0
  258. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/openai_/api_endpoints/moderations/response_body.py +0 -0
  259. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/openai_/api_endpoints/uploads/__init__.py +0 -0
  260. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/openai_/api_endpoints/uploads/add_upload_part.py +0 -0
  261. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/openai_/api_endpoints/uploads/cancel_upload.py +0 -0
  262. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/openai_/api_endpoints/uploads/complete_upload.py +0 -0
  263. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/openai_/api_endpoints/uploads/create_upload.py +0 -0
  264. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/openai_/api_endpoints/uploads/uploads_models.py +0 -0
  265. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/openai_/image_token_calculator/__init__.py +0 -0
  266. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/openai_/image_token_calculator/openai_image_token_data.yaml +0 -0
  267. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/openai_/openai_max_output_token_data.yaml +0 -0
  268. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/openai_/openai_price_data.yaml +0 -0
  269. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/openai_/version.py +0 -0
  270. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/pandas_/__init__.py +0 -0
  271. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/pandas_/extend_df.py +0 -0
  272. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/pandas_/read.py +0 -0
  273. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/pandas_/remove_rows.py +0 -0
  274. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/pandas_/replace_keywords.py +0 -0
  275. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/pandas_/save.py +0 -0
  276. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/pandas_/search_keywords.py +0 -0
  277. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/pandas_/to_df.py +0 -0
  278. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/pandas_/update_cells.py +0 -0
  279. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/perplexity_/PerplexityService.py +0 -0
  280. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/perplexity_/__init__.py +0 -0
  281. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/perplexity_/api_endpoints/__init__.py +0 -0
  282. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/perplexity_/api_endpoints/api_request.py +0 -0
  283. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/perplexity_/api_endpoints/chat_completions/__init__.py +0 -0
  284. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/perplexity_/api_endpoints/chat_completions/request/__init__.py +0 -0
  285. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/perplexity_/api_endpoints/chat_completions/request/request_body.py +0 -0
  286. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/perplexity_/api_endpoints/chat_completions/response/__init__.py +0 -0
  287. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/perplexity_/api_endpoints/chat_completions/response/response_body.py +0 -0
  288. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/perplexity_/api_endpoints/data_models.py +0 -0
  289. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/perplexity_/api_endpoints/match_response.py +0 -0
  290. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/perplexity_/perplexity_max_output_token_data.yaml +0 -0
  291. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/perplexity_/perplexity_price_data.yaml +0 -0
  292. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/perplexity_/version.py +0 -0
  293. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/pydantic_/__init__.py +0 -0
  294. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/pydantic_/break_down_annotation.py +0 -0
  295. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/integrations/pydantic_/new_model.py +0 -0
  296. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/libs/__init__.py +0 -0
  297. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/libs/compress/__init__.py +0 -0
  298. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/libs/compress/models.py +0 -0
  299. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/libs/compress/utils.py +0 -0
  300. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/libs/constants.py +0 -0
  301. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/libs/file/__init__.py +0 -0
  302. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/libs/file/chunk.py +0 -0
  303. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/libs/file/file_ops.py +0 -0
  304. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/libs/file/params.py +0 -0
  305. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/libs/file/path.py +0 -0
  306. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/libs/file/process.py +0 -0
  307. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/libs/file/save.py +0 -0
  308. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/libs/file/types.py +0 -0
  309. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/libs/func/__init__.py +0 -0
  310. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/libs/func/async_calls/mcall.py +0 -0
  311. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/libs/func/async_calls/pcall.py +0 -0
  312. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/libs/func/async_calls/tcall.py +0 -0
  313. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/libs/func/async_calls/ucall.py +0 -0
  314. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/libs/func/decorators.py +0 -0
  315. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/libs/func/lcall.py +0 -0
  316. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/libs/func/params.py +0 -0
  317. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/libs/func/throttle.py +0 -0
  318. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/libs/func/types.py +0 -0
  319. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/libs/func/utils.py +0 -0
  320. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/libs/package/__init__.py +0 -0
  321. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/libs/package/imports.py +0 -0
  322. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/libs/package/management.py +0 -0
  323. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/libs/package/params.py +0 -0
  324. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/libs/package/system.py +0 -0
  325. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/libs/package/types.py +0 -0
  326. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/libs/parse/__init__.py +0 -0
  327. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/libs/parse/flatten/__init__.py +0 -0
  328. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/libs/parse/flatten/flatten.py +0 -0
  329. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/libs/parse/flatten/params.py +0 -0
  330. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/libs/parse/flatten/unflatten.py +0 -0
  331. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/libs/parse/json/__init__.py +0 -0
  332. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/libs/parse/json/as_readable.py +0 -0
  333. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/libs/parse/json/extract.py +0 -0
  334. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/libs/parse/json/parse.py +0 -0
  335. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/libs/parse/json/schema.py +0 -0
  336. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/libs/parse/json/to_json.py +0 -0
  337. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/libs/parse/nested/__init__.py +0 -0
  338. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/libs/parse/nested/nfilter.py +0 -0
  339. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/libs/parse/nested/nget.py +0 -0
  340. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/libs/parse/nested/ninsert.py +0 -0
  341. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/libs/parse/nested/nmerge.py +0 -0
  342. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/libs/parse/nested/npop.py +0 -0
  343. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/libs/parse/nested/nset.py +0 -0
  344. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/libs/parse/nested/to_flat_list.py +0 -0
  345. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/libs/parse/nested/utils.py +0 -0
  346. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/libs/parse/params.py +0 -0
  347. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/libs/parse/string_parse/__init__.py +0 -0
  348. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/libs/parse/string_parse/code_block.py +0 -0
  349. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/libs/parse/string_parse/docstring.py +0 -0
  350. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/libs/parse/string_parse/function_.py +0 -0
  351. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/libs/parse/type_convert/__init__.py +0 -0
  352. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/libs/parse/type_convert/params.py +0 -0
  353. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/libs/parse/type_convert/to_dict.py +0 -0
  354. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/libs/parse/type_convert/to_list.py +0 -0
  355. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/libs/parse/type_convert/to_num.py +0 -0
  356. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/libs/parse/type_convert/to_str.py +0 -0
  357. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/libs/parse/types.py +0 -0
  358. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/libs/parse/validate/__init__.py +0 -0
  359. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/libs/parse/validate/boolean.py +0 -0
  360. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/libs/parse/validate/keys.py +0 -0
  361. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/libs/parse/validate/mapping.py +0 -0
  362. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/libs/parse/validate/params.py +0 -0
  363. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/libs/parse/xml/__init__.py +0 -0
  364. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/libs/parse/xml/convert.py +0 -0
  365. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/libs/parse/xml/parser.py +0 -0
  366. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/libs/string_similarity/__init__.py +0 -0
  367. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/libs/string_similarity/algorithms.py +0 -0
  368. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/libs/string_similarity/matcher.py +0 -0
  369. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/libs/string_similarity/utils.py +0 -0
  370. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/operations/__init__.py +0 -0
  371. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/operations/brainstorm/__init__.py +0 -0
  372. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/operations/plan/__init__.py +0 -0
  373. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/operations/select/__init__.py +0 -0
  374. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/operations/select/prompt.py +0 -0
  375. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/operations/select/select.py +0 -0
  376. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/operations/select/utils.py +0 -0
  377. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/operations/utils.py +0 -0
  378. {lionagi-0.5.1/lionagi/protocols → lionagi-0.5.3/lionagi/protocols/adapters}/__init__.py +0 -0
  379. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/protocols/adapters/adapter.py +0 -0
  380. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/protocols/adapters/json_adapter.py +0 -0
  381. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/protocols/adapters/pandas_adapter.py +0 -0
  382. {lionagi-0.5.1/lionagi/protocols/adapters → lionagi-0.5.3/lionagi/protocols/configs}/__init__.py +0 -0
  383. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/protocols/configs/id_config.py +0 -0
  384. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/protocols/configs/retry_config.py +0 -0
  385. /lionagi-0.5.1/lionagi/protocols/configs/__init__.py → /lionagi-0.5.3/lionagi/protocols/configs/types.py +0 -0
  386. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/service/complete_request_info.py +0 -0
  387. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/service/imodel.py +0 -0
  388. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/service/rate_limiter.py +0 -0
  389. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/service/service.py +0 -0
  390. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/service/service_util.py +0 -0
  391. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/service/token_calculator.py +0 -0
  392. {lionagi-0.5.1/lionagi/protocols/registries → lionagi-0.5.3/lionagi/strategies}/__init__.py +0 -0
  393. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/strategies/sequential.py +0 -0
  394. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/strategies/sequential_chunk.py +0 -0
  395. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/strategies/sequential_concurrent_chunk.py +0 -0
  396. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/strategies/types.py +0 -0
  397. {lionagi-0.5.1 → lionagi-0.5.3}/lionagi/strategies/utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: lionagi
3
- Version: 0.5.1
3
+ Version: 0.5.3
4
4
  Summary: An AGentic Intelligence Operating System.
5
5
  Author-email: HaiyangLi <quantocean.li@gmail.com>
6
6
  License: Apache License
@@ -218,10 +218,12 @@ Classifier: Programming Language :: Python :: 3.11
218
218
  Classifier: Programming Language :: Python :: 3.12
219
219
  Classifier: Programming Language :: Python :: 3.13
220
220
  Requires-Python: >=3.11
221
+ Requires-Dist: aiohttp>=3.11.10
221
222
  Requires-Dist: jinja2>=3.1.4
222
- Requires-Dist: litellm>=1.55.2
223
+ Requires-Dist: litellm>=1.55.3
223
224
  Requires-Dist: pandas>=2.0.0
224
225
  Requires-Dist: pillow>=11.0.0
226
+ Requires-Dist: pydantic>=2.10.3
225
227
  Requires-Dist: python-dotenv>=1.0.1
226
228
  Description-Content-Type: text/markdown
227
229
 
@@ -334,7 +336,7 @@ pplx_small = iModel(
334
336
  b = await hunter.communicate(
335
337
  instruction="What makes a well-behaved dragon?",
336
338
  clear_messages=True, # refresh the conversation
337
- imodel=pplx_small, # use sonnet model
339
+ imodel=pplx_small, # use perplexity model
338
340
  )
339
341
 
340
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,7 @@ 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
8
  from .integrations.litellm_.imodel import LiteiModel
9
9
  from .protocols.operatives.step import Step
10
10
  from .service import iModel
@@ -21,6 +21,8 @@ __all__ = [
21
21
  "LiteiModel",
22
22
  "Branch",
23
23
  "Step",
24
+ "Session",
25
+ "LiteiModel",
24
26
  ]
25
27
 
26
28
  logger = logging.getLogger(__name__)
@@ -138,12 +138,10 @@ class Tool(Element):
138
138
  Returns:
139
139
  str: A detailed string representation of the Tool.
140
140
  """
141
- timestamp_str = datetime.fromtimestamp(self.timestamp).isoformat(
142
- timespec="minutes"
143
- )
141
+ timestamp_str = self.created_datetime.strftime("%Y-%m-%d %H:%M:%S")
144
142
  return (
145
- f"{self.class_name()}(ln_id={self.ln_id[:6]}.., "
146
- f"timestamp={timestamp_str}), "
143
+ f"{self.class_name()}(ln_id={str(self.ln_id)[:6]}.., "
144
+ f"created_timestamp={timestamp_str}), "
147
145
  f"schema_={json.dumps(self.schema_, indent=4)}"
148
146
  )
149
147
 
@@ -4,7 +4,7 @@
4
4
 
5
5
  from typing_extensions import override
6
6
 
7
- from lionagi.core.typing import ID, Any, Callable, LnID, Note
7
+ from lionagi.core.typing import ID, Any, Callable, IDType, Note
8
8
  from lionagi.libs.parse import to_dict
9
9
  from lionagi.libs.utils import copy
10
10
 
@@ -107,12 +107,12 @@ class ActionRequest(RoledMessage):
107
107
  )
108
108
 
109
109
  @property
110
- def action_response_id(self) -> LnID | None:
110
+ def action_response_id(self) -> IDType | None:
111
111
  """
112
112
  Get the ID of the corresponding action response.
113
113
 
114
114
  Returns:
115
- LnID | None: The ID of the action response, or None if not responded
115
+ IDType | None: The ID of the action response, or None if not responded
116
116
  """
117
117
  return self.content.get("action_response_id", None)
118
118
 
@@ -58,7 +58,7 @@ class MessageField(str, Enum):
58
58
  - LION_CLASS: Class identifier for LION system
59
59
  - ROLE: Message role (system/user/assistant)
60
60
  - CONTENT: Message content
61
- - ln_id: Unique message identifier
61
+ - id: Unique message identifier
62
62
  - SENDER: Message sender
63
63
  - RECIPIENT: Message recipient
64
64
  - METADATA: Additional message metadata
@@ -68,7 +68,7 @@ class MessageField(str, Enum):
68
68
  LION_CLASS = "lion_class"
69
69
  ROLE = "role"
70
70
  CONTENT = "content"
71
- ln_id = "ln_id"
71
+ id = "id"
72
72
  SENDER = "sender"
73
73
  RECIPIENT = "recipient"
74
74
  METADATA = "metadata"
@@ -248,7 +248,7 @@ class RoledMessage(Component, BaseMail):
248
248
  if origin_obj and isinstance(origin_obj, Communicatable):
249
249
  info_dict = {
250
250
  "clone_from_info": {
251
- "original_ln_id": origin_obj.ln_id,
251
+ "original_id": origin_obj.id,
252
252
  "original_timestamp": origin_obj.timestamp,
253
253
  "original_sender": origin_obj.sender,
254
254
  "original_recipient": origin_obj.recipient,
@@ -8,8 +8,8 @@ from lionagi.core.typing import (
8
8
  Any,
9
9
  BaseModel,
10
10
  IDError,
11
+ IDType,
11
12
  Literal,
12
- LnID,
13
13
  Note,
14
14
  )
15
15
  from lionagi.integrations.pydantic_ import break_down_pydantic_annotation
@@ -229,7 +229,7 @@ def prepare_instruction_content(
229
229
 
230
230
  def validate_sender_recipient(
231
231
  value: Any, /
232
- ) -> LnID | Literal["system", "user", "N/A", "assistant"]:
232
+ ) -> IDType | Literal["system", "user", "N/A", "assistant"]:
233
233
  """
234
234
  Validate sender and recipient fields for mail-like communication.
235
235
 
@@ -237,7 +237,7 @@ def validate_sender_recipient(
237
237
  value: The value to validate
238
238
 
239
239
  Returns:
240
- Union[LnID, Literal]: Valid sender/recipient value
240
+ Union[IDType, Literal]: Valid sender/recipient value
241
241
 
242
242
  Raises:
243
243
  ValueError: If value is not a valid sender or recipient
@@ -289,8 +289,8 @@ class Component(Element, OperableModel):
289
289
 
290
290
  output_str = (
291
291
  f"{self.__class__.__name__}("
292
- f"ln_id={self.ln_id[:8]}..., "
293
- f"timestamp={str(self.created_datetime)[:-6]}, "
292
+ f"ln_id={str(self.ln_id)[:8]}..., "
293
+ f"created_timestamp={str(self.created_datetime)[:-6]}, "
294
294
  f"content='{content_preview}', "
295
295
  f"metadata_keys={list(self.metadata.keys())}, "
296
296
  )
@@ -340,8 +340,8 @@ class Component(Element, OperableModel):
340
340
 
341
341
  repr_str = (
342
342
  f"{self.class_name()}("
343
- f"ln_id={repr(self.ln_id)}, "
344
- f"timestamp={str(self.created_datetime)[:-6]}, "
343
+ f"ln_id=IDType({str(self.ln_id)}), "
344
+ f"created_timestamp={str(self.created_datetime)[:-6]}, "
345
345
  f"content={content_repr}, "
346
346
  f"metadata={truncate_dict(self.metadata.content)}, "
347
347
  )
@@ -4,6 +4,8 @@
4
4
 
5
5
  from datetime import datetime
6
6
 
7
+ from pydantic import AliasChoices, field_serializer
8
+
7
9
  from lionagi.core._class_registry import LION_CLASS_REGISTRY, get_class
8
10
  from lionagi.core.typing import (
9
11
  ID,
@@ -12,8 +14,7 @@ from lionagi.core.typing import (
12
14
  ConfigDict,
13
15
  Field,
14
16
  IDError,
15
- LnID,
16
- Note,
17
+ IDType,
17
18
  Observable,
18
19
  TypeVar,
19
20
  field_validator,
@@ -48,32 +49,45 @@ class Element(BaseModel, Observable):
48
49
  - String formatting
49
50
 
50
51
  Attributes:
51
- ln_id (LnID): Unique identifier for the element. Generated automatically
52
+ id (IDType): Unique identifier for the element. Generated automatically
52
53
  and immutable.
53
54
  timestamp (float): Creation timestamp as Unix timestamp. Generated
54
55
  automatically and immutable.
55
56
  """
56
57
 
57
- ln_id: LnID = Field(
58
+ model_config = ConfigDict(
59
+ extra="forbid",
60
+ arbitrary_types_allowed=True,
61
+ use_enum_values=True,
62
+ populate_by_name=True,
63
+ )
64
+
65
+ ln_id: IDType = Field(
58
66
  default_factory=ID.id,
59
67
  title="Lion ID",
60
68
  description="Unique identifier for the element",
61
69
  frozen=True,
62
70
  )
63
71
 
64
- timestamp: float = Field(
65
- default_factory=lambda: time(type_="timestamp"),
66
- title="Creation Timestamp",
72
+ created_timestamp: float = Field(
73
+ default_factory=lambda: time(
74
+ tz=Settings.Config.TIMEZONE, type_="timestamp"
75
+ ),
76
+ title="Creation Datetime",
67
77
  frozen=True,
68
- alias="created",
78
+ alias=AliasChoices("created_at", "timestamp"),
69
79
  )
70
80
 
71
- model_config = ConfigDict(
72
- extra="forbid",
73
- arbitrary_types_allowed=True,
74
- use_enum_values=True,
75
- populate_by_name=True,
76
- )
81
+ @property
82
+ def created_datetime(self) -> datetime:
83
+ """Get the creation timestamp as a Unix timestamp.
84
+
85
+ Returns:
86
+ float: The creation timestamp.
87
+ """
88
+ return datetime.fromtimestamp(
89
+ self.created_timestamp, tz=Settings.Config.TIMEZONE
90
+ )
77
91
 
78
92
  @classmethod
79
93
  def class_name(cls) -> str:
@@ -89,41 +103,39 @@ class Element(BaseModel, Observable):
89
103
  super().__pydantic_init_subclass__(**kwargs)
90
104
  LION_CLASS_REGISTRY[cls.__name__] = cls
91
105
 
92
- @property
93
- def created_datetime(self) -> datetime:
94
- """Get the creation datetime of the Element.
95
-
96
- Converts the Unix timestamp to a timezone-aware datetime object using the
97
- timezone specified in Settings.Config.TIMEZONE.
98
-
99
- Returns:
100
- datetime: A timezone-aware datetime object representing when the
101
- Element was created.
102
- """
103
- return datetime.fromtimestamp(
104
- self.timestamp, tz=Settings.Config.TIMEZONE
105
- )
106
+ @field_serializer("ln_id")
107
+ def _serialize_id(self, value: IDType) -> str:
108
+ return str(self.ln_id)
106
109
 
107
110
  @field_validator("ln_id", mode="before")
108
- def _validate_id(cls, value: ID.ID) -> str:
111
+ def _validate_id(cls, value: str | IDType) -> str:
109
112
  try:
110
113
  return ID.get_id(value)
111
114
  except Exception:
112
115
  raise IDError(f"Invalid lion id: {value}")
113
116
 
114
- @field_validator("timestamp", mode="before")
117
+ @field_validator("created_timestamp", mode="before")
115
118
  def _validate_timestamp(cls, value: Any) -> float:
116
- if isinstance(value, (int, float)):
117
- return float(value)
118
119
  if isinstance(value, datetime):
119
120
  return value.timestamp()
120
- try:
121
- if isinstance(value, str):
121
+
122
+ if isinstance(value, int | float):
123
+ return value
124
+
125
+ if isinstance(value, str):
126
+ try:
127
+ return datetime.fromisoformat(value).timestamp()
128
+ except Exception as e:
122
129
  try:
123
- return float(value)
130
+ value = float(value)
124
131
  except Exception:
125
- return datetime.fromisoformat(value).timestamp()
126
- raise ValueError
132
+ raise ValueError(
133
+ f"Invalid datetime string format: {value}"
134
+ ) from e
135
+
136
+ try:
137
+ return datetime.fromtimestamp(value, tz=Settings.Config.TIMEZONE)
138
+
127
139
  except Exception as e:
128
140
  raise ValueError(f"Invalid datetime string format: {value}") from e
129
141
 
@@ -170,8 +182,8 @@ class Element(BaseModel, Observable):
170
182
  def __str__(self) -> str:
171
183
  timestamp_str = self.created_datetime.isoformat(timespec="minutes")
172
184
  return (
173
- f"{self.class_name()}(ln_id={self.ln_id[:6]}.., "
174
- f"timestamp={timestamp_str})"
185
+ f"{self.class_name()}(ln_id={str(self.ln_id)[:6]}.., "
186
+ f"created_timestamp={timestamp_str})"
175
187
  )
176
188
 
177
189
  def __hash__(self) -> int:
@@ -183,13 +195,5 @@ class Element(BaseModel, Observable):
183
195
  def __len__(self) -> int:
184
196
  return 1
185
197
 
186
- def to_note(self) -> Note:
187
- """Convert Log to Note.
188
-
189
- Returns:
190
- Note representation of the log
191
- """
192
- return Note(**self.to_dict())
193
-
194
198
 
195
199
  __all__ = ["Element"]
@@ -281,7 +281,7 @@ class Graph(Node):
281
281
  node_info.update({"class_name": node.class_name()})
282
282
  if hasattr(node, "name"):
283
283
  node_info.update({"name": node.name})
284
- g.add_node(node.ln_id, **node_info)
284
+ g.add_node(str(node.ln_id), **node_info)
285
285
 
286
286
  for _edge in self.internal_edges:
287
287
  edge_info = _edge.to_dict()
@@ -72,7 +72,7 @@ class Log(Element):
72
72
  if "log_id" in data:
73
73
  data["ln_id"] = data.pop("log_id")
74
74
  if "log_timestamp" in data:
75
- data["timestamp"] = data.pop("log_timestamp")
75
+ data["created_timestamp"] = data.pop("log_timestamp")
76
76
  if "log_class" in data:
77
77
  data["lion_class"] = data.pop("log_class")
78
78
  return data
@@ -140,7 +140,7 @@ class Log(Element):
140
140
  # Convert standard fields to log_* fields
141
141
  dict_["log_id"] = dict_.pop("ln_id")
142
142
  dict_["log_class"] = dict_.pop("lion_class")
143
- dict_["log_timestamp"] = dict_.pop("timestamp")
143
+ dict_["log_timestamp"] = dict_.pop("created_timestamp")
144
144
 
145
145
  dict_ = to_dict(
146
146
  dict_,
@@ -26,6 +26,7 @@ from lionagi.core.typing import (
26
26
  TypeVar,
27
27
  field_serializer,
28
28
  )
29
+ from lionagi.core.typing._concepts import IDType
29
30
  from lionagi.libs.parse import is_same_dtype, to_list
30
31
  from lionagi.protocols.adapters.adapter import Adapter, AdapterRegistry
31
32
  from lionagi.protocols.registries._pile_registry import PileAdapterRegistry
@@ -38,6 +39,9 @@ T = TypeVar("T", bound=Element)
38
39
  D = TypeVar("D")
39
40
 
40
41
 
42
+ __all__ = ("Pile", "pile")
43
+
44
+
41
45
  def synchronized(func: Callable):
42
46
  @wraps(func)
43
47
  def wrapper(self: "Pile", *args, **kwargs):
@@ -72,7 +76,7 @@ class Pile(Element, Generic[T]):
72
76
  strict_type (bool): Whether to enforce strict type checking
73
77
  """
74
78
 
75
- pile_: dict[str, T] = Field(default_factory=dict)
79
+ pile_: dict[IDType, T] = Field(default_factory=dict)
76
80
  item_type: set[type[T]] | None = Field(
77
81
  default=None,
78
82
  description="Set of allowed types for items in the pile.",
@@ -120,8 +124,8 @@ class Pile(Element, Generic[T]):
120
124
  _config = {}
121
125
  if "ln_id" in kwargs:
122
126
  _config["ln_id"] = kwargs["ln_id"]
123
- if "created" in kwargs:
124
- _config["created"] = kwargs["created"]
127
+ if "created_timestamp" in kwargs:
128
+ _config["created_timestamp"] = kwargs["created_timestamp"]
125
129
 
126
130
  super().__init__(strict_type=strict_type, **_config)
127
131
  self.item_type = self._validate_item_type(item_type)
@@ -303,7 +307,7 @@ class Pile(Element, Generic[T]):
303
307
  """Get all items in order."""
304
308
  return [self.pile_[key] for key in self.progress]
305
309
 
306
- def items(self) -> Sequence[tuple[str, T]]:
310
+ def items(self) -> Sequence[tuple[IDType, T]]:
307
311
  """Get all (ID, item) pairs in order."""
308
312
  return [(key, self.pile_[key]) for key in self.progress]
309
313
 
@@ -619,7 +623,7 @@ class Pile(Element, Generic[T]):
619
623
  except Exception as e:
620
624
  raise ItemNotFoundError(f"index {key}. Error: {e}")
621
625
 
622
- elif isinstance(key, str):
626
+ elif isinstance(key, IDType):
623
627
  try:
624
628
  return self.pile_[key]
625
629
  except Exception as e:
@@ -724,7 +728,7 @@ class Pile(Element, Generic[T]):
724
728
  if isinstance(key, int | slice):
725
729
  try:
726
730
  pops = self.progress[key]
727
- pops = [pops] if isinstance(pops, str) else pops
731
+ pops = [pops] if isinstance(pops, IDType) else pops
728
732
  result = []
729
733
  for i in pops:
730
734
  self.progress.remove(i)
@@ -965,10 +969,6 @@ class Pile(Element, Generic[T]):
965
969
  """Save to CSV file."""
966
970
  self.adapt_to(".csv", fp=fp, **kwargs)
967
971
 
968
- def to_excel(self, fp: str | Path, **kwargs: Any) -> None:
969
- """Save to Excel file."""
970
- self.adapt_to(".xlsx", fp=fp, **kwargs)
971
-
972
972
 
973
973
  def pile(
974
974
  items: Any = None,
@@ -1013,5 +1013,4 @@ def pile(
1013
1013
  )
1014
1014
 
1015
1015
 
1016
- __all__ = [Pile, pile]
1017
1016
  # File: autoos/generic/pile.py
@@ -6,15 +6,18 @@ import contextlib
6
6
  from collections.abc import Iterator
7
7
  from typing import Any, Self
8
8
 
9
- from pydantic import field_validator
9
+ from pydantic import field_serializer, field_validator
10
10
  from typing_extensions import override
11
11
 
12
- from lionagi.core.typing import ID, Field, ItemNotFoundError, LnID, Ordering
12
+ from lionagi.core.typing import ID, Field, IDType, ItemNotFoundError, Ordering
13
+ from lionagi.core.typing._concepts import Observable
13
14
  from lionagi.libs.parse import to_list
14
15
 
15
16
  from .element import Element
16
17
  from .utils import to_list_type, validate_order
17
18
 
19
+ __all__ = ("Progression", "prog")
20
+
18
21
 
19
22
  class Progression(Element, Ordering):
20
23
  """A flexible, ordered sequence container for Lion IDs.
@@ -41,14 +44,18 @@ class Progression(Element, Ordering):
41
44
  description="The name of the progression.",
42
45
  )
43
46
 
44
- order: list[ID.ID] = Field(
47
+ order: list[IDType] = Field(
45
48
  default_factory=list,
46
49
  title="Order",
47
50
  description="The order of the progression.",
48
51
  )
49
52
 
53
+ @field_serializer("order")
54
+ def _serialize_order(self, value: list[IDType]) -> list[str]:
55
+ return [str(i) for i in self.order]
56
+
50
57
  @field_validator("order", mode="before")
51
- def _validate_order(cls, value: ID.RefSeq) -> list[LnID]:
58
+ def _validate_order(cls, value: ID.RefSeq) -> list[IDType]:
52
59
  if not value:
53
60
  return []
54
61
  try:
@@ -66,15 +73,15 @@ class Progression(Element, Ordering):
66
73
  check = False
67
74
  for i in item:
68
75
  check = False
69
- if isinstance(i, str):
76
+ if isinstance(i, IDType):
70
77
  check = i in self.order
71
- elif isinstance(i, Element):
78
+ elif isinstance(i, Observable):
72
79
  check = i.ln_id in self.order
73
80
  if not check:
74
81
  return False
75
82
  return check
76
83
 
77
- def __list__(self) -> list[LnID]:
84
+ def __list__(self) -> list[IDType]:
78
85
  """Return a copy of the order."""
79
86
  return self.order[:]
80
87
 
@@ -127,11 +134,11 @@ class Progression(Element, Ordering):
127
134
  """Delete an item or slice of items from the progression."""
128
135
  del self.order[key]
129
136
 
130
- def __iter__(self) -> Iterator[LnID]:
137
+ def __iter__(self) -> Iterator[IDType]:
131
138
  """Iterate over the items in the progression."""
132
139
  return iter(self.order)
133
140
 
134
- def __next__(self) -> LnID:
141
+ def __next__(self) -> IDType:
135
142
  """Return the next item in the progression."""
136
143
  try:
137
144
  return next(iter(self.order))
@@ -155,7 +162,7 @@ class Progression(Element, Ordering):
155
162
  item_ = validate_order(item)
156
163
  self.order.extend(item_)
157
164
 
158
- def pop(self, index: int = None, /) -> str:
165
+ def pop(self, index: int = None, /) -> IDType:
159
166
  """Remove and return an item from the progression.
160
167
 
161
168
  Args:
@@ -255,7 +262,7 @@ class Progression(Element, Ordering):
255
262
 
256
263
  raise ItemNotFoundError(f"{item}")
257
264
 
258
- def popleft(self) -> str:
265
+ def popleft(self) -> IDType:
259
266
  """Remove and return the leftmost item from the progression.
260
267
 
261
268
  Returns:
@@ -371,7 +378,7 @@ class Progression(Element, Ordering):
371
378
  return hash(self.ln_id)
372
379
 
373
380
 
374
- def progression(
381
+ def prog(
375
382
  order: ID.RefSeq = None,
376
383
  name: str = None,
377
384
  /,
@@ -7,6 +7,7 @@ from collections.abc import Generator
7
7
  from typing import Any, TypeVar
8
8
 
9
9
  from lionagi.core.typing import ID, IDError
10
+ from lionagi.core.typing._concepts import IDType, Observable
10
11
 
11
12
  from .element import Element
12
13
 
@@ -17,8 +18,10 @@ def to_list_type(value: Any, /) -> list[Any]:
17
18
  """Convert input to a list format"""
18
19
  if value is None:
19
20
  return []
21
+ if isinstance(value, IDType):
22
+ return [value]
20
23
  if isinstance(value, str):
21
- return [value] if ID.is_id(value) else []
24
+ return ID.get_id(value) if ID.is_id(value) else []
22
25
  if isinstance(value, Element):
23
26
  return [value]
24
27
  if hasattr(value, "values") and callable(value.values):
@@ -35,8 +38,8 @@ def validate_order(value: Any, /) -> list[str]:
35
38
  result = []
36
39
  for item in to_list_type(value):
37
40
  if isinstance(item, str) and ID.is_id(item):
38
- result.append(item)
39
- elif isinstance(item, Element):
41
+ result.append(ID.get_id(item))
42
+ elif isinstance(item, Observable):
40
43
  result.append(item.ln_id)
41
44
  else:
42
45
  id_ = ID.get_id(item)
@@ -0,0 +1,28 @@
1
+ # Copyright (c) 2023 - 2024, HaiyangLi <quantocean.li at gmail dot com>
2
+ #
3
+ # SPDX-License-Identifier: Apache-2.0
4
+
5
+ from ..typing._pydantic import BaseModel
6
+ from ..typing._typing import UNDEFINED, Any, Self
7
+
8
+ __all__ = ("BaseAutoModel",)
9
+
10
+
11
+ class BaseAutoModel(BaseModel):
12
+ """a hashable pydantic model interface with to_dict and from_dict method"""
13
+
14
+ def to_dict(self, **kwargs) -> dict[str, Any]:
15
+ """kwargs for pydantic model_dump()"""
16
+ return {
17
+ k: v
18
+ for k, v in self.model_dump(**kwargs).items()
19
+ if v is not UNDEFINED
20
+ }
21
+
22
+ @classmethod
23
+ def from_dict(cls, data: dict, **kwargs) -> Self:
24
+ """kwargs for model_validate"""
25
+ return cls.model_validate(data, **kwargs)
26
+
27
+ def __hash__(self) -> int:
28
+ return hash(str(self.to_dict()))