lionagi 0.5.1__py3-none-any.whl → 0.5.3__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (75) hide show
  1. lionagi/__init__.py +3 -1
  2. lionagi/core/action/tool.py +3 -5
  3. lionagi/core/communication/action_request.py +3 -3
  4. lionagi/core/communication/message.py +3 -3
  5. lionagi/core/communication/utils.py +3 -3
  6. lionagi/core/generic/component.py +4 -4
  7. lionagi/core/generic/element.py +51 -47
  8. lionagi/core/generic/graph.py +1 -1
  9. lionagi/core/generic/log.py +2 -2
  10. lionagi/core/generic/pile.py +10 -11
  11. lionagi/core/generic/progression.py +19 -12
  12. lionagi/core/generic/utils.py +6 -3
  13. lionagi/core/models/base.py +11 -68
  14. lionagi/core/models/field_model.py +42 -19
  15. lionagi/core/models/{new_model_params.py → model_params.py} +5 -6
  16. lionagi/core/models/note.py +2 -2
  17. lionagi/core/models/operable_model.py +8 -4
  18. lionagi/core/models/schema_model.py +9 -31
  19. lionagi/core/models/types.py +15 -6
  20. lionagi/core/session/branch.py +8 -4
  21. lionagi/core/session/branch_mixins.py +11 -12
  22. lionagi/core/session/session.py +1 -2
  23. lionagi/core/typing/__init__.py +4 -4
  24. lionagi/core/typing/{concepts.py → _concepts.py} +43 -2
  25. lionagi/core/typing/_id.py +104 -0
  26. lionagi/integrations/anthropic_/AnthropicModel.py +8 -3
  27. lionagi/integrations/groq_/GroqModel.py +11 -4
  28. lionagi/integrations/litellm_/imodel.py +6 -8
  29. lionagi/integrations/openai_/OpenAIModel.py +8 -3
  30. lionagi/integrations/openai_/image_token_calculator/image_token_calculator.py +14 -8
  31. lionagi/integrations/perplexity_/PerplexityModel.py +8 -3
  32. lionagi/libs/func/async_calls/__init__.py +6 -3
  33. lionagi/libs/func/async_calls/alcall.py +46 -0
  34. lionagi/libs/func/async_calls/bcall.py +49 -1
  35. lionagi/libs/func/async_calls/rcall.py +32 -0
  36. lionagi/libs/utils.py +12 -1
  37. lionagi/operations/brainstorm/brainstorm.py +4 -4
  38. lionagi/operations/brainstorm/prompt.py +8 -1
  39. lionagi/operations/plan/plan.py +3 -3
  40. lionagi/operations/plan/prompt.py +17 -16
  41. lionagi/protocols/__init__.py +3 -0
  42. lionagi/protocols/configs/__init__.py +0 -15
  43. lionagi/protocols/configs/branch_config.py +1 -1
  44. lionagi/protocols/configs/imodel_config.py +2 -2
  45. lionagi/protocols/configs/log_config.py +1 -1
  46. lionagi/protocols/configs/types.py +15 -0
  47. lionagi/protocols/operatives/__init__.py +3 -15
  48. lionagi/protocols/operatives/action.py +4 -0
  49. lionagi/protocols/operatives/instruct.py +6 -8
  50. lionagi/protocols/operatives/operative.py +9 -21
  51. lionagi/protocols/operatives/prompts.py +53 -202
  52. lionagi/protocols/operatives/reason.py +4 -0
  53. lionagi/protocols/operatives/step.py +11 -23
  54. lionagi/protocols/operatives/types.py +19 -0
  55. lionagi/protocols/registries/__init__.py +3 -0
  56. lionagi/protocols/registries/_component_registry.py +4 -0
  57. lionagi/protocols/registries/_pile_registry.py +4 -0
  58. lionagi/service/__init__.py +3 -0
  59. lionagi/service/service_match_util.py +4 -4
  60. lionagi/settings.py +10 -18
  61. lionagi/strategies/base.py +4 -5
  62. lionagi/strategies/concurrent.py +4 -3
  63. lionagi/strategies/concurrent_chunk.py +3 -3
  64. lionagi/strategies/concurrent_sequential_chunk.py +3 -3
  65. lionagi/strategies/params.py +7 -4
  66. lionagi/version.py +1 -1
  67. {lionagi-0.5.1.dist-info → lionagi-0.5.3.dist-info}/METADATA +5 -3
  68. {lionagi-0.5.1.dist-info → lionagi-0.5.3.dist-info}/RECORD +73 -72
  69. lionagi/core/typing/config.py +0 -15
  70. lionagi/core/typing/id.py +0 -221
  71. /lionagi/core/typing/{pydantic_.py → _pydantic.py} +0 -0
  72. /lionagi/core/typing/{typing_.py → _typing.py} +0 -0
  73. /lionagi/integrations/{services.py → _services.py} +0 -0
  74. {lionagi-0.5.1.dist-info → lionagi-0.5.3.dist-info}/WHEEL +0 -0
  75. {lionagi-0.5.1.dist-info → lionagi-0.5.3.dist-info}/licenses/LICENSE +0 -0
@@ -1,9 +1,9 @@
1
1
  from typing import ClassVar
2
2
 
3
- from lionagi.fields.instruct import Instruct, InstructResponse
4
- from lionagi.utils import to_list
3
+ from lionagi.libs.func.types import bcall
4
+ from lionagi.libs.parse.types import to_list
5
+ from lionagi.protocols.operatives.instruct import Instruct, InstructResponse
5
6
 
6
- from ..libs.async_utils import bcall
7
7
  from .concurrent import ConcurrentExecutor
8
8
  from .params import ChunkStrategyParams
9
9
 
@@ -1,8 +1,8 @@
1
1
  from pydantic import model_validator
2
2
 
3
- from lionagi.fields.instruct import Instruct, InstructResponse
4
- from lionagi.session.types import Branch, Session
5
- from lionagi.utils import alcall
3
+ from lionagi.core.session.types import Branch, Session
4
+ from lionagi.libs.func.types import alcall
5
+ from lionagi.protocols.operatives.instruct import Instruct, InstructResponse
6
6
 
7
7
  from .base import StrategyExecutor
8
8
  from .params import HybridStrategyParams
@@ -2,10 +2,13 @@ from typing import Any, Literal
2
2
 
3
3
  from pydantic import Field, field_validator, model_validator
4
4
 
5
- from lionagi.fields.instruct import INSTRUCT_FIELD_MODEL, Instruct
6
- from lionagi.libs.async_utils import RCallParams
7
- from lionagi.protocols.types import FieldModel, SchemaModel
8
- from lionagi.session.types import Branch, Session
5
+ from lionagi.core.models.types import FieldModel, SchemaModel
6
+ from lionagi.core.session.types import Branch, Session
7
+ from lionagi.libs.func.types import RCallParams
8
+ from lionagi.protocols.operatives.instruct import (
9
+ INSTRUCT_FIELD_MODEL,
10
+ Instruct,
11
+ )
9
12
 
10
13
 
11
14
  class StrategyParams(SchemaModel):
