lionagi 0.3.6__py3-none-any.whl → 0.3.8__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.
@@ -0,0 +1,144 @@
1
+ import logging
2
+ from typing import Any
3
+
4
+ import numpy as np
5
+ from lion_core.session.branch import Branch
6
+ from lion_service import iModel
7
+ from lionfuncs import to_num
8
+ from pydantic import BaseModel, ConfigDict, Field, field_validator
9
+
10
+ from .config import DEFAULT_CHAT_CONFIG
11
+
12
+ PROMPT = "Please follow prompt and provide {num_scores} numeric score(s) in {score_range} for the given context. Return as {return_precision} format"
13
+
14
+
15
+ class ScoreModel(BaseModel):
16
+
17
+ score: list | float = Field(
18
+ default_factory=list,
19
+ description="** A numeric score or a list of numeric scores.**",
20
+ )
21
+
22
+ model_config = ConfigDict(
23
+ population_by_field_name=True,
24
+ arbitrary_types_allowed=True,
25
+ )
26
+
27
+ @field_validator("score", mode="before")
28
+ def validate_score(cls, value) -> list:
29
+ return [value] if not isinstance(value, list) else value
30
+
31
+
32
+ async def score(
33
+ score_range=(1, 10),
34
+ instruction=None,
35
+ guidance=None,
36
+ context=None,
37
+ system=None,
38
+ reason: bool = False,
39
+ actions: bool = False,
40
+ tools: Any = None,
41
+ imodel: iModel = None,
42
+ branch: Branch = None,
43
+ sender=None,
44
+ recipient=None,
45
+ clear_messages: bool = False,
46
+ system_sender=None,
47
+ system_datetime=None,
48
+ return_branch=False,
49
+ num_parse_retries: int = 0,
50
+ retry_imodel: iModel = None,
51
+ num_scores: int = 1,
52
+ use_average: bool = False,
53
+ precision: int = 0,
54
+ default_score=np.nan,
55
+ **kwargs,
56
+ ) -> ScoreModel:
57
+
58
+ if branch and branch.imodel:
59
+ imodel = imodel or branch.imodel
60
+ else:
61
+ imodel = imodel or iModel(**DEFAULT_CHAT_CONFIG)
62
+
63
+ branch = branch or Branch(imodel=imodel)
64
+
65
+ return_precision = "integer" if precision == 0 else f"num:{precision}f"
66
+ prompt = PROMPT.format(
67
+ num_scores=num_scores,
68
+ score_range=score_range,
69
+ return_precision=return_precision,
70
+ )
71
+ if instruction:
72
+ prompt = f"{instruction}\n\n{prompt} \n\n "
73
+
74
+ if system:
75
+ branch.add_message(
76
+ system=system,
77
+ system_datetime=system_datetime,
78
+ sender=system_sender,
79
+ )
80
+
81
+ _context = [{"operation": prompt}]
82
+ if context:
83
+ _context.append(context)
84
+
85
+ kwargs["frozen"] = False
86
+ response = await branch.operate(
87
+ instruction=instruction,
88
+ guidance=guidance,
89
+ context=_context,
90
+ sender=sender,
91
+ recipient=recipient,
92
+ reason=reason,
93
+ actions=actions,
94
+ tools=tools,
95
+ clear_messages=clear_messages,
96
+ operative_model=ScoreModel,
97
+ imodel=imodel,
98
+ retry_imodel=retry_imodel,
99
+ num_parse_retries=num_parse_retries,
100
+ **kwargs,
101
+ )
102
+
103
+ return_kind = int if precision == 0 else float
104
+ err = None
105
+ try:
106
+ if isinstance(response, dict):
107
+ response = ScoreModel(**response)
108
+
109
+ response.score = [
110
+ to_num(
111
+ i,
112
+ upper_bound=score_range[1],
113
+ lower_bound=score_range[0],
114
+ num_type=return_kind,
115
+ precision=precision,
116
+ num_count=num_scores,
117
+ )
118
+ for i in response.score
119
+ ]
120
+ if use_average:
121
+ scores = response.score
122
+ scores = [scores] if not isinstance(scores, list) else scores
123
+ response.score = np.mean(scores)
124
+
125
+ if response.score and num_scores == 1:
126
+ if isinstance(response.score, list):
127
+ response.score = response.score[0]
128
+
129
+ if return_branch:
130
+ return response, branch
131
+ return response
132
+
133
+ except Exception as e:
134
+ err = e
135
+ pass
136
+
137
+ logging.error(
138
+ f"Error converting score to {return_kind}: {err}, "
139
+ f"value is set to default: {default_score}"
140
+ )
141
+ response.score = default_score
142
+ if return_branch:
143
+ return response, branch
144
+ return response
@@ -0,0 +1,141 @@
1
+ from __future__ import annotations
2
+
3
+ import inspect
4
+ from collections.abc import Callable
5
+ from enum import Enum
6
+ from typing import Any
7
+
8
+ from lion_core.session.branch import Branch
9
+ from lion_service import iModel
10
+ from lionfuncs import string_similarity
11
+ from pydantic import BaseModel, Field
12
+
13
+ from lionagi.libs.sys_util import SysUtil
14
+
15
+ from .config import DEFAULT_CHAT_CONFIG
16
+
17
+ PROMPT = "Please select up to {max_num_selections} items from the following list {choices}. Provide the selection(s) into appropriate field in format required, and no comments from you"
18
+
19
+
20
+ class SelectionModel(BaseModel):
21
+ selected: list[str | Enum] = Field(default_factory=list)
22
+
23
+
24
+ async def select(
25
+ choices: list[str] | type[Enum],
26
+ max_num_selections: int = 1,
27
+ instruction=None,
28
+ guidance=None,
29
+ context=None,
30
+ system=None,
31
+ reason: bool = False,
32
+ actions: bool = False,
33
+ tools: Any = None,
34
+ imodel: iModel = None,
35
+ branch: Branch = None,
36
+ sender=None,
37
+ recipient=None,
38
+ return_enum: bool = False,
39
+ enum_parser: Callable = None, # parse the model string response to appropriate type
40
+ clear_messages: bool = False,
41
+ system_sender=None,
42
+ system_datetime=None,
43
+ return_branch=False,
44
+ num_parse_retries: int = 3,
45
+ retry_imodel: iModel = None,
46
+ branch_user=None,
47
+ **kwargs,
48
+ ) -> SelectionModel | tuple[SelectionModel, Branch]:
49
+
50
+ if branch and branch.imodel:
51
+ imodel = imodel or branch.imodel
52
+ else:
53
+ imodel = imodel or iModel(**DEFAULT_CHAT_CONFIG)
54
+
55
+ selections = []
56
+ if return_enum and not _is_enum(choices):
57
+ raise ValueError("return_enum can only be True if choices is an Enum")
58
+
59
+ if _is_enum(choices):
60
+ selections = [selection.value for selection in choices]
61
+ else:
62
+ selections = choices
63
+
64
+ prompt = PROMPT.format(
65
+ max_num_selections=max_num_selections, choices=selections
66
+ )
67
+
68
+ if instruction:
69
+ prompt = f"{instruction}\n\n{prompt} \n\n "
70
+
71
+ branch = branch or Branch(imodel=imodel)
72
+ if branch_user:
73
+ try:
74
+ a = SysUtil.get_id(branch_user)
75
+ branch.user = a
76
+ except:
77
+ branch.user = branch_user
78
+ if system:
79
+ branch.add_message(
80
+ system=system,
81
+ system_datetime=system_datetime,
82
+ system_sender=system_sender,
83
+ )
84
+
85
+ kwargs["frozen"] = False
86
+ response_model: SelectionModel = await branch.operate(
87
+ instruction=prompt,
88
+ guidance=guidance,
89
+ context=context,
90
+ sender=sender,
91
+ recipient=recipient,
92
+ reason=reason,
93
+ actions=actions,
94
+ operative_model=SelectionModel,
95
+ clear_messages=clear_messages,
96
+ imodel=imodel,
97
+ num_parse_retries=num_parse_retries,
98
+ retry_imodel=retry_imodel,
99
+ tools=tools,
100
+ **kwargs,
101
+ )
102
+
103
+ selected = response_model
104
+ if isinstance(response_model, BaseModel) and hasattr(
105
+ response_model, "selected"
106
+ ):
107
+ selected = response_model.selected
108
+ selected = [selected] if not isinstance(selected, list) else selected
109
+ corrected_selections = [
110
+ string_similarity(
111
+ word=selection,
112
+ correct_words=selections,
113
+ return_most_similar=True,
114
+ )
115
+ for selection in selected
116
+ ]
117
+
118
+ if return_enum:
119
+ out = []
120
+ if not enum_parser:
121
+ enum_parser = lambda x: x
122
+ for selection in corrected_selections:
123
+ selection = enum_parser(selection)
124
+ for member in choices.__members__.values():
125
+ if member.value == selection:
126
+ out.append(member)
127
+ corrected_selections = out
128
+
129
+ if isinstance(response_model, BaseModel):
130
+ response_model.selected = corrected_selections
131
+
132
+ elif isinstance(response_model, dict):
133
+ response_model["selected"] = corrected_selections
134
+
135
+ if return_branch:
136
+ return response_model, branch
137
+ return response_model
138
+
139
+
140
+ def _is_enum(choices):
141
+ return inspect.isclass(choices) and issubclass(choices, Enum)
lionagi/version.py CHANGED
@@ -1 +1 @@
1
- __version__ = "0.3.6"
1
+ __version__ = "0.3.8"
@@ -0,0 +1,241 @@
1
+ Metadata-Version: 2.1
2
+ Name: lionagi
3
+ Version: 0.3.8
4
+ Summary: Towards automated general intelligence.
5
+ Author: HaiyangLi
6
+ Author-email: quantocean.li@gmail.com
7
+ Requires-Python: >=3.10,<4.0
8
+ Classifier: Programming Language :: Python :: 3
9
+ Classifier: Programming Language :: Python :: 3.10
10
+ Classifier: Programming Language :: Python :: 3.11
11
+ Classifier: Programming Language :: Python :: 3.12
12
+ Requires-Dist: aiocache (>=0.12.0,<0.13.0)
13
+ Requires-Dist: ipython (>=8.0.0,<9.0.0)
14
+ Requires-Dist: lion-core (>=0.5.6,<0.6.0)
15
+ Requires-Dist: python-dotenv (>=1.0.1,<2.0.0)
16
+ Description-Content-Type: text/markdown
17
+
18
+ ![PyPI - Version](https://img.shields.io/pypi/v/lionagi?labelColor=233476aa&color=231fc935)
19
+ ![PyPI - Downloads](https://img.shields.io/pypi/dm/lionagi?color=blue)
20
+ ![Dependencies](https://img.shields.io/badge/dependencies-4-brightgreen)
21
+ ![Python Version](https://img.shields.io/badge/python-3.10%2B-blue)
22
+
23
+ [Documentation](https://ocean-lion.com/Welcome) | [Discord](https://discord.gg/aqSJ2v46vu) | [PyPI](https://pypi.org/project/lionagi/) | [Roadmap](https://trello.com/b/3seomsrI/lionagi)
24
+
25
+ # LION Framework
26
+ ### Language InterOperable Network - The Future of Controlled AI Operations
27
+
28
+ > Harness the power of next-generation AI while maintaining complete control and reliability.
29
+
30
+ ## Why LION?
31
+
32
+ The AI revolution is transforming how we work - but with great power comes great responsibility. LION provides the control mechanisms and reliability features needed to safely integrate advanced AI capabilities into enterprise workflows.
33
+
34
+ LION is designed to be:
35
+ - 🔒 **Controlled**: Built-in safety mechanisms and verification
36
+ - 🎯 **Precise**: Exact control over AI behaviors
37
+ - 🔧 **Flexible**: Build any workflow you need
38
+ - 🚀 **Efficient**: Minimal dependencies, maximum performance
39
+
40
+ ## Quick Start
41
+
42
+ ```python
43
+ from lionagi import Branch, iModel
44
+
45
+ # Initialize model
46
+ gpt4o = iModel(provider="openai", model="gpt-4o")
47
+
48
+ # Create a branch with personality
49
+ comedian = Branch(
50
+ system="you are a sarcastic dragon hunter",
51
+ imodel=gpt4o
52
+ )
53
+
54
+ # Chat asynchronously
55
+ response = await branch.chat(
56
+ "tell me a joke on knight vs dragon"
57
+ )
58
+ ```
59
+
60
+ ## Installation
61
+
62
+ LION maintains minimal dependencies for maximum reliability:
63
+
64
+ ```bash
65
+ pip install lionagi
66
+ ```
67
+
68
+ Dependencies:
69
+ - aiocache
70
+ - lion-core
71
+ - python-dotenv
72
+ - IPython
73
+
74
+ ## 🌟 Example Workflow
75
+
76
+ Below is an example of what you can build with LION. Note that these are sample implementations - LION provides the building blocks, you create the workflows that fit your needs.
77
+
78
+ ```mermaid
79
+ sequenceDiagram
80
+ autonumber
81
+ participant Client
82
+ participant Orchestrator
83
+ participant ResearchAgent
84
+ participant AnalysisAgent
85
+ participant ValidationAgent
86
+ participant Tools
87
+
88
+ Client->>+Orchestrator: Submit Complex Task
89
+ Note over Orchestrator: Task Analysis & Planning
90
+
91
+ %% Research Phase
92
+ Orchestrator->>+ResearchAgent: Delegate Research
93
+ activate ResearchAgent
94
+ ResearchAgent->>Tools: Access Data Sources
95
+ Tools-->>ResearchAgent: Raw Data
96
+ ResearchAgent-->>-Orchestrator: Research Results
97
+ deactivate ResearchAgent
98
+
99
+ %% Analysis Phase
100
+ Orchestrator->>+AnalysisAgent: Process Data
101
+ activate AnalysisAgent
102
+ AnalysisAgent->>Tools: Apply Models
103
+ Tools-->>AnalysisAgent: Analysis Results
104
+ AnalysisAgent-->>-Orchestrator: Processed Insights
105
+ deactivate AnalysisAgent
106
+
107
+ %% Validation Phase
108
+ Orchestrator->>+ValidationAgent: Verify Results
109
+ activate ValidationAgent
110
+ ValidationAgent->>Tools: Apply Safety Checks
111
+ Tools-->>ValidationAgent: Validation Status
112
+ ValidationAgent-->>-Orchestrator: Verified Results
113
+ deactivate ValidationAgent
114
+
115
+ Orchestrator-->>-Client: Return Validated Output
116
+ ```
117
+
118
+ ## 🏗️ System Architecture
119
+
120
+ Here's how you can structure your LION-powered system. Each component can be customized to your specific needs.
121
+
122
+ ```mermaid
123
+ graph TB
124
+ subgraph Client Layer
125
+ CL[Client Application]
126
+ end
127
+
128
+ subgraph Orchestration Layer
129
+ ORC[Orchestrator]
130
+ SEC[Security Controls]
131
+ MON[Monitoring]
132
+ end
133
+
134
+ subgraph Agent Layer
135
+ subgraph Specialized Agents
136
+ RA[Research Agent]
137
+ AA[Analysis Agent]
138
+ VA[Validation Agent]
139
+ end
140
+
141
+ subgraph Agent Controls
142
+ AC[Access Control]
143
+ AM[Action Monitor]
144
+ VE[Verification]
145
+ end
146
+ end
147
+
148
+ subgraph Resource Layer
149
+ subgraph Tool Management
150
+ TM[Tool Registry]
151
+ TP[Tool Policies]
152
+ end
153
+
154
+ subgraph Data Sources
155
+ DS[Data Access]
156
+ DV[Data Validation]
157
+ end
158
+ end
159
+
160
+ %% Connections
161
+ CL --> ORC
162
+ ORC --> RA & AA & VA
163
+ RA & AA & VA --> AC
164
+ AC --> TM
165
+ TM --> DS
166
+
167
+ %% Control Flow
168
+ ORC --> SEC
169
+ SEC --> MON
170
+ MON --> AM
171
+ AM --> VE
172
+ VE --> TP
173
+ TP --> DV
174
+
175
+ classDef primary fill:#1e40af,stroke:#1e3a8a,color:#fff
176
+ classDef secondary fill:#3b82f6,stroke:#2563eb,color:#fff
177
+ classDef control fill:#7c3aed,stroke:#6d28d9,color:#fff
178
+ ```
179
+
180
+ ## 🛠️ Building Blocks
181
+
182
+ LION provides the essential components you need to build reliable AI workflows:
183
+
184
+ - **Branch**: Core conversation unit with built-in safety mechanisms
185
+ - **iModel**: Standardized interface to AI models
186
+ - **Tools**: Framework for safe tool integration
187
+ - **Exchange**: Reliable message passing between components
188
+
189
+ Each component is designed to be:
190
+ - Fully customizable to your needs
191
+ - Safe by default
192
+ - Easy to integrate
193
+ - Highly reliable
194
+
195
+ ## 🎯 Key Use Cases
196
+
197
+ - **Enterprise Operations**
198
+ - Complex workflow automation
199
+ - Data analysis and processing
200
+ - Decision support systems
201
+
202
+ - **AI Integration**
203
+ - Controlled model deployment
204
+ - Safe tool usage
205
+ - Reliable agent operations
206
+
207
+ - **Development**
208
+ - Rapid prototyping
209
+ - System integration
210
+ - Workflow optimization
211
+
212
+ ## 🔒 Built for Reliability
213
+
214
+ LION isn't just another framework - it's your partner in responsible AI adoption. Build enterprise-grade AI systems with:
215
+
216
+ - Complete control over AI behaviors
217
+ - Comprehensive audit trails
218
+ - Built-in safety mechanisms
219
+ - Minimal dependencies
220
+ - Maximum reliability
221
+
222
+ ## 🤝 Contributing
223
+
224
+ Join our [Discord community](https://discord.gg/aqSJ2v46vu) to:
225
+ - Share ideas
226
+ - Report issues
227
+ - Contribute code
228
+ - Learn from others
229
+
230
+ ## 📚 Citation
231
+
232
+ ```bibtex
233
+ @software{Li_LionAGI_2023,
234
+ author = {Haiyang Li},
235
+ month = {12},
236
+ year = {2023},
237
+ title = {LionAGI: Intelligent Integration Framework},
238
+ url = {https://github.com/lion-agi/lionagi},
239
+ }
240
+ ```
241
+
@@ -26,28 +26,22 @@ lionagi/core/collections/__init__.py,sha256=RgnaBHgeUlPQyPfraE2MI86wAZpHAtmfgU0h
26
26
  lionagi/core/collections/_logger.py,sha256=zAGvx5SWWkeI2_n8Jh69ToYvyn5LLlww91SRKcrxLDU,11696
27
27
  lionagi/core/collections/abc/README.md,sha256=N3s0qQglL2PkriZ0hWDTh0ytJjubqkXVyUB0x9kpi6U,5524
28
28
  lionagi/core/collections/abc/__init__.py,sha256=cCPlUaXtXXPdQamXWQAf8MHKck7sa1asu6TDLX1W6S0,984
29
- lionagi/core/collections/abc/component.py,sha256=4Z588KENh0yULM4sFfvpvfeEi13yApOxQ7OpCI_itUQ,21575
30
- lionagi/core/collections/abc/concepts.py,sha256=4IM2uQGhMjBzfa1wjNX4ZMbcxCqtjQTFXFJBye47IQg,8043
29
+ lionagi/core/collections/abc/component.py,sha256=R3lU2I9cefeKNQ-2EmUq487MRYdBHR50g5iZ9BmudKU,21280
30
+ lionagi/core/collections/abc/concepts.py,sha256=iYaI97A9qWrH_aPt_Fx60qgMfoGKqhzD0-efgH8lSj0,7799
31
31
  lionagi/core/collections/abc/exceptions.py,sha256=raqjWSHGYhm-tUAmn1QK_NlkM3MQfjc1cOD_kobUdyc,4065
32
32
  lionagi/core/collections/abc/util.py,sha256=CjJs-PgK0t4MAG1AJUdgrxQg7v2Ou-ixv-gWjatu7d4,779
33
33
  lionagi/core/collections/exchange.py,sha256=7h9kI7gNRyCYFZUd-686ClPZXFZLtrEn7pVHjk4ol60,4274
34
- lionagi/core/collections/flow.py,sha256=oo4PjNpMhRgYeKfJ6aorxp7CjKk7iIizVC9WuwYrPcQ,12751
35
- lionagi/core/collections/model.py,sha256=uZhTBuKFa7OzxtFwO7sVV8RPmdydgWasso1g5os0dGg,15848
36
- lionagi/core/collections/pile.py,sha256=X4j_Zbt2TCQTWPGYkOgfFBzIepcqFeoultFh6KnS6QU,37943
37
- lionagi/core/collections/progression.py,sha256=YIN-qVNZPMHN3f3UflUgH1jzdkQPwdnBZSOVvZZ7OeQ,6704
34
+ lionagi/core/collections/flow.py,sha256=yaCdLhilcBrPdsZ46RcApgi8p-7O0D97OYnNVkEZja4,12726
35
+ lionagi/core/collections/model.py,sha256=dU6NOmy3c2aX9XqM5Y2CMx9_wuRCDtFAJyu5njBEysM,15848
36
+ lionagi/core/collections/pile.py,sha256=Zjzjo1eb0V7_9ONDpZgT65jLaAM04_zWK01zNS3OI_M,37937
37
+ lionagi/core/collections/progression.py,sha256=oFXvsGe84ZcHvacGc1MDGn4bE4h5wRUq8h9wcBXr8Ok,6657
38
38
  lionagi/core/collections/util.py,sha256=AWfwuIIwbakpF0_swWUVSGTeN26XWL6UlmgW5mh4qDA,2005
39
39
  lionagi/core/director/README.md,sha256=HoIDnEmWmWXVeDfUvkyf4nXQOYqzy2jhToZcJz0zmUw,55
40
40
  lionagi/core/director/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
41
41
  lionagi/core/director/direct.py,sha256=vKcirI2vp9CvU6Y7SoznaLwppJpI9j9YBo0cvfWwxiM,9552
42
42
  lionagi/core/director/director.py,sha256=E-zgbAj5gbUgDrfE0YzFoipZnr0WWGZwIreEGGY2KJc,103
43
- lionagi/core/director/models/__init__.py,sha256=2SSysv4nrZ998HRt9a1BeoWcgVu91Nx3dy2NL4kkHDc,300
44
- lionagi/core/director/models/action_model.py,sha256=Wj04sHRlgPYiQJWEbJlzQsxKPsW4f0KkZsSWYqCcfME,1843
45
- lionagi/core/director/models/brainstorm_model.py,sha256=1P2qX58qJDb1r4U14iFdl5aHtKCg7oYBUXavYc1xzIc,1177
46
- lionagi/core/director/models/plan_model.py,sha256=SqaJlUXT7un-VTHk_LS3jjd00drMJEY4mJfNRwtalXk,1453
47
- lionagi/core/director/models/reason_model.py,sha256=anY5fvszbABci74YvQnTVtvSh59I1cj9ZNw6A8GHfB8,2124
48
- lionagi/core/director/models/step_model.py,sha256=oB_mSwlZjp5csX4YDgdX9BIu0iIefLxAhqoZU0qetXs,2008
49
43
  lionagi/core/director/operations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
50
- lionagi/core/director/operations/select.py,sha256=6oqZVQMzkgizzHXuhuUmdySfDTLGRTzFEr1yTyRw9No,2834
44
+ lionagi/core/director/operations/select.py,sha256=0B1SXwkNdPM8z6aarECcw1I_AbiMIns7rYDSx1eyCBE,67
51
45
  lionagi/core/director/operations/utils.py,sha256=nuCvA6hXAi0oPFPdV_5kyHLGLlk1FbqhGfH2N0kPF9I,132
52
46
  lionagi/core/engine/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
53
47
  lionagi/core/engine/branch_engine.py,sha256=l59CTLk-ecsc_NgNgT3DkgP4OuuQ1lzdcOdDqie0H-k,12700
@@ -65,6 +59,7 @@ lionagi/core/generic/edge_condition.py,sha256=ZvQMYDl4WFXrwkvjQajVFluF5FNosw_OLe
65
59
  lionagi/core/generic/graph.py,sha256=kOq2DvZaAFmgHIZUlFlxUgSh4rzqQP6fMmQtrWhTjfM,7838
66
60
  lionagi/core/generic/hyperedge.py,sha256=DkeLUlrb7rGx3nZ04aADU9HXXu5mZTf_DBwT0xhzIv4,7
67
61
  lionagi/core/generic/node.py,sha256=vf26Q8-V3wh5qr8TdFGena_SCkp_39eCO6n23TjbuMo,7156
62
+ lionagi/core/generic/registry/component_registry/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
68
63
  lionagi/core/generic/tree.py,sha256=YVlJT1_gN96utEUB1Uc4pmHEeFVyJrtSF6cqIBWZDJI,1541
69
64
  lionagi/core/generic/tree_node.py,sha256=vHOELePsn-Vqlpi7V4-UteGR-Vht4FddJL6UmNVbab8,2475
70
65
  lionagi/core/mail/__init__.py,sha256=_-C11e519cBCuEuYhCgsQnzph2vDpUaLEfsKNwz33AQ,202
@@ -90,7 +85,7 @@ lionagi/core/rule/_default.py,sha256=EtKfqz6CWmF4EnzPsXCy37rn7x8VhdqiMLyfqG_N2xU
90
85
  lionagi/core/rule/action.py,sha256=9NCXzRa-eRyV1XpeC1ranlADQcpWrPezP0hzqdlwEv4,2592
91
86
  lionagi/core/rule/base.py,sha256=6MmAEu3eR9X_UBPgwAtBeOAzUHuNndlnxqY6lijZfGA,7070
92
87
  lionagi/core/rule/boolean.py,sha256=JuqVcgVWlKwZd_Y_b7i2SC7lLEAiUJlAkAvC9aYb5tI,1470
93
- lionagi/core/rule/choice.py,sha256=lQ6xYQcRMYNmBrsQ1L1JbHfb2jsbQWwLGgV_JLhbt8U,1464
88
+ lionagi/core/rule/choice.py,sha256=uj2CAPmTCdllQDYTj-tsk_V0_-xCGR7mKCOldY2rISE,1486
94
89
  lionagi/core/rule/mapping.py,sha256=jeVRbHpe3gLQ8voJGru7uwd_Ca1wqtVn6PlkR4q7u0Y,2545
95
90
  lionagi/core/rule/number.py,sha256=YKcb7HZ89ktWdLd8dA2azLg2p5HALQWqMsIm98Xw8Dw,2276
96
91
  lionagi/core/rule/rulebook.py,sha256=uBAPMzaCcH9Mr01K_w2HZ6TJIXNtKLS8ZdV3e-17nEQ,1023
@@ -116,7 +111,7 @@ lionagi/core/unit/template/score.py,sha256=ReUaIIr-NLjunSy4NNXQpIsH28NNceGBAUuPC
116
111
  lionagi/core/unit/template/select.py,sha256=VSpkphJl9bHSE8i0X6MMJD8LB5QwOj1UORHm8VDIRKE,3047
117
112
  lionagi/core/unit/unit.py,sha256=a3rauBXe50SBUgndv7Q9bqF4h7pJCYdsoTfPf1e8GCs,15548
118
113
  lionagi/core/unit/unit_form.py,sha256=zK_ij3Tod5FwMVdIIhdVoEFvD3br-YM9RPe7WsOIW2s,10980
119
- lionagi/core/unit/unit_mixin.py,sha256=c8GvHzgc65iJKQBKv71ET3afLPsIz5-Ce-4Eo6_bZiw,38823
114
+ lionagi/core/unit/unit_mixin.py,sha256=gLyqtyiwWIyfibhNUJzMpAGfcMmLdo86xjbGZFyGILA,38803
120
115
  lionagi/core/unit/util.py,sha256=WN2Jop-LUwQNYJNubFPhOZrisQ6SQq-XMhD_KhzLkgE,2707
121
116
  lionagi/core/validator/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
122
117
  lionagi/core/validator/validator.py,sha256=901wwmqL92XNi25ajv57bNKIKZhmu-KprNLArMUiGqg,12255
@@ -180,6 +175,8 @@ lionagi/integrations/config/mlx_configs.py,sha256=xbostqjnk3aAN-qKyC54YBprHPA38C
180
175
  lionagi/integrations/config/oai_configs.py,sha256=fgby-3o_tO24QhSiPyko-oeAMEa0cWCThh6L6ChiXoo,3625
181
176
  lionagi/integrations/config/ollama_configs.py,sha256=GUn0kagrQA3gpIiaxYyfdi2LAf_Ohz1sVrsAb20OBwo,17
182
177
  lionagi/integrations/config/openrouter_configs.py,sha256=x5LjLx-aqCLzzrqr15gVzuTTG4Y_BVS6tRrKout5vPQ,1690
178
+ lionagi/integrations/langchain_/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
179
+ lionagi/integrations/llamaindex_/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
183
180
  lionagi/integrations/loader/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
184
181
  lionagi/integrations/loader/load.py,sha256=KhsbLPwqNK1wRDKSoZPd5yeyMGAPc9Xt_ISR8PK6PCk,8651
185
182
  lionagi/integrations/loader/load_util.py,sha256=65qP5kytBJFTaSg7lNCO7rfw6GpPQuvZxoqJ7s83A48,6616
@@ -214,7 +211,7 @@ lionagi/libs/ln_queue.py,sha256=kJ-81XNnu2gcHyQ9XL62kCnAzk_0tmRmvhAaj30wIjM,3498
214
211
  lionagi/libs/ln_tokenize.py,sha256=SP3mGljwaaxqH0ced54v4lFs8LXU-oIpb33mdrzRSEA,5400
215
212
  lionagi/libs/ln_validate.py,sha256=huTnLNaAITni49PK_uI2CXvnFETt87j8-4lF8e5yy0o,8469
216
213
  lionagi/libs/special_tokens.py,sha256=ViFaql64LgEGHSXzODzaVMh4GfteN8D2ogmqWYTYwiQ,2411
217
- lionagi/libs/sys_util.py,sha256=iwzbvt_lGCeRdD1JdPNKE3E3bsrO45JWbWQ-OEQ7fTc,19675
214
+ lionagi/libs/sys_util.py,sha256=Xin0U3-oBUJZJUhdHRjDyyNVJS-resfGFooDUTAtH0M,24919
218
215
  lionagi/lions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
219
216
  lionagi/lions/coder/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
220
217
  lionagi/lions/coder/add_feature.py,sha256=mLMfz9V9yYbdH6DJs39FOz9IHdhdyPZajocQtQhjgcA,703
@@ -222,6 +219,7 @@ lionagi/lions/coder/base_prompts.py,sha256=SLpC442nZm2cEkB8o9j28kpkB-WzKLjH6sOTS
222
219
  lionagi/lions/coder/code_form.py,sha256=xW66cWCsrZu2qGu-wGUGSIPL1uZevGQVCE_vBRH9Kmc,384
223
220
  lionagi/lions/coder/coder.py,sha256=u-n_7PVdKCAz28SAA2bO4oy1qxGIzEl1PX6iqz7oSoI,5829
224
221
  lionagi/lions/coder/util.py,sha256=m9H18JrePpuP1VyjxVXQaLXCGBed04jZIkfNXvF7_gU,2751
222
+ lionagi/lions/director/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
225
223
  lionagi/lions/judge/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
226
224
  lionagi/lions/judge/config.py,sha256=hJNMI-07zf5cqU2tr22fzkGvhR7RdtckkYg8UhLTKec,185
227
225
  lionagi/lions/judge/data/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -238,8 +236,14 @@ lionagi/lions/researcher/data_source/finhub_.py,sha256=W63daXgIwHJQ6TDMR2ALQIDk1
238
236
  lionagi/lions/researcher/data_source/google_.py,sha256=401SKHQaSpxiOUoXl7stadl4qeF7SIX72lUNK7bKesg,6797
239
237
  lionagi/lions/researcher/data_source/wiki_.py,sha256=UPoa2dk_y5sELu7_rkdme2auDpUmc_Dn0Avgjwr2X2g,3145
240
238
  lionagi/lions/researcher/data_source/yfinance_.py,sha256=snAf897J69MyAc6fcFjF0irrMjbAh81EZ3RvaFT3hxE,977
241
- lionagi/version.py,sha256=W_9dCm49nLvZulVAvvsafxLJjVBSKDBHz9K7szFZllo,22
242
- lionagi-0.3.6.dist-info/LICENSE,sha256=VXFWsdoN5AAknBCgFqQNgPWYx7OPp-PFEP961zGdOjc,11288
243
- lionagi-0.3.6.dist-info/METADATA,sha256=YBvJNxfI2QZFGB4DW2WcHwG-WpcVaGSFUgq54xY0-KI,3148
244
- lionagi-0.3.6.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
245
- lionagi-0.3.6.dist-info/RECORD,,
239
+ lionagi/operations/__init__.py,sha256=T7fbKqrZxLzWPpv7nYxpoMzwSfaAgyxCJwA1gQ6rVK4,163
240
+ lionagi/operations/brainstorm.py,sha256=GxLjY_IOss62UKNaFF2CUXNBrcF_D7tk-R7ZxaFkQlE,2319
241
+ lionagi/operations/config.py,sha256=DIhifP4SLV3SVa5eXCHbDNvCD6lEB3fAbgOtY6b2PHg,133
242
+ lionagi/operations/rank.py,sha256=17g-LFvN0h0VEFKOrhY9Mw7U6StZGI78zUuVRPAmnbY,3075
243
+ lionagi/operations/score.py,sha256=lSG4EgNMkiAN3c3HrpZtnSw2-bHkFN5y3ZlvI85-VLE,3874
244
+ lionagi/operations/select.py,sha256=MTJoT4oouugPU4pG0UkoozX38iysGhvlmgk2DeJGJ3E,4044
245
+ lionagi/version.py,sha256=7dTW0A5-FkrEuNOotvR8oW59M2lvIwYouVqfJzvXpKk,22
246
+ lionagi-0.3.8.dist-info/LICENSE,sha256=VXFWsdoN5AAknBCgFqQNgPWYx7OPp-PFEP961zGdOjc,11288
247
+ lionagi-0.3.8.dist-info/METADATA,sha256=F-R8jMWmz5tVglwI8tfkRZmC1euF-Z11_a9IcOBc2fU,6517
248
+ lionagi-0.3.8.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
249
+ lionagi-0.3.8.dist-info/RECORD,,
@@ -1,13 +0,0 @@
1
- from .action_model import ActionModel
2
- from .brainstorm_model import BrainstormModel
3
- from .plan_model import PlanModel
4
- from .reason_model import ReasonModel
5
- from .step_model import StepModel
6
-
7
- __all__ = [
8
- "ReasonModel",
9
- "StepModel",
10
- "BrainstormModel",
11
- "ActionModel",
12
- "PlanModel",
13
- ]