lionagi 0.0.206__py3-none-any.whl → 0.0.208__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- lionagi/_services/ollama.py +2 -2
- lionagi/core/branch/branch.py +517 -265
- lionagi/core/branch/branch_manager.py +0 -1
- lionagi/core/branch/conversation.py +640 -337
- lionagi/core/core_util.py +0 -59
- lionagi/core/sessions/session.py +137 -64
- lionagi/tools/tool_manager.py +39 -62
- lionagi/utils/__init__.py +3 -2
- lionagi/utils/call_util.py +9 -7
- lionagi/utils/sys_util.py +287 -255
- lionagi/version.py +1 -1
- {lionagi-0.0.206.dist-info → lionagi-0.0.208.dist-info}/METADATA +1 -1
- {lionagi-0.0.206.dist-info → lionagi-0.0.208.dist-info}/RECORD +16 -17
- lionagi/utils/pd_util.py +0 -57
- {lionagi-0.0.206.dist-info → lionagi-0.0.208.dist-info}/LICENSE +0 -0
- {lionagi-0.0.206.dist-info → lionagi-0.0.208.dist-info}/WHEEL +0 -0
- {lionagi-0.0.206.dist-info → lionagi-0.0.208.dist-info}/top_level.txt +0 -0
lionagi/version.py
CHANGED
@@ -1 +1 @@
|
|
1
|
-
__version__ = "0.0.
|
1
|
+
__version__ = "0.0.208"
|
@@ -1,5 +1,5 @@
|
|
1
1
|
lionagi/__init__.py,sha256=pRm9tnfYQnj_ZCan3xr3HQO7tbUeqwRhSBtwOvXJ-o8,886
|
2
|
-
lionagi/version.py,sha256=
|
2
|
+
lionagi/version.py,sha256=h353Rt8oXc0TPbWsDOE_dqhFFQbJXj59Oix9Avy62ds,24
|
3
3
|
lionagi/_services/__init__.py,sha256=zU5sxmSI9-Jtp_WsI-Zsb6hmT8y5zF9YtJ7XikAjnbs,60
|
4
4
|
lionagi/_services/anthropic.py,sha256=pLebbnr2H1A41bzXrJrU7yQbZY35swKrSi4mktXoIyk,3195
|
5
5
|
lionagi/_services/anyscale.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -15,7 +15,7 @@ lionagi/_services/localai.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,
|
|
15
15
|
lionagi/_services/mistralai.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
16
16
|
lionagi/_services/mlx_service.py,sha256=1AF_RcV4KQmpxC67n2E0zRbssSlsTFmdnojydUXdJn4,1285
|
17
17
|
lionagi/_services/oai.py,sha256=Jiuw_TibpYhN6x1PmHYUMi_0Nugrxmi5G1eimAuw21I,3958
|
18
|
-
lionagi/_services/ollama.py,sha256=
|
18
|
+
lionagi/_services/ollama.py,sha256=I2GvWtWA9WMyq_bhLe2JQlrkP_mAeqm2Bhf8ItOpEzQ,1190
|
19
19
|
lionagi/_services/openllm.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
20
20
|
lionagi/_services/openrouter.py,sha256=MuuwoT2ro9FmY7O1jzCenRrL2YfiYUMM8-0kKoGZHAY,1799
|
21
21
|
lionagi/_services/perplexity.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -38,12 +38,12 @@ lionagi/configs/__init__.py,sha256=QOd4Rs7vjIpNWvIocxWQeU-q-MPRC-AOxh-gM-eBJ2o,1
|
|
38
38
|
lionagi/configs/oai_configs.py,sha256=Q2ESc5QiMprnRc_w7SeMlaTYUWl_Y4SEzZSE4iOkz4Q,2646
|
39
39
|
lionagi/configs/openrouter_configs.py,sha256=IBQHqb8mo4Jb3kYAm_7NOHSKRPwSdGbPpDJoiwHxLYw,1269
|
40
40
|
lionagi/core/__init__.py,sha256=6uDjq1WCWBahNiCpzGaUCJe7GDg6lwUD_cGNT86GhwM,200
|
41
|
-
lionagi/core/core_util.py,sha256=
|
41
|
+
lionagi/core/core_util.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
42
42
|
lionagi/core/branch/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
43
|
-
lionagi/core/branch/branch.py,sha256=
|
44
|
-
lionagi/core/branch/branch_manager.py,sha256=
|
43
|
+
lionagi/core/branch/branch.py,sha256=D6vbbbgAqFvgeYrM0vGAKEzRoibu03_YiIn8oZgcpbM,35691
|
44
|
+
lionagi/core/branch/branch_manager.py,sha256=zA_dECz9XYKLk7kK6zDWfHLs1ttRGYDfyCj4B7XKDqo,4903
|
45
45
|
lionagi/core/branch/cluster.py,sha256=chG3GNX2BBDTWIuSVfZUJ_YF_ZVBSoel2d_AN0OChS0,6
|
46
|
-
lionagi/core/branch/conversation.py,sha256=
|
46
|
+
lionagi/core/branch/conversation.py,sha256=cuRKo2m0T-HZir0HopozHeBK3nErJ-TPwjp57pGwp5Y,30158
|
47
47
|
lionagi/core/flow/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
48
48
|
lionagi/core/flow/flow.py,sha256=Fd6xVZKgjjpr-rcVAjvuMGP04OxNK4LVkbB9VnEP21k,813
|
49
49
|
lionagi/core/flow/flow_util.py,sha256=OoQ2-ktkpQs9f1m1VI1pucUeq75Mx1aKqz8KdINMt8M,2083
|
@@ -52,7 +52,7 @@ lionagi/core/instruction_set/instruction_set.py,sha256=bxrxPxLJdaenvZ2CMaiucNB4f
|
|
52
52
|
lionagi/core/messages/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
53
53
|
lionagi/core/messages/messages.py,sha256=bokGS8hu4wQxa-4Gsf2Eg7Q99ANccjjixZpE-DC0P7g,6533
|
54
54
|
lionagi/core/sessions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
55
|
-
lionagi/core/sessions/session.py,sha256=
|
55
|
+
lionagi/core/sessions/session.py,sha256=ak8Ys9qv7_oPx0aYAmw865Airi0r-An4y8nKzyGW1Kg,20772
|
56
56
|
lionagi/datastores/__init__.py,sha256=chG3GNX2BBDTWIuSVfZUJ_YF_ZVBSoel2d_AN0OChS0,6
|
57
57
|
lionagi/datastores/chroma.py,sha256=chG3GNX2BBDTWIuSVfZUJ_YF_ZVBSoel2d_AN0OChS0,6
|
58
58
|
lionagi/datastores/deeplake.py,sha256=chG3GNX2BBDTWIuSVfZUJ_YF_ZVBSoel2d_AN0OChS0,6
|
@@ -89,19 +89,18 @@ lionagi/tests/test_utils/test_io_util.py,sha256=cFZCT6EikVeuXB13w-UbtO3YceCHBO5R
|
|
89
89
|
lionagi/tests/test_utils/test_nested_util.py,sha256=Z1boHufhjZryw51qW2lABOnnyJ1snAFp26KKzzzD8Bs,12612
|
90
90
|
lionagi/tests/test_utils/test_sys_util.py,sha256=TDCkzll-JLa6NuBbN_-ay5Rw9KTa_HcSHHAq62RVwGI,13545
|
91
91
|
lionagi/tools/__init__.py,sha256=ZEck-ReP5Co05nAA2gUXTpKoDN2QZqrL7DvU9Z09gqg,69
|
92
|
-
lionagi/tools/tool_manager.py,sha256=
|
92
|
+
lionagi/tools/tool_manager.py,sha256=PeGy_F_I4yefbv7YZQupxvPCVTJRFLXZ3rrxCoxktTI,5958
|
93
93
|
lionagi/tools/tool_util.py,sha256=5ln7lnqC_rjhKDDwef10xrBrjP1yLzsQvphllD5crec,9252
|
94
|
-
lionagi/utils/__init__.py,sha256=
|
94
|
+
lionagi/utils/__init__.py,sha256=Lq6XgvQa6iBNveN_LS0leKE2SCipvMw1UDdMjj6S-lM,1059
|
95
95
|
lionagi/utils/api_util.py,sha256=YV-DKPgR4lCKO_riroSKyq6mO-8vz-SilRo_gWtg4Zg,15282
|
96
|
-
lionagi/utils/call_util.py,sha256=
|
96
|
+
lionagi/utils/call_util.py,sha256=nqrqUjRtTAaOSnRoEyLy5j6B7Pauv-MgzApOv9xrVkc,33187
|
97
97
|
lionagi/utils/encrypt_util.py,sha256=iZjZdXVvl0lw4Yw_YNzIWriM3F2qKtzai7PgSQ1TExc,9316
|
98
98
|
lionagi/utils/io_util.py,sha256=xoVsq8sP5JGsosuC80Kad3GkGjm8Qm0OLYyTw-U5ru8,6455
|
99
99
|
lionagi/utils/nested_util.py,sha256=67j-ySQtuMGxtjnC-Ty2mwQgqp2g1gZhXRy1MulUu1U,26656
|
100
|
-
lionagi/utils/
|
101
|
-
lionagi/utils/sys_util.py,sha256=40VY2a7jgBjwAlKBbD29_Zj55ZHst2BIjOUoMsYUjiI,13045
|
100
|
+
lionagi/utils/sys_util.py,sha256=B4GboyxEEd6h2KCnsXcS62oCG8upQxTJ6LEbEQ2rBdA,15887
|
102
101
|
lionagi/utils/url_util.py,sha256=fu1uRFwSR9D3dO1nfSYVNRD1b1BZVClcbpgF7tA_U4s,1864
|
103
|
-
lionagi-0.0.
|
104
|
-
lionagi-0.0.
|
105
|
-
lionagi-0.0.
|
106
|
-
lionagi-0.0.
|
107
|
-
lionagi-0.0.
|
102
|
+
lionagi-0.0.208.dist-info/LICENSE,sha256=TBnSyG8fs_tMRtK805GzA1cIyExleKyzoN_kuVxT9IY,11358
|
103
|
+
lionagi-0.0.208.dist-info/METADATA,sha256=4UDo6ioLE1sfEvzRdoMxDYgXB_N9-e9WR2bc94zul6A,17894
|
104
|
+
lionagi-0.0.208.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
|
105
|
+
lionagi-0.0.208.dist-info/top_level.txt,sha256=szvch_d2jE1Lu9ZIKsl26Ll6BGfYfbOgt5lm-UpFSo4,8
|
106
|
+
lionagi-0.0.208.dist-info/RECORD,,
|
lionagi/utils/pd_util.py
DELETED
@@ -1,57 +0,0 @@
|
|
1
|
-
from typing import List, Dict
|
2
|
-
import pandas as pd
|
3
|
-
from ..schema.data_node import DataNode
|
4
|
-
from .sys_util import timestamp_to_datetime
|
5
|
-
|
6
|
-
def to_pd_df(items: List[Dict], how: str = 'all') -> pd.DataFrame:
|
7
|
-
"""
|
8
|
-
Converts a list of dictionaries to a pandas DataFrame, dropping NA values.
|
9
|
-
|
10
|
-
Args:
|
11
|
-
items (List[Dict]): A list of dictionaries to be converted to a DataFrame.
|
12
|
-
how (str): How to handle NA values. Options are 'all' to drop rows with all NA values,
|
13
|
-
'any' to drop rows with any NA values, or 'none' to keep all rows.
|
14
|
-
|
15
|
-
Returns:
|
16
|
-
pd.DataFrame: A pandas DataFrame containing the data from the input list of dictionaries.
|
17
|
-
"""
|
18
|
-
df = pd.DataFrame(items).dropna(how=how)
|
19
|
-
df.reset_index(drop=True, inplace=True)
|
20
|
-
return df
|
21
|
-
|
22
|
-
def pd_row_to_node(row: pd.Series):
|
23
|
-
"""
|
24
|
-
Converts a pandas Series row to a DataNode object with structured data.
|
25
|
-
|
26
|
-
Args:
|
27
|
-
row (pd.Series): A pandas Series containing row data to be converted.
|
28
|
-
|
29
|
-
Returns:
|
30
|
-
DataNode: A DataNode object containing structured data from the input pandas Series.
|
31
|
-
"""
|
32
|
-
dict_ = row.to_dict()
|
33
|
-
dict_['datetime'] = str(timestamp_to_datetime(dict_['datetime']))
|
34
|
-
dict_['content'] = {'headline': dict_.pop('headline'), 'summary': dict_.pop('summary')}
|
35
|
-
dict_['metadata'] = {'datetime': dict_.pop('datetime'), 'url': dict_.pop('url'), 'id': dict_.pop('id')}
|
36
|
-
return DataNode.from_dict(dict_)
|
37
|
-
|
38
|
-
def expand_df_datetime(df: pd.DataFrame) -> pd.DataFrame:
|
39
|
-
"""
|
40
|
-
Expands a pandas DataFrame with a datetime column into separate year, month, and day columns.
|
41
|
-
|
42
|
-
Args:
|
43
|
-
df (pd.DataFrame): The pandas DataFrame containing a 'datetime' column to be expanded.
|
44
|
-
|
45
|
-
Returns:
|
46
|
-
pd.DataFrame: A pandas DataFrame with 'year', 'month', and 'day' columns.
|
47
|
-
"""
|
48
|
-
df_expanded = df.copy()
|
49
|
-
if df_expanded['datetime'].dtype == int:
|
50
|
-
df_expanded['datetime'] = df_expanded['datetime'].apply(lambda x: timestamp_to_datetime(x))
|
51
|
-
|
52
|
-
df_expanded.insert(0, 'year', df_expanded['datetime'].dt.year)
|
53
|
-
df_expanded.insert(1, 'month', df_expanded['datetime'].dt.month)
|
54
|
-
df_expanded.insert(2, 'day', df_expanded['datetime'].dt.day)
|
55
|
-
df_expanded.drop('datetime', axis=1, inplace=True)
|
56
|
-
|
57
|
-
return df_expanded
|
File without changes
|
File without changes
|
File without changes
|