lionagi/version.py CHANGED
@@ -1 +1 @@
1
- __version__ = "0.5.1"
1
+ __version__ = "0.5.3"
@@ -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)
@@ -1,25 +1,25 @@
1
- lionagi/__init__.py,sha256=kIVZqqp61CFddL5BbYynIPwRlg3oUbSVTnWh6QOyhaM,495
2
- lionagi/settings.py,sha256=r3G-ihH5ehIKwsUdqSGKRwxKpXFj9v6kIaElZKQd7R4,2953
3
- lionagi/version.py,sha256=eZ1bOun1DDVV0YLOBW4wj2FP1ajReLjbIrGmzN7ASBw,22
1
+ lionagi/__init__.py,sha256=oybfu2VsZc4ElN7ZeaW3KQrz8T8EcSDHPA8lUE-8G2I,537
2
+ lionagi/settings.py,sha256=BOjxRV4N9zQJervvajPhbaHmgZ-nhbCy7AaQJi3Avug,2726
3
+ lionagi/version.py,sha256=tgzuqHKcEdKBaP57F5oXxq4XlW2n9J4Fj8ZGu7nGOZg,22
4
4
  lionagi/core/__init__.py,sha256=v8vNyJVIVj8_Oz9RJdVe6ZKUQMYTgDh1VQpnr1KdLaw,112
5
5
  lionagi/core/_class_registry.py,sha256=srSWefqCS9EZrMvyA8zCrZ9KFvzAhTIj8g6mJG5KlIc,1982
6
6
  lionagi/core/action/__init__.py,sha256=v8vNyJVIVj8_Oz9RJdVe6ZKUQMYTgDh1VQpnr1KdLaw,112
7
7
  lionagi/core/action/action_manager.py,sha256=8yNWV5x8YtaoL2A_U_5xjJdruqwWw8TLPAtq3f3DC7M,10143
8
8
  lionagi/core/action/base.py,sha256=M2K3irxpp7fDwczefzZdUsHhGd_21l1xhFT9iNSbiK0,4110
9
9
  lionagi/core/action/function_calling.py,sha256=7N5UFLbHPy6yvPrR6RH9SNSwt73s0X_3iAnOV8YMy0Q,6001
10
- lionagi/core/action/tool.py,sha256=DEjfc1tABP0rPOblcKhgml9OLUQWedN7raiRuLqGxMI,6910
10
+ lionagi/core/action/tool.py,sha256=pDiyttx0obu0qDskz7POHxbyqTwHuD7HCeE31LkzRMg,6884
11
11
  lionagi/core/action/types.py,sha256=KqW5ZHXssfxuf1kIiIUoj-r3KIZEoQ_GkZ04tL6fUPQ,388
12
12
  lionagi/core/communication/__init__.py,sha256=v8vNyJVIVj8_Oz9RJdVe6ZKUQMYTgDh1VQpnr1KdLaw,112
13
- lionagi/core/communication/action_request.py,sha256=qvrJtCmGnFLYxA9OWskygzkCSU_1lNibYYAqNQeJIz0,5000
13
+ lionagi/core/communication/action_request.py,sha256=gicqQIs7VLOhnkQYsUuRmSLGittODiG3Pk74FayPSeM,5006
14
14
  lionagi/core/communication/action_response.py,sha256=QONcRtvV7Ympbzkdg5gnV0DqCC97Y-gvaA0D7EkjswM,4505
15
15
  lionagi/core/communication/assistant_response.py,sha256=WTQjBxAckMILocaZEsOP6u1mfKr3DhYVt4K8TyAh7Ek,5760
16
16
  lionagi/core/communication/base_mail.py,sha256=Et-WrHlw2x75mLIKy-wMUj3YlGGL_2BF9r1REuiZtM8,1704
17
17
  lionagi/core/communication/instruction.py,sha256=Iy3G1sp0lPuA4Ak9pLobIipou4ePLsMdGGvRq6L58UU,12454
18
- lionagi/core/communication/message.py,sha256=Truhh6NVi0bQmOqls20Y2NKM-6QIlBFfNj3Kd0EPHjU,8565
18
+ lionagi/core/communication/message.py,sha256=60yaub4C_JFnMR76D_DeYfQ_mQYoZ0eBF9Vqk2UadUw,8550
19
19
  lionagi/core/communication/message_manager.py,sha256=RnSYJUnKOKBS8dfY2804Zq2sD-C5qDvBXNxXRsMfRe0,16987
20
20
  lionagi/core/communication/system.py,sha256=5DoDODZePy4EDpE3oI5RpkzBXVp9WC2Mf4B3fPImItI,3824
21
21
  lionagi/core/communication/types.py,sha256=rBGMpE3NW0SGKc-wJdJvT-VrO3wpjwjQhoWzSC2Dqh0,745
22
- lionagi/core/communication/utils.py,sha256=vi9CCjS2b5JFQ91h2v_JP8xLjyy96c743GysOUUcb-0,6953
22
+ lionagi/core/communication/utils.py,sha256=9kaBLH2eA2XqhW_aQvqziwm__z-WlBKSM0pwWX4BFjk,6959
23
23
  lionagi/core/communication/templates/README.md,sha256=Ch4JrKSjd85fLitAYO1OhZjNOGKHoEwaKQlcV16jiUI,1286
24
24
  lionagi/core/communication/templates/action_request.jinja2,sha256=d6OmxHKyvvNDSK4bnBM3TGSUk_HeE_Q2EtLAQ0ZBEJg,120
25
25
  lionagi/core/communication/templates/action_response.jinja2,sha256=Mg0UxmXlIvtP_KPB0GcJxE1TP6lml9BwdPkW1PZxkg8,142
@@ -34,39 +34,38 @@ lionagi/core/forms/report.py,sha256=FXu8sQnGMF_nCHUJ4NrXoiptHQ2ON2a356RBGJDZmag,
34
34
  lionagi/core/forms/types.py,sha256=5k8RNj87c0lHlSPrqnz4aY6--Lopg3u80qgKyRNuhuY,247
35
35
  lionagi/core/forms/utils.py,sha256=sCjYRy-EJIh1py9qIb04LVgALy2YiPHbhXhNyDNwvoQ,701
36
36
  lionagi/core/generic/__init__.py,sha256=v8vNyJVIVj8_Oz9RJdVe6ZKUQMYTgDh1VQpnr1KdLaw,112
37
- lionagi/core/generic/component.py,sha256=_U9S8vRbbA7dwsdFbqi0V1bEunq9CIYjQz-DG8gb4w8,13773
37
+ lionagi/core/generic/component.py,sha256=3y0t-fyLR2n2E8ooa7_VI5bx_lV1S82wOAp2pn7qAzA,13801
38
38
  lionagi/core/generic/edge.py,sha256=E0uw1nbviepTtmhxZjIieksE5utZo2Yk1Wn28tmRf1k,4972
39
- lionagi/core/generic/element.py,sha256=lzAH42pqfO4-N8H03fjcKMy1prRI4tZMEDXG_Bc09zU,5722
40
- lionagi/core/generic/graph.py,sha256=Pw-RcZyfzO6d8fKcZlsklyCVso5Ntkwb---GZG1xNuU,11916
41
- lionagi/core/generic/log.py,sha256=6d1Zs9S_C6TxeJvAAIgrzupEwZ1x8M40Z6uGsmeFjyU,4960
39
+ lionagi/core/generic/element.py,sha256=PAqL_7PQPb9PcGHTBz7qZMuN-gcjClSCkQllcBP1pyc,5851
40
+ lionagi/core/generic/graph.py,sha256=5uFU5rEHzzIQRtQrY2BO75wv5ekrFZskTnUK0GnuZJo,11921
41
+ lionagi/core/generic/log.py,sha256=QQfgDSrw6YwHRjYV3kRc6ztnJHTLx0IdV-fjymrmZmQ,4976
42
42
  lionagi/core/generic/log_manager.py,sha256=MLlY2s3_xlDTwntQPdrQOrdbc0V1qwrKpMheSU7Tt3E,10426
