lionagi 0.2.9__py3-none-any.whl → 0.2.10__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- lionagi/integrations/bridge/autogen_/autogen_.py +4 -5
- lionagi/integrations/bridge/langchain_/documents.py +8 -4
- lionagi/integrations/bridge/llamaindex_/index.py +10 -4
- lionagi/integrations/bridge/llamaindex_/llama_pack.py +6 -1
- lionagi/integrations/bridge/llamaindex_/node_parser.py +9 -4
- lionagi/integrations/bridge/llamaindex_/reader.py +1 -2
- lionagi/version.py +1 -1
- {lionagi-0.2.9.dist-info → lionagi-0.2.10.dist-info}/METADATA +7 -5
- {lionagi-0.2.9.dist-info → lionagi-0.2.10.dist-info}/RECORD +11 -11
- {lionagi-0.2.9.dist-info → lionagi-0.2.10.dist-info}/LICENSE +0 -0
- {lionagi-0.2.9.dist-info → lionagi-0.2.10.dist-info}/WHEEL +0 -0
@@ -1,15 +1,14 @@
|
|
1
1
|
from typing import Dict, Union
|
2
2
|
|
3
|
+
from lionfuncs import check_import
|
4
|
+
|
3
5
|
|
4
6
|
def get_ipython_user_proxy():
|
5
7
|
|
6
8
|
try:
|
7
|
-
|
8
|
-
|
9
|
-
SysUtil.check_import("autogen", pip_name="pyautogen")
|
10
|
-
|
11
|
-
import autogen
|
9
|
+
autogen = check_import("autogen", pip_name="pyautogen")
|
12
10
|
from IPython import get_ipython
|
11
|
+
|
13
12
|
except Exception as e:
|
14
13
|
raise ImportError(f"Please install autogen and IPython. {e}")
|
15
14
|
|
@@ -1,5 +1,7 @@
|
|
1
1
|
from typing import Any, Callable, Dict, List, TypeVar, Union
|
2
2
|
|
3
|
+
from lionfuncs import check_import
|
4
|
+
|
3
5
|
from lionagi.libs.sys_util import SysUtil
|
4
6
|
|
5
7
|
T = TypeVar("T")
|
@@ -21,8 +23,9 @@ def to_langchain_document(datanode: T, **kwargs: Any) -> Any:
|
|
21
23
|
Any: An instance of `LangchainDocument` populated with data from the input node.
|
22
24
|
"""
|
23
25
|
|
24
|
-
|
25
|
-
|
26
|
+
LangchainDocument = check_import(
|
27
|
+
"langchain", module_name="schema", import_name="Document"
|
28
|
+
)
|
26
29
|
|
27
30
|
dnode = datanode.to_dict()
|
28
31
|
SysUtil.change_dict_key(dnode, old_key="content", new_key="page_content")
|
@@ -63,8 +66,9 @@ def langchain_loader(
|
|
63
66
|
True
|
64
67
|
"""
|
65
68
|
|
66
|
-
|
67
|
-
|
69
|
+
document_loaders = check_import(
|
70
|
+
"langchain_community", module_name="document_loaders", pip_name="langchain"
|
71
|
+
)
|
68
72
|
|
69
73
|
try:
|
70
74
|
if isinstance(loader, str):
|
@@ -1,5 +1,10 @@
|
|
1
|
+
from lionfuncs import check_import
|
2
|
+
|
3
|
+
|
1
4
|
class LlamaIndex:
|
2
5
|
|
6
|
+
llama_index = check_import("llama_index", pip_name="llama-index")
|
7
|
+
|
3
8
|
@classmethod
|
4
9
|
def index(
|
5
10
|
cls,
|
@@ -10,8 +15,8 @@ class LlamaIndex:
|
|
10
15
|
index_type=None,
|
11
16
|
**kwargs,
|
12
17
|
):
|
13
|
-
|
14
|
-
|
18
|
+
Settings = check_import("llama_index.core", import_name="Settings")
|
19
|
+
OpenAI = check_import("llama_index.llms.openai", import_name="OpenAI")
|
15
20
|
|
16
21
|
if not llm_obj:
|
17
22
|
llm_class = llm_class or OpenAI
|
@@ -23,8 +28,9 @@ class LlamaIndex:
|
|
23
28
|
Settings.llm = llm_obj
|
24
29
|
|
25
30
|
if not index_type:
|
26
|
-
|
27
|
-
|
31
|
+
VectorStoreIndex = check_import(
|
32
|
+
"llama_index.core", import_name="VectorStoreIndex"
|
33
|
+
)
|
28
34
|
index_type = VectorStoreIndex
|
29
35
|
|
30
36
|
return index_type(nodes, **kwargs)
|
@@ -1,9 +1,14 @@
|
|
1
|
+
from lionfuncs import check_import
|
2
|
+
|
3
|
+
|
1
4
|
class LlamaPack:
|
2
5
|
|
3
6
|
@staticmethod
|
4
7
|
def download(pack_name, pack_path):
|
5
8
|
try:
|
6
|
-
|
9
|
+
download_llama_pack = check_import(
|
10
|
+
"llama_index.llama_pack", import_name="download_llama_pack"
|
11
|
+
)
|
7
12
|
|
8
13
|
return download_llama_pack(pack_name, pack_path)
|
9
14
|
except Exception as e:
|
@@ -1,5 +1,7 @@
|
|
1
1
|
from typing import Any
|
2
2
|
|
3
|
+
from lionfuncs import check_import, import_module
|
4
|
+
|
3
5
|
from lionagi.libs.sys_util import SysUtil
|
4
6
|
|
5
7
|
|
@@ -25,9 +27,11 @@ def get_llama_index_node_parser(node_parser: Any):
|
|
25
27
|
found within the llama_index.core.node_parser module.
|
26
28
|
"""
|
27
29
|
|
28
|
-
|
29
|
-
|
30
|
-
|
30
|
+
NodeParser = check_import(
|
31
|
+
"llama_index.core.node_parser.interface",
|
32
|
+
import_name="NodeParser",
|
33
|
+
pip_name="llama-index",
|
34
|
+
)
|
31
35
|
|
32
36
|
if not isinstance(node_parser, str) and not issubclass(node_parser, NodeParser):
|
33
37
|
raise TypeError("node_parser must be a string or NodeParser.")
|
@@ -37,7 +41,8 @@ def get_llama_index_node_parser(node_parser: Any):
|
|
37
41
|
SysUtil.check_import("tree_sitter_languages")
|
38
42
|
|
39
43
|
try:
|
40
|
-
|
44
|
+
node_module = import_module("llama_index.core", module_name="node_parser")
|
45
|
+
return getattr(node_module, node_parser)
|
41
46
|
except Exception as e:
|
42
47
|
raise AttributeError(
|
43
48
|
f"llama_index_core has no such attribute:" f" {node_parser}, Error: {e}"
|
lionagi/version.py
CHANGED
@@ -1 +1 @@
|
|
1
|
-
__version__ = "0.2.
|
1
|
+
__version__ = "0.2.10"
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: lionagi
|
3
|
-
Version: 0.2.
|
3
|
+
Version: 0.2.10
|
4
4
|
Summary: Towards automated general intelligence.
|
5
5
|
Author: HaiyangLi
|
6
6
|
Author-email: quantocean.li@gmail.com
|
@@ -11,9 +11,8 @@ Classifier: Programming Language :: Python :: 3.11
|
|
11
11
|
Classifier: Programming Language :: Python :: 3.12
|
12
12
|
Requires-Dist: aiocache (>=0.12.3,<0.13.0)
|
13
13
|
Requires-Dist: ipython (>=8.27.0,<9.0.0)
|
14
|
+
Requires-Dist: lion-core (>=0.3.7,<0.4.0)
|
14
15
|
Requires-Dist: lion-openai (>=0.1.4,<0.2.0)
|
15
|
-
Requires-Dist: lionfuncs (==1.0.1)
|
16
|
-
Requires-Dist: pandas (>=2.2.3,<3.0.0)
|
17
16
|
Requires-Dist: python-dotenv (>=1.0.1,<2.0.0)
|
18
17
|
Description-Content-Type: text/markdown
|
19
18
|
|
@@ -27,9 +26,12 @@ Description-Content-Type: text/markdown
|
|
27
26
|
### an AGentic Intelligence Operating System
|
28
27
|
|
29
28
|
```
|
30
|
-
pip install lionagi
|
29
|
+
pip install lionagi
|
30
|
+
```
|
31
|
+
or
|
32
|
+
```
|
33
|
+
poetry add lionagi
|
31
34
|
```
|
32
|
-
|
33
35
|
**Powerful Intelligent Workflow Automation**
|
34
36
|
|
35
37
|
lionagi is an intelligent agentic workflow automation framework. It introduces advanced ML models into any existing workflows and data infrastructure.
|
@@ -149,16 +149,16 @@ lionagi/experimental/strategies/base.py,sha256=DkeLUlrb7rGx3nZ04aADU9HXXu5mZTf_D
|
|
149
149
|
lionagi/integrations/__init__.py,sha256=Il5Q9ATdX8yXqVxtP_nYqUhExzxPC_qk_WXQ_4h0exg,16
|
150
150
|
lionagi/integrations/bridge/__init__.py,sha256=GTtqrkDb7OW5JID56bHyJTTkztZupOJyvHGAr0lN3VY,169
|
151
151
|
lionagi/integrations/bridge/autogen_/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
152
|
-
lionagi/integrations/bridge/autogen_/autogen_.py,sha256=
|
152
|
+
lionagi/integrations/bridge/autogen_/autogen_.py,sha256=ABipO5_-coRh7i-W9d4tPW4YEvyQyESZd-1g4jZEuV0,4028
|
153
153
|
lionagi/integrations/bridge/langchain_/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
154
|
-
lionagi/integrations/bridge/langchain_/documents.py,sha256=
|
154
|
+
lionagi/integrations/bridge/langchain_/documents.py,sha256=BM9bq0Wup6CxdNKUqm6Xbxuan5jsCKRdyS4JmApSOcc,5004
|
155
155
|
lionagi/integrations/bridge/langchain_/langchain_bridge.py,sha256=-lnJtyf4iJEwHKQAwBRN6YZ7CTsyFLetl5e8_9UGouY,3163
|
156
156
|
lionagi/integrations/bridge/llamaindex_/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
157
|
-
lionagi/integrations/bridge/llamaindex_/index.py,sha256=
|
157
|
+
lionagi/integrations/bridge/llamaindex_/index.py,sha256=NCQpnOGTzjDZ1BYqYcjW2EFhB95WoV3DBLOMiNLRCfI,981
|
158
158
|
lionagi/integrations/bridge/llamaindex_/llama_index_bridge.py,sha256=AxLuoaDueNPZ_vX4_-kGlxlDKezqb1E1Cn_s33Dq2pM,5203
|
159
|
-
lionagi/integrations/bridge/llamaindex_/llama_pack.py,sha256=
|
160
|
-
lionagi/integrations/bridge/llamaindex_/node_parser.py,sha256=
|
161
|
-
lionagi/integrations/bridge/llamaindex_/reader.py,sha256=
|
159
|
+
lionagi/integrations/bridge/llamaindex_/llama_pack.py,sha256=YunEysKmeS4OrdgRHZ2tCQUtuWyetUmc__cvTtIqoII,8505
|
160
|
+
lionagi/integrations/bridge/llamaindex_/node_parser.py,sha256=Ab7cWU6VQTnrJrxMC81PXO7GBWOLAVsSWdsI_iIS5eM,3563
|
161
|
+
lionagi/integrations/bridge/llamaindex_/reader.py,sha256=s6Px9bv7uWQu16HGmAaXYnbgzRL25p1zsGOcSZ_Dwb8,8180
|
162
162
|
lionagi/integrations/bridge/llamaindex_/textnode.py,sha256=NmkxBkxgFVTHObSvzay7C-OH-mOIQ7_q2zAFjTnqyNE,2323
|
163
163
|
lionagi/integrations/bridge/pydantic_/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
164
164
|
lionagi/integrations/bridge/pydantic_/pydantic_bridge.py,sha256=4-YPg9989u-jZ6hyEo5jiE9u7Loeje_OGo44zB-bO1A,87
|
@@ -260,8 +260,8 @@ lionagi/tests/test_core/test_structure/test_base_structure.py,sha256=qsaYP745fFI
|
|
260
260
|
lionagi/tests/test_core/test_structure/test_graph.py,sha256=hLsTZmZMs9vCZW-KiOwYY3npk6WxaVU6zZSA9-ltDvQ,2162
|
261
261
|
lionagi/tests/test_core/test_structure/test_tree.py,sha256=PvMJXDsNPpJFgEQCan-5Q5JREgMrBOpYIaWcwHd-WDY,1944
|
262
262
|
lionagi/tests/test_core/test_validator.py,sha256=G8h3SMUuH9behQe0-c3-5fZ9s67vgTwlmwfcS0k6dtI,4234
|
263
|
-
lionagi/version.py,sha256=
|
264
|
-
lionagi-0.2.
|
265
|
-
lionagi-0.2.
|
266
|
-
lionagi-0.2.
|
267
|
-
lionagi-0.2.
|
263
|
+
lionagi/version.py,sha256=waXgc7p-jgGCsUjdVfO_KjlVZblnCvrzf4A0dsBj_lg,23
|
264
|
+
lionagi-0.2.10.dist-info/LICENSE,sha256=VXFWsdoN5AAknBCgFqQNgPWYx7OPp-PFEP961zGdOjc,11288
|
265
|
+
lionagi-0.2.10.dist-info/METADATA,sha256=B8r_uCM4YG6eUyuOY0kCPeqhAVADCy6jDcdy3wItuP8,3152
|
266
|
+
lionagi-0.2.10.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
267
|
+
lionagi-0.2.10.dist-info/RECORD,,
|
File without changes
|
File without changes
|