43
43
  lionagi/core/generic/node.py,sha256=GYlc2CKVuNLns2_DL7YS2e8Z3CYGDSWsablQSHuUN3Q,236
44
- lionagi/core/generic/pile.py,sha256=Z1u7unyJsQ5wFzRjwjJMIf8H8okr8vOdo567eX7RLFg,29501
45
- lionagi/core/generic/progression.py,sha256=1iPOjkcjY5SaEsNvnd3y6P9t2Bb6mN8pPYtpdlNDvkM,11520
44
+ lionagi/core/generic/pile.py,sha256=wzN6M8XISsnvZs2dsswnRBqwS0CP5VNQ4pmC8BUcd8U,29452
45
+ lionagi/core/generic/progression.py,sha256=mrR9K-q3R5DJ9LtUCHwJ1T8NFdMwuz6vTmG11pX5vLE,11784
46
46
  lionagi/core/generic/types.py,sha256=vcMgOD3puTETk5hpWQBYq1p31e0JnvcqAyKu8zslIdU,615
47
- lionagi/core/generic/utils.py,sha256=PiHSrC1_0zx5R7jjPuU9GfGSKfvNTuRVDbtnXtfg0X8,1407
47
+ lionagi/core/generic/utils.py,sha256=RE_CE1HALogxBDz72tAubVBTvUCUmtox-GdWPkOSvLw,1548
48
48
  lionagi/core/models/__init__.py,sha256=O7nV0tedpUe7_OlUWmCcduGPFtqtzWZcR_SIOnjLsro,134
49
- lionagi/core/models/base.py,sha256=xragc2IBqSYtIoOBJVRc2g8C3GR0gV1ipiFxclkdZWM,2554
50
- lionagi/core/models/field_model.py,sha256=Tdj6c-w78XRtqYxftLB2MeK0-8wE2_TUCr4xYfQ6qQU,4171
51
- lionagi/core/models/new_model_params.py,sha256=i_uVdlPZ7BeLPQhW-d1M3gunZ1ii_HWHYdNg7Gb73VY,6906
52
- lionagi/core/models/note.py,sha256=NeEP3boq4GZqvhOZ_XvbVgSSJT87sQwh8c7KdND-nkw,9424
53
- lionagi/core/models/operable_model.py,sha256=XhwoamKwZUMc2WympWukNvly4ssR-e58kcRMFc5gIDQ,11837
54
- lionagi/core/models/schema_model.py,sha256=1GNCStg10VWyhqjN4ojxs9mt60T5o8I8_ZX7DupJZro,1383
55
- lionagi/core/models/types.py,sha256=I8khSl0c-O2UgYLMss5akvIFscogjfgKTE2sT6Tg50I,270
49
+ lionagi/core/models/base.py,sha256=t1tI1mwcla2YLwKGpKGm1uUH--GQ0W9qrqzZ1SQlZ5k,818
50
+ lionagi/core/models/field_model.py,sha256=iB0UUEY2P7rv25f7CfVlSQDT8ddgPvB-FqYQYwnK5nc,4941
51
+ lionagi/core/models/model_params.py,sha256=iXrNalt6UAY5SH9HSrYBK9Ia-73ZBc6K48btcQNditc,6900
52
+ lionagi/core/models/note.py,sha256=7O8kXxoXeVHHYzmlbLoW0Rd99pYngPZbOpEszIX_fos,9424
53
+ lionagi/core/models/operable_model.py,sha256=zuXDjoNI2-jLFxp3XWITtzIv0-CQ6FO6DQydXZIv0J4,11913
54
+ lionagi/core/models/schema_model.py,sha256=H2tSX3r0U6MDNi929rWmAZy3nUKMP47RG-Ma0O-QYNY,667
55
+ lionagi/core/models/types.py,sha256=elcUuz_9dx4AhZddnICF-Cs62VJWIBqMET7MiRe4c1I,447
56
56
  lionagi/core/session/__init__.py,sha256=v8vNyJVIVj8_Oz9RJdVe6ZKUQMYTgDh1VQpnr1KdLaw,112
57
- lionagi/core/session/branch.py,sha256=MZXmE7Ne8_CGxgS_Jo5Qak3wJdvut4ZXgF2j8zPMstc,4241
58
- lionagi/core/session/branch_mixins.py,sha256=OvN29nHieren4YQQ47VQ3ZfxKPBwIR7_lrxcefSwJLc,19766
59
- lionagi/core/session/session.py,sha256=0DW8HoU_Eqki4UeKIaEuXWBb08N_OkxoDWQyH211M9g,5195
57
+ lionagi/core/session/branch.py,sha256=r6yNXwTm0oYA-9YOereuvLJtDnhj9IJWJ5fjTyKN88U,4406
58
+ lionagi/core/session/branch_mixins.py,sha256=C9lGHmD1AmXAePw0kGIeuZjZ7SzOrFcIwV6rVaGhoGg,19623
59
+ lionagi/core/session/session.py,sha256=Uup50oMqs00ZH6zgEiqtk0pG_ANByHW_Ael07dfbT1M,5122
60
60
  lionagi/core/session/types.py,sha256=MUGTSa2HWK79p7z-CG22RFP07N5AKnPVNXZwZt_wIvU,202
61
- lionagi/core/typing/__init__.py,sha256=THyLLjX2WgKkycQPNxXWWl1BVh7XCrQMuAh8WE4UhP8,226
62
- lionagi/core/typing/concepts.py,sha256=UBsX9ZD6IpWt-roHn7Q8-2Iw6JMHfZkYFrfhmku1sqg,2709
63
- lionagi/core/typing/config.py,sha256=AxvPxVHwxXHH3WNXRf4rf2VIgGBeaW9MUJASL63bVyg,332
64
- lionagi/core/typing/id.py,sha256=gIftkjFxEBLiRsn3g_p9Bo-rq6yxHwOp_12QyVn_1OE,6704
65
- lionagi/core/typing/pydantic_.py,sha256=xMNyT0rDhSpKkEDfzj6GHobqlTtRn48svhmA75LP6gs,653
66
- lionagi/core/typing/typing_.py,sha256=VJj5W6y-JGK1ZzSbyDs4qAuq0cA5wp5HtRgZUsZ50E0,869
61
+ lionagi/core/typing/__init__.py,sha256=Y9BK1OUXzjQgIo3epCVwWqUYhFwQQ_ayhRwI1UOmINg,228
62
+ lionagi/core/typing/_concepts.py,sha256=uIzqfwtPBsIREhvT7NDAowc4i-u-69n_DRzLHzvHZO4,3730
63
+ lionagi/core/typing/_id.py,sha256=6BLrpYxfeb8ZVByc-v3EvAjyidYHY55l3BL_Ndc7mSE,2651
64
+ lionagi/core/typing/_pydantic.py,sha256=xMNyT0rDhSpKkEDfzj6GHobqlTtRn48svhmA75LP6gs,653
65
+ lionagi/core/typing/_typing.py,sha256=VJj5W6y-JGK1ZzSbyDs4qAuq0cA5wp5HtRgZUsZ50E0,869
67
66
  lionagi/integrations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
68
- lionagi/integrations/services.py,sha256=qxffUaPKvp2Bb_LI3Uiyokm7l6ZAbRi0xKxZXCYs67c,498
69
- lionagi/integrations/anthropic_/AnthropicModel.py,sha256=SOqO0xlmOZ9CMl7aEmQylXjDnHJ3c5oyR7POQLrWWGc,9064
67
+ lionagi/integrations/_services.py,sha256=qxffUaPKvp2Bb_LI3Uiyokm7l6ZAbRi0xKxZXCYs67c,498
68
+ lionagi/integrations/anthropic_/AnthropicModel.py,sha256=3Mzw7g6KjCZMzRgURH1AgqUJvmS3AqZaF5k_q4f77j8,9228
70
69
  lionagi/integrations/anthropic_/AnthropicService.py,sha256=Z6fGD2nLEKOm3cDK4Gy0_Vl289KAxX1wswCWsEDpp4E,3656
71
70
  lionagi/integrations/anthropic_/__init__.py,sha256=v8vNyJVIVj8_Oz9RJdVe6ZKUQMYTgDh1VQpnr1KdLaw,112
72
71
  lionagi/integrations/anthropic_/anthropic_max_output_token_data.yaml,sha256=u_CT9UAXoNpbAWuPHMxH9g4erZW7XUwY4vdSXyE86t4,203
@@ -84,7 +83,7 @@ lionagi/integrations/anthropic_/api_endpoints/messages/response/__init__.py,sha2
84
83
  lionagi/integrations/anthropic_/api_endpoints/messages/response/content_models.py,sha256=4J40thUbg3leKZKRy7v_YmS-trW1KVXpLzevt7v3IZ8,1033
85
84
  lionagi/integrations/anthropic_/api_endpoints/messages/response/response_body.py,sha256=96e2GAAiTGkExRullvAsAOGhPPHNByhnv6DK_wz1j40,3213
86
85
  lionagi/integrations/anthropic_/api_endpoints/messages/response/usage_models.py,sha256=s6oe5iOU027M7YPS10upnvcPsuFbTV1ZM00lInHPKvA,695
87
- lionagi/integrations/groq_/GroqModel.py,sha256=8vIHjzcYoIeRvzXQpBDd-ASx6gXckr5qhmUqJJ9UL1g,11721
86
+ lionagi/integrations/groq_/GroqModel.py,sha256=y2KaFe8GmlTBnBRvB09dNjYYhNEjq2wujYfB8YzGNHI,11950
88
87
  lionagi/integrations/groq_/GroqService.py,sha256=v3bn04njIwV7ysOlfLCmapOhHZJy3bNUTr0i12tFqME,4644
89
88
  lionagi/integrations/groq_/__init__.py,sha256=v8vNyJVIVj8_Oz9RJdVe6ZKUQMYTgDh1VQpnr1KdLaw,112
90
89
  lionagi/integrations/groq_/groq_max_output_token_data.yaml,sha256=Y0PbyZ7pyyV1zi7ZJSJGVPsZDhSeN2JMOyghzkqqoKc,559
@@ -97,7 +96,7 @@ lionagi/integrations/groq_/api_endpoints/groq_request.py,sha256=u-GJuu0ZsY7jMWaX
97
96
  lionagi/integrations/groq_/api_endpoints/match_response.py,sha256=95vRKsR1QYPPmBY36dC5azdKn5UlXNRrTQqTUZro_YM,3756
98
97
  lionagi/integrations/groq_/api_endpoints/response_utils.py,sha256=P5kRsGHe-Rx9xejfRcU8q680yotcWLTSaSUuqXATcho,3710
99
98
  lionagi/integrations/litellm_/__init__.py,sha256=v8vNyJVIVj8_Oz9RJdVe6ZKUQMYTgDh1VQpnr1KdLaw,112
100
- lionagi/integrations/litellm_/imodel.py,sha256=8TalouW9bb1TBlbPeRJjySHrR6u9Chgru43qmYTIYBE,2183
99
+ lionagi/integrations/litellm_/imodel.py,sha256=YBaG5f8BavbhooVv7xQXC68K6N7AxPMcUAhgJ1TlYNw,2227
101
100
  lionagi/integrations/ollama_/OllamaModel.py,sha256=5kBYIWShsSpQpSgOxdbRk2_4jmss6Y8iISjUcS3KoWw,8341
102
101
  lionagi/integrations/ollama_/OllamaService.py,sha256=bJ4kk1FPjn_kecLzxTJgVj05KZPzF5FclHoDA3jdAlg,4080
103
102
  lionagi/integrations/ollama_/__init__.py,sha256=v8vNyJVIVj8_Oz9RJdVe6ZKUQMYTgDh1VQpnr1KdLaw,112
@@ -126,7 +125,7 @@ lionagi/integrations/ollama_/api_endpoints/model/list_model.py,sha256=OrGdJa0evj
126
125
  lionagi/integrations/ollama_/api_endpoints/model/pull_model.py,sha256=fiZJcQSRn73SJA9GdlfPBG5RiMISQwBc0y7S_zAlOGA,923
127
126
  lionagi/integrations/ollama_/api_endpoints/model/push_model.py,sha256=yDOMVu3ajdNFT1cuzb4R_3qDxlk0qT4aM2oget3aHZ4,961
128
127
  lionagi/integrations/ollama_/api_endpoints/model/show_model.py,sha256=CclV6pEmm5iYM25ePnMAiicVJmZzolDim7BsQoEJAw0,864
129
- lionagi/integrations/openai_/OpenAIModel.py,sha256=TOQtliWIV_LsfkfmVK8BHVNMnni-jh60EBN1uj73lCI,15816
128
+ lionagi/integrations/openai_/OpenAIModel.py,sha256=4SYgSlz5ZMcpEGf_epF8n4emd7ze1UutTjKDJvZDYcQ,15980
130
129
  lionagi/integrations/openai_/OpenAIService.py,sha256=P0sGnxeWPKe15_KndqCgEdM74AKVJ6NJsgFGORqqlrk,13507
131
130
  lionagi/integrations/openai_/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
132
131
  lionagi/integrations/openai_/openai_max_output_token_data.yaml,sha256=3gd8TGnFjy4AdHzvsV9wZjK_r_o26pe3Th75n5eN2zs,263
@@ -207,7 +206,7 @@ lionagi/integrations/openai_/api_endpoints/uploads/complete_upload.py,sha256=elP
207
206
  lionagi/integrations/openai_/api_endpoints/uploads/create_upload.py,sha256=1RxKMgeAJxnVUz7-EtTK5c0nbMm5AQD-cj_W1Bo4rSI,479
208
207
  lionagi/integrations/openai_/api_endpoints/uploads/uploads_models.py,sha256=QzmbGiuDejCD8Zxqt92fztGy8ROQS3GmlFouXsWvcik,1561
209
208
  lionagi/integrations/openai_/image_token_calculator/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
210
- lionagi/integrations/openai_/image_token_calculator/image_token_calculator.py,sha256=XH5RgB1ZEIGnU9Epbg4x1hO2prO0wUMun-U-iXz4u-s,3022
209
+ lionagi/integrations/openai_/image_token_calculator/image_token_calculator.py,sha256=4ubm_89-v6WTZwbnRMNUDoflhT2PsiBcnNXt556JO6Y,3302
211
210
  lionagi/integrations/openai_/image_token_calculator/openai_image_token_data.yaml,sha256=xKmjPoJGYepK9_zGMTJgjHZiFNc0MuGLm2DF3o9tv70,204
212
211
  lionagi/integrations/pandas_/__init__.py,sha256=DlYvunk0IwQxpLGcro69crklbACEA9sgRLBE79yVGrs,639
213
212
  lionagi/integrations/pandas_/extend_df.py,sha256=G-IpoZFE5v3bZyVl9d06lMeU7pQOqvWrjCurAoEwDiM,2261
@@ -218,7 +217,7 @@ lionagi/integrations/pandas_/save.py,sha256=HBFdPoOJG9cTC_quWw7REWvM1ino_nTD8gSQ
218
217
  lionagi/integrations/pandas_/search_keywords.py,sha256=AJfN8QVu6rUni6As8AOTnzne_rDrsXp-YUduBF1f4wE,2241
219
218
  lionagi/integrations/pandas_/to_df.py,sha256=3vAOCj0Ib2PZNCblg1oA20PjRIrUXR86FHICQLNhLu0,5757
220
219
  lionagi/integrations/pandas_/update_cells.py,sha256=7X1bGcPvnEINrLM_zFCWUXIkrFdMGV3TjoEYBq_SThs,1658
221
- lionagi/integrations/perplexity_/PerplexityModel.py,sha256=FfOR3WwOgZZEw97mai3D9PJS5C1jsZii2tAX5n0IR8s,9171
220
+ lionagi/integrations/perplexity_/PerplexityModel.py,sha256=06kURklzmc3f-TPwdB3a2zbYttfBTSlBrgZG_Tkw680,9335
222
221
  lionagi/integrations/perplexity_/PerplexityService.py,sha256=q5Ruy60H3cL2a4LOUjB2JI6bkMwKiWVSlrjpATREwqM,3641
223
222
  lionagi/integrations/perplexity_/__init__.py,sha256=v8vNyJVIVj8_Oz9RJdVe6ZKUQMYTgDh1VQpnr1KdLaw,112
224
223
  lionagi/integrations/perplexity_/perplexity_max_output_token_data.yaml,sha256=SY6nDrDRhI_HzEBYHaANR_Mc5GRa0SY9Pw_wRuVBlV4,121
@@ -238,7 +237,7 @@ lionagi/integrations/pydantic_/break_down_annotation.py,sha256=q9zjhoJkvYjjpfLH_
238
237
  lionagi/integrations/pydantic_/new_model.py,sha256=MtlQ86kYeYApAxPLvsXVCDNMKQsFVUvIEcHqbY3SQ7o,6576
239
238
  lionagi/libs/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
240
239
  lionagi/libs/constants.py,sha256=nxZbZVo2msiYDsWMRth_VuqVLaa4CbqaM4CAn0zYXcM,2199
241
- lionagi/libs/utils.py,sha256=2gyPZBDMw8Zqqy4X6lxbeImdVoSmf0gZSl34mVmXH6M,7447
240
+ lionagi/libs/utils.py,sha256=dr-UxZw_XUoNUdvy2HGHWaW3YzTsR23fVkD4Hv-oJtU,7652
242
241
  lionagi/libs/compress/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
243
242
  lionagi/libs/compress/models.py,sha256=AX6BElvEnnYnCnZzTlJUXknhVGrSTpDHO7DBkSKH0v8,1773
244
243
  lionagi/libs/compress/utils.py,sha256=-U54mWr9_u19BYaS_VNCPCRQQ4kDgB4x4_WNr1WGR8U,2289
@@ -257,12 +256,12 @@ lionagi/libs/func/params.py,sha256=y9duFaU7yQ_2cHHln8wbEGhwrKRHhjLwjHhpduEm8Rs,1
257
256
  lionagi/libs/func/throttle.py,sha256=iOOmS6i81NGRCClf4WaIhMMXwPt_rZ6WXYBqMJ_weEE,3418
258
257
  lionagi/libs/func/types.py,sha256=wdjGNmY82pVACQBuDMUt3XJO0G9_wKHR7VesOeMxo_A,831
259
258
  lionagi/libs/func/utils.py,sha256=-LMdUEjksXP6JjjcUBh0XEQiXF30Zmv3xpKbmXjfya8,2674
260
- lionagi/libs/func/async_calls/__init__.py,sha256=CuMBwJxb9wzq9vcmt72LTlOqmXnBYxDY47R9Ks-6uO8,397
261
- lionagi/libs/func/async_calls/alcall.py,sha256=9yxLmlXPh_ScfMF9H52qoIapvntvA4NLYmd51GSRLak,5825
262
- lionagi/libs/func/async_calls/bcall.py,sha256=7lFLl39sSurK3-Tmtv_QKvhEaBrEV9pLTzKK-t90Nrs,2902
259
+ lionagi/libs/func/async_calls/__init__.py,sha256=qDHIkH7B-Ka5NJqeeyu_YL3TY36xL8kBwTjtCR4H8AU,495
260
+ lionagi/libs/func/async_calls/alcall.py,sha256=U8-lWwqNwhe50Q07kzyW4YVcbx_LkUN5X1K1zvFg7i0,7283
261
+ lionagi/libs/func/async_calls/bcall.py,sha256=gwfKpRZkExjVn-1YGZfaboFES8RqUgyaBrdpNtz1IdY,4436
263
262
  lionagi/libs/func/async_calls/mcall.py,sha256=9O5gWbBT4iIqXfcdZjgAdqsOSLWrNS4_tt6ou231ozA,4607
264
263
  lionagi/libs/func/async_calls/pcall.py,sha256=6u3RJPV-3yOkWxC9iSoVFl1veFfZFJpR0QRyGtfBODI,5831
265
- lionagi/libs/func/async_calls/rcall.py,sha256=8EtcnFYF2oQHn6Vs_zS7q-5MgfE4qWbSeyEZEBq9rj0,6188
264
+ lionagi/libs/func/async_calls/rcall.py,sha256=pe4flHq88mpalMxloal72GbczALI4PlyixppaA5JxyY,7127
266
265
  lionagi/libs/func/async_calls/tcall.py,sha256=3Kz30kiSts6smZ_x_RRY1gBxpo8p5GwqEMnoamEbWXk,4033
267
266
  lionagi/libs/func/async_calls/ucall.py,sha256=PuV4YZeSMUaSiW8lkHpeA4W-TKU2YH7KZYqx1E6O0y8,2655
268
267
  lionagi/libs/package/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -318,56 +317,58 @@ lionagi/libs/string_similarity/utils.py,sha256=NdD0qF5tuytWBsm0WMrH0gRBBSxw2p4-m
318
317
  lionagi/operations/__init__.py,sha256=Dt7o6DFP7zVR-uxZ4xsGHQcse3XVlF6S8Y9NhaUTn_4,68
319
318
  lionagi/operations/utils.py,sha256=kn5SkZRczl1aQ-vJBeVPlMdeyUUD0s5iyuAW4P6KOvQ,1164
320
319
  lionagi/operations/brainstorm/__init__.py,sha256=amsoH65wepsx58DfgH-TRTN1wDH5TC24qYI_f02zkVg,61
321
- lionagi/operations/brainstorm/brainstorm.py,sha256=zrwGlIapbwGC34rFNzLcjg4b60W3uxQT_diV36c3zdA,6273
322
- lionagi/operations/brainstorm/prompt.py,sha256=95t8SEEzaaEj0x0l5H5HsWaHSiPn-YqH9GaxaQYX0Dw,459
320
+ lionagi/operations/brainstorm/brainstorm.py,sha256=H2D0ZBCbRA2Ig60IHuXhyH6Hu02jxKhbj028UtS4eik,6279
321
+ lionagi/operations/brainstorm/prompt.py,sha256=3a7LsmtiqGAK5mtWoX-2qhsjETBzBx8FxM3cFCBEoOo,497
323
322
  lionagi/operations/plan/__init__.py,sha256=SVqoVmlSGz9lsLztm487H2qOLwgyFxSi2yZ8ubn-bgE,43
324
- lionagi/operations/plan/plan.py,sha256=SzQ2mRDlz1qvVSYpeMQhGvDtyaweuQQlhyJCoLh3w9A,5611
325
- lionagi/operations/plan/prompt.py,sha256=ze79yFvZ_mBz4m-nS5ly9IK2PC43xl87_hfbwfj5jkw,763
323
+ lionagi/operations/plan/plan.py,sha256=Ui8fFdRNLiD3RJmnKCwfY48yj0Fxxw2LBye0egYttWE,5611
324
+ lionagi/operations/plan/prompt.py,sha256=sKHa_jDahzCJ60oILj1XNYCIlbS-H8ybKRXpf9zd5x0,880
326
325
  lionagi/operations/select/__init__.py,sha256=dUd-KS1l404_ueYlIQsVNhS9jAqjn5pJbtUEbbh6KlI,49
327
326
  lionagi/operations/select/prompt.py,sha256=wbmuDC96fcQ4LFKjqmeErOQwVRpGWRqcwUeLTWnbeNs,186
328
327
  lionagi/operations/select/select.py,sha256=2lQ8el8bQV1kaUF-r5IBfgaGhD2bvrLd9zwfqvcWYgk,3164
329
328
  lionagi/operations/select/utils.py,sha256=JYx-AwR9m9KyUmCwfNm3NAQ6NKYzc3Ti_mV6_f8G_MI,3258
330
- lionagi/protocols/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
329
+ lionagi/protocols/__init__.py,sha256=v8vNyJVIVj8_Oz9RJdVe6ZKUQMYTgDh1VQpnr1KdLaw,112
331
330
  lionagi/protocols/adapters/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
332
331
  lionagi/protocols/adapters/adapter.py,sha256=pOnp30ND8rGdotJTIItXG9EDwqJuFO9zp5ShyiqPezk,2250
333
332
  lionagi/protocols/adapters/json_adapter.py,sha256=yCt_GgR6WJfjFWBqeCb6HPtJ0slfepBJi8O0VUeEW8Y,936
334
333
  lionagi/protocols/adapters/pandas_adapter.py,sha256=-ypnH2XAROyIjTv9yrzFpPgqwur67hWAOEubI24Ncpk,2679
335
- lionagi/protocols/configs/__init__.py,sha256=8CFN8Lv6F0aJ4Xy7pslnpNTe18dBFaddvzOrAsZuOp0,383
336
- lionagi/protocols/configs/branch_config.py,sha256=gUcbT0l1lh2wMoiM1RvmBYma3YdhrsF-oso3cbb9hbU,2727
334
+ lionagi/protocols/configs/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
335
+ lionagi/protocols/configs/branch_config.py,sha256=ypsIQycjDSTcGxAfp1k3gSnkvuFJOCJxdUY2ZloRTb4,2727
337
336
  lionagi/protocols/configs/id_config.py,sha256=hkYNorTUfgD3t-kGCQuxi6RGIqsUAn-0RXXxzGCiXxs,360
338
- lionagi/protocols/configs/imodel_config.py,sha256=WEelayVt3GbgDgna-EjgQlXgJZzQOx1AlGcMrWJ2OBg,2317
339
- lionagi/protocols/configs/log_config.py,sha256=ZPi_D2DFyVTgzoA2yEfqWXkpB0bdkf9dHZstqeNkWAE,2995
337
+ lionagi/protocols/configs/imodel_config.py,sha256=ctZ9RisIEJe-EpwXg-co15MY4UEvHBmAVQokfSHe4Cc,2317
338
+ lionagi/protocols/configs/log_config.py,sha256=Zfrh0DTem-PrTHgXyFepXsz34bEwlwH5I59iqSekqGY,2995
340
339
  lionagi/protocols/configs/retry_config.py,sha256=pZwV-iV7YoyPpJgSJTbIXYjOKQjzudnZ7dsSOuy3ZSw,843
341
- lionagi/protocols/operatives/__init__.py,sha256=SZElTB0uORZ8EvGpSf6thJGCbKgKjiKx9Bl8zbBUfYM,350
342
- lionagi/protocols/operatives/action.py,sha256=BtV9MY544TxXLxskyC1Hj8Rz1dxbfcSpmFW5p8nxlIg,4741
343
- lionagi/protocols/operatives/instruct.py,sha256=ZTxaFep2XUtv2Dgb3hwD4qf-IVPKHrBHsvXHYPJxcak,5198
344
- lionagi/protocols/operatives/operative.py,sha256=ejoOBEnxUOgPx_tj-cAm_al-mH3MWF5D5sXJ0SAlDGM,7111
345
- lionagi/protocols/operatives/prompts.py,sha256=1H22Xyv-HQzaZq54v10d_iwdLR7hy5X4lobBdU2aXZY,8871
346
- lionagi/protocols/operatives/reason.py,sha256=rVTMuDzwqSr3wYXsPXYY5pU7iQNy9qeBkcYGZN-Z-ZU,1328
347
- lionagi/protocols/operatives/step.py,sha256=gX-ahLbsaHPvrIINnOH19IUx2BBXt14n1GpMjeSaZ2I,8652
348
- lionagi/protocols/registries/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
349
- lionagi/protocols/registries/_component_registry.py,sha256=MRA8bAgmjqNsFUnzq1I7JuqOGQa1WZrkzWeHq59pY_I,453
350
- lionagi/protocols/registries/_pile_registry.py,sha256=iHiQsd0dapzu7L2YA-VPo7qAw6gjWdDETKe_zh1zhHk,543
351
- lionagi/service/__init__.py,sha256=xuMab03l9QSeBmq0GXjkTE-Oh2R10l0aful5swKrjas,296
340
+ lionagi/protocols/configs/types.py,sha256=8CFN8Lv6F0aJ4Xy7pslnpNTe18dBFaddvzOrAsZuOp0,383
341
+ lionagi/protocols/operatives/__init__.py,sha256=v8vNyJVIVj8_Oz9RJdVe6ZKUQMYTgDh1VQpnr1KdLaw,112
342
+ lionagi/protocols/operatives/action.py,sha256=cWIyehhB750Sp1w9jPTV-DXcQRLhCFNp2TXHysQvGLU,4854
343
+ lionagi/protocols/operatives/instruct.py,sha256=XCIkNkuP0Dd7ZOnCpuC2iYuufW9_H8ue5imyqduqQgs,5142
344
+ lionagi/protocols/operatives/operative.py,sha256=jGsnPSn7LeJE9H-fGjHYIY2N_QgclZpmch8tlshUMcg,6620
345
+ lionagi/protocols/operatives/prompts.py,sha256=JRJBPiAAccB50sGY2FDIDvSehfc-sCbYLgWmH4BUwBs,2978
346
+ lionagi/protocols/operatives/reason.py,sha256=i5iIr0xdMISbrJ_u6fQO4MZy0aceX8nYcETVfHILh-8,1441
347
+ lionagi/protocols/operatives/step.py,sha256=ePFmRyuJ0v_X9BVgzkFAv8afqnic6Zmjt4MGzlCeLpk,8155
348
+ lionagi/protocols/operatives/types.py,sha256=SPFX2EHHoJF2ZMgxoJrNlf02QlcAk7ijup6kY5GhrK0,463
349
+ lionagi/protocols/registries/__init__.py,sha256=v8vNyJVIVj8_Oz9RJdVe6ZKUQMYTgDh1VQpnr1KdLaw,112
350
+ lionagi/protocols/registries/_component_registry.py,sha256=C04oie1-CQJCoXsjZ6hYAIMRySriAFzROA9CPfO0Isg,566
351
+ lionagi/protocols/registries/_pile_registry.py,sha256=l2RbkjW6OGOHsgPIq9OitIi27r8Fk0vziMI8N_tP3nQ,656
352
+ lionagi/service/__init__.py,sha256=AQS0ezBCtjZOUbT_QEH-Ev5l41-Pk0_KgmKHUgf_Y_A,375
352
353
  lionagi/service/complete_request_info.py,sha256=V9cWqmQ-fo952EWCooAvezaM_xuxYU4Xy0Jo_0XJnug,301
353
354
  lionagi/service/imodel.py,sha256=laiwc4FvO0jHpf7Q9GrL0VIABCIInkn0ld8XUcbabKo,4191
354
355
  lionagi/service/rate_limiter.py,sha256=1cCtKfpOo_8h4ZN-oX5HXtnq0iGjF1rxi8htyu65kMU,3746
355
356
  lionagi/service/service.py,sha256=58FPZzLM85fNm4WgSzmZRwbHHuLUW1K0VagKZ7A2ZAs,1077
356
- lionagi/service/service_match_util.py,sha256=Re2zJgqsBV9LnDcn5N9pUGMQB_O8-jCTR3ZH6-nxFds,4301
357
+ lionagi/service/service_match_util.py,sha256=gjGzfQeQqkyxMrKx8aINS47r3Pmugbcx8JjmvbEBg7Y,4305
357
358
  lionagi/service/service_util.py,sha256=z0tU_wAgWq_gDfm_QeNfDbrsmseumoNxVQ1bEpOCBzg,2985
358
359
  lionagi/service/token_calculator.py,sha256=6FQ7GvCq4nBo_7QbNyekYJmQrVIzL0CNwiztK3QSR3M,1486
359
360
  lionagi/strategies/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
360
- lionagi/strategies/base.py,sha256=xDsX5-LOypAJ65F1_Tk9Gqows7DFxgL_xoXvNUC7OwU,1723
361
- lionagi/strategies/concurrent.py,sha256=_prVllDu6WRreUn9nqBHclOXf8NrvfrewTAqH2nGLwI,2592
362
- lionagi/strategies/concurrent_chunk.py,sha256=NhJBbt83pQvhS9GDyRknr9PprGGb2KcPEQZhQdDj5Ro,1582
363
- lionagi/strategies/concurrent_sequential_chunk.py,sha256=eTOdbOIlkfwiX-CYyEtJ9_-o0F6I19ORN7IyIQxrzIE,3529
364
- lionagi/strategies/params.py,sha256=aHfeoaOiyIYx-CXbbo_NbWdyoeC4kU8lzpBPMT2N4So,4826
361
+ lionagi/strategies/base.py,sha256=l8ZQDHOW9eWrWJrsQFvci3PKuog9S697ulwO3o-y30M,1711
362
+ lionagi/strategies/concurrent.py,sha256=mrpRfxIxsC0u7JCx2P39Kcnlp7x20cLAdFD4k03hETw,2657
363
+ lionagi/strategies/concurrent_chunk.py,sha256=V4Ydg4IWe91OXLJAxc3yhQN8gVySj3tpotwvmeOQxmY,1612
364
+ lionagi/strategies/concurrent_sequential_chunk.py,sha256=iN0tPj5II1vg1XvM1--zi1hgALi1mz1GTjfLs1v8a1w,3558
365
+ lionagi/strategies/params.py,sha256=KsPtRcX-tM1aphyfLZdDnjnkT6fZHQ5ZewWtf4_Ch4U,4859
365
366
  lionagi/strategies/sequential.py,sha256=pd6MQwCeHDJzC9cNwC6LDtPmrutD_gAo46sOlO_CJR0,822
366
367
  lionagi/strategies/sequential_chunk.py,sha256=jG_WZXG-Ra3yd30CmX4b3XeCNAUrZGA2-i8pSPZGZy0,3032
367
368
  lionagi/strategies/sequential_concurrent_chunk.py,sha256=H7GShaqYlD5XxNJMG2GdOR4Vl8JHDhZb5jxNq8zY0hI,3365
368
369
  lionagi/strategies/types.py,sha256=fEvE4d1H4SeCcXcd2dz3q4k8jFIBtxYzjxDN7eJRLtI,769
369
370
  lionagi/strategies/utils.py,sha256=DX1dvxia8cNRqEJJbssJ3mgRzo7kgWCTA4y5DYLCCZE,1281
370
- lionagi-0.5.1.dist-info/METADATA,sha256=FkuZDqqzBAOOQ-y96QXAK_E__O5tbVZAhxIsQggkL7U,22672
371
- lionagi-0.5.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
372
- lionagi-0.5.1.dist-info/licenses/LICENSE,sha256=VXFWsdoN5AAknBCgFqQNgPWYx7OPp-PFEP961zGdOjc,11288
373
- lionagi-0.5.1.dist-info/RECORD,,
371
+ lionagi-0.5.3.dist-info/METADATA,sha256=EDYWV82gJQWvmwXKbRLUaJjEGQ20B2DL-3emvuhdchg,22736
372
+ lionagi-0.5.3.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
373
+ lionagi-0.5.3.dist-info/licenses/LICENSE,sha256=VXFWsdoN5AAknBCgFqQNgPWYx7OPp-PFEP961zGdOjc,11288
374
+ lionagi-0.5.3.dist-info/RECORD,,
@@ -1,15 +0,0 @@
1
- # Copyright (c) 2023 - 2024, HaiyangLi <quantocean.li at gmail dot com>
2
- #
3
- # SPDX-License-Identifier: Apache-2.0
4
-
5
- from pydantic import BaseModel
6
-
7
-
8
- class LionIDConfig(BaseModel):
9
- n: int
10
- random_hyphen: bool
11
- num_hyphens: int
12
- hyphen_start_index: int
13
- hyphen_end_index: int
14
- prefix: str = "ln"
15
- postfix: str = ""
lionagi/core/typing/id.py DELETED
@@ -1,221 +0,0 @@
1
- # Copyright (c) 2023 - 2024, HaiyangLi <quantocean.li at gmail dot com>
2
- #
3
- # SPDX-License-Identifier: Apache-2.0
4
-
5
- from lionagi.libs.utils import insert_random_hyphens, unique_hash
6
- from lionagi.settings import LionIDConfig, Settings
7
-
8
- from .concepts import Container, Generic, ItemError, Observable, Ordering, T
9
- from .pydantic_ import Field
10
- from .typing_ import Annotated, Container, Mapping, Sequence, TypeAlias
11
-
12
- LnID: TypeAlias = Annotated[str, Field(description="A unique identifier.")]
13
-
14
-
15
- class IDError(ItemError):
16
- """Exception raised when an item does not have a Lion ID."""
17
-
18
- def __init__(
19
- self,
20
- message: str = "Item must contain a Lion ID.",
21
- item_id: str | None = None,
22
- ):
23
- super().__init__(message, item_id)
24
-
25
-
26
- class ID(Generic[T]):
27
- """
28
- A generic class that provides ID-related functionality for Observable objects.
29
-
30
- This class handles the generation, validation, and management of unique identifiers
31
- within the Lion system. It provides type aliases for various ID-related operations
32
- and methods for working with IDs.
33
- """
34
-
35
- # For functions that accept either ID or item
36
- Ref: TypeAlias = LnID | T # type: ignore
37
-
38
- # For functions requiring just the ID
39
- ID: TypeAlias = LnID
40
-
41
- # For functions requiring Observable object
42
- Item = T # type: ignore
43
-
44
- # For collections
45
- IDSeq: TypeAlias = Sequence[LnID] | Ordering[LnID]
46
- ItemSeq: TypeAlias = ( # type: ignore
47
- Sequence[T] | Mapping[LnID, T] | Container[LnID | T]
48
- )
49
- RefSeq: TypeAlias = IDSeq | ItemSeq
50
-
51
- # For system-level interactions
52
- SenderRecipient: TypeAlias = LnID | T # type: ignore
53
-
54
- @staticmethod
55
- def id(
56
- config: LionIDConfig = Settings.Config.ID,
57
- n: int = None,
58
- prefix: str = None,
59
- postfix: str = None,
60
- random_hyphen: bool = None,
61
- num_hyphens: int = None,
62
- hyphen_start_index: int = None,
63
- hyphen_end_index: int = None,
64
- ) -> LnID:
65
- """
66
- Generate a unique identifier.
67
-
68
- Args:
69
- n: Length of the ID (excluding prefix and postfix).
70
- prefix: String to prepend to the ID.
71
- postfix: String to append to the ID.
72
- random_hyphen: If True, insert random hyphens into the ID.
73
- num_hyphens: Number of hyphens to insert if random_hyphen is True.
74
- hyphen_start_index: Start index for hyphen insertion.
75
- hyphen_end_index: End index for hyphen insertion.
76
-
77
- Returns:
78
- A unique identifier string.
79
- """
80
- _dict = {
81
- "n": n,
82
- "prefix": prefix,
83
- "postfix": postfix,
84
- "random_hyphen": random_hyphen,
85
- "num_hyphens": num_hyphens,
86
- "hyphen_start_index": hyphen_start_index,
87
- "hyphen_end_index": hyphen_end_index,
88
- }
89
- _dict = {k: v for k, v in _dict.items() if v is not None}
90
- config = {**config.to_dict(), **_dict}
91
- return ID._id(**config)
92
-
93
- @staticmethod
94
- def _id(
95
- *,
96
- n: int,
97
- prefix: str = "",
98
- postfix: str = "",
99
- random_hyphen: bool = False,
100
- num_hyphens: int = 0,
101
- hyphen_start_index: int = 6,
102
- hyphen_end_index: int = -6,
103
- ):
104
- _id = unique_hash(n)
105
- if random_hyphen:
106
- _id = insert_random_hyphens(
107
- s=_id,
108
- num_hyphens=num_hyphens,
109
- start_index=hyphen_start_index,
110
- end_index=hyphen_end_index,
111
- )
112
- if prefix:
113
- _id = f"{prefix}{_id}"
114
- if postfix:
115
- _id = f"{_id}{postfix}"
116
-
117
- return _id
118
-
119
- @staticmethod
120
- def get_id(
121
- item,
122
- config: LionIDConfig = Settings.Config.ID,
123
- /,
124
- ) -> str:
125
- """
126
- Get the Lion ID of an item.
127
-
128
- Args:
129
- item: The item to get the ID from.
130
- config: Configuration dictionary for ID validation.
131
-
132
- Returns:
133
- The Lion ID of the item.
134
-
135
- Raises:
136
- LionIDError: If the item does not contain a valid Lion ID.
137
- """
138
-
139
- item_id = None
140
- if isinstance(item, Sequence) and len(item) == 1:
141
- item = item[0]
142
-
143
- if isinstance(item, Observable):
144
- item_id: str = item.ln_id
145
- else:
146
- item_id = item
147
-
148
- check = isinstance(item_id, str)
149
- if check:
150
- id_len = (
151
- (len(config.prefix) if config.prefix else 0)
152
- + config.n
153
- + config.num_hyphens
154
- + (len(config.postfix) if config.postfix else 0)
155
- )
156
- if len(item_id) != id_len:
157
- check = False
158
- if check and config.prefix:
159
- if item_id.startswith(config.prefix):
160
- item_id = item_id[len(config.prefix) :] # noqa
161
- else:
162
- check = False
163
- if check and config.postfix:
164
- if item_id.endswith(config.postfix):
165
- item_id = item_id[: -len(config.postfix)]
166
- else:
167
- check = False
168
- if check and config.num_hyphens:
169
- if config.num_hyphens != item_id.count("-"):
170
- check = False
171
- if check and config.hyphen_start_index:
172
- idx = config.hyphen_start_index - len(config.prefix)
173
- if idx > 0 and "-" in item_id[:idx]:
174
- check = False
175
- if check and config.hyphen_end_index:
176
- if config.hyphen_end_index < 0:
177
- idx = config.hyphen_end_index + id_len
178
- idx -= len(config.prefix + config.postfix)
179
- if idx < 0 and "-" in item_id[idx:]:
180
- check = False
181
-
182
- if check:
183
- return config.prefix + item_id + config.postfix
184
- if (
185
- isinstance(item_id, str) and len(item_id) == 32
186
- ): # for backward compatibility
187
- return item_id
188
- raise IDError(
189
- f"The input object of type <{type(item).__name__}> does "
190
- "not contain or is not a valid Lion ID. Item must be an instance"
191
- " of `Observable` or a valid `ln_id`."
192
- )
193
-
194
- @staticmethod
195
- def is_id(
196
- item,
197
- config: LionIDConfig = Settings.Config.ID,
198
- /,
199
- ) -> bool:
200
- """
201
- Check if an item is a valid Lion ID.
202
-
203
- Args:
204
- item: The item to check.
205
- config: Configuration dictionary for ID validation.
206
-
207
- Returns:
208
- True if the item is a valid Lion ID, False otherwise.
209
- """
210
- try:
211
- ID.get_id(item, config)
212
- return True
213
- except IDError:
214
- return False
215
-
216
-
217
- __all__ = [
218
- "LnID",
219
- "ID",
220
- "IDError",
221
- ]
File without changes
File without changes
File without changes