praisonaiagents 0.0.35__py3-none-any.whl → 0.0.36__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- praisonaiagents/agent/agent.py +5 -1
- praisonaiagents/tools/pandas_tools.py +3 -0
- praisonaiagents/tools/yfinance_tools.py +9 -1
- {praisonaiagents-0.0.35.dist-info → praisonaiagents-0.0.36.dist-info}/METADATA +1 -1
- {praisonaiagents-0.0.35.dist-info → praisonaiagents-0.0.36.dist-info}/RECORD +7 -7
- {praisonaiagents-0.0.35.dist-info → praisonaiagents-0.0.36.dist-info}/WHEEL +0 -0
- {praisonaiagents-0.0.35.dist-info → praisonaiagents-0.0.36.dist-info}/top_level.txt +0 -0
praisonaiagents/agent/agent.py
CHANGED
@@ -762,4 +762,8 @@ Output MUST be JSON with 'reflection' and 'satisfactory'.
|
|
762
762
|
|
763
763
|
def run(self):
|
764
764
|
"""Alias for start() method"""
|
765
|
-
return self.start()
|
765
|
+
return self.start()
|
766
|
+
|
767
|
+
def start(self, prompt: str, **kwargs):
|
768
|
+
"""Start the agent with a prompt. This is a convenience method that wraps chat()."""
|
769
|
+
return self.chat(prompt, **kwargs)
|
@@ -160,6 +160,9 @@ class PandasTools:
|
|
160
160
|
Dict: Summary statistics and information
|
161
161
|
"""
|
162
162
|
try:
|
163
|
+
if not isinstance(df, pd.DataFrame):
|
164
|
+
raise TypeError(f"Expected pandas DataFrame, got {type(df).__name__}")
|
165
|
+
|
163
166
|
numeric_summary = df.describe().to_dict()
|
164
167
|
# Convert numpy types to native Python types
|
165
168
|
for col in numeric_summary:
|
@@ -145,7 +145,15 @@ class YFinanceTools:
|
|
145
145
|
return [{"error": "yfinance package not available"}]
|
146
146
|
|
147
147
|
hist = ticker.history(period=period, interval=interval, start=start, end=end)
|
148
|
-
|
148
|
+
data = hist.reset_index().to_dict('records')
|
149
|
+
|
150
|
+
# Convert timestamps to ISO format strings
|
151
|
+
for record in data:
|
152
|
+
if 'Date' in record and hasattr(record['Date'], 'isoformat'):
|
153
|
+
record['Date'] = record['Date'].isoformat()
|
154
|
+
if 'Datetime' in record and hasattr(record['Datetime'], 'isoformat'):
|
155
|
+
record['Datetime'] = record['Datetime'].isoformat()
|
156
|
+
return data
|
149
157
|
except Exception as e:
|
150
158
|
error_msg = f"Error fetching historical data: {str(e)}"
|
151
159
|
logging.error(error_msg)
|
@@ -1,7 +1,7 @@
|
|
1
1
|
praisonaiagents/__init__.py,sha256=Pm_HNlIsenf5zIstcVNk6nteJmOEnI4nB-zB-YL0Jgo,1160
|
2
2
|
praisonaiagents/main.py,sha256=uMBdwxjnJKHLPUzr_5vXlkuhCUO6EW5O8XC0M-h47sE,13915
|
3
3
|
praisonaiagents/agent/__init__.py,sha256=sKO8wGEXvtCrvV1e834r1Okv0XAqAxqZCqz6hKLiTvA,79
|
4
|
-
praisonaiagents/agent/agent.py,sha256=
|
4
|
+
praisonaiagents/agent/agent.py,sha256=CSULJNsm53Fh3LK-ZaAPuAcL3-7ca7aqFKYsNHAiTo8,34789
|
5
5
|
praisonaiagents/agents/__init__.py,sha256=_1d6Pqyk9EoBSo7E68sKyd1jDRlN1vxvVIRpoMc0Jcw,168
|
6
6
|
praisonaiagents/agents/agents.py,sha256=Os_k25-temlpzzncyElqbQI-e29nlcxqfJYy_ZUIprY,31004
|
7
7
|
praisonaiagents/agents/autoagents.py,sha256=bjC2O5oZmoJItJXIMPTWc2lsp_AJC9tMiTQOal2hwPA,13532
|
@@ -20,7 +20,7 @@ praisonaiagents/tools/excel_tools.py,sha256=e2HqcwnyBueOyss0xEKxff3zB4w4sNWCOMXv
|
|
20
20
|
praisonaiagents/tools/file_tools.py,sha256=KRskI9q8up3sHaLQSaIGtvpl1brq419Up6YvB9QzSoI,8807
|
21
21
|
praisonaiagents/tools/json_tools.py,sha256=ApUYNuQ1qnbmYNCxSlx6Tth_H1yo8mhWtZ7Rr2WS6C4,16507
|
22
22
|
praisonaiagents/tools/newspaper_tools.py,sha256=NyhojNPeyULBGcAWGOT1X70qVkh3FgZrpH-S7PEmrwI,12667
|
23
|
-
praisonaiagents/tools/pandas_tools.py,sha256=
|
23
|
+
praisonaiagents/tools/pandas_tools.py,sha256=yzCeY4jetKrFIRA15Tr5OQ5d94T8DaSpzglx2UiWfPs,11092
|
24
24
|
praisonaiagents/tools/python_tools.py,sha256=ByBpESi5Vk2ivpihav9AQeqf95K_D4qqINYN1q-q0bA,13428
|
25
25
|
praisonaiagents/tools/shell_tools.py,sha256=P3fSrfOw71CGcrPwdPOA9Fr6Bgt_CAC71bUjCyvZCN8,9301
|
26
26
|
praisonaiagents/tools/spider_tools.py,sha256=lrZnT1V1BC46We-AzBrDB1Ryifr3KKGmYNntMsScU7w,15094
|
@@ -29,8 +29,8 @@ praisonaiagents/tools/tools.py,sha256=TK5njOmDSpMlyBnbeBzNSlnzXWlnNaTpVqkFPhkMAr
|
|
29
29
|
praisonaiagents/tools/wikipedia_tools.py,sha256=pGko-f33wqXgxJTv8db7TbizY5XnzBQRkNdq_GsplvI,9465
|
30
30
|
praisonaiagents/tools/xml_tools.py,sha256=iYTMBEk5l3L3ryQ1fkUnNVYK-Nnua2Kx2S0dxNMMs1A,17122
|
31
31
|
praisonaiagents/tools/yaml_tools.py,sha256=uogAZrhXV9O7xvspAtcTfpKSQYL2nlOTvCQXN94-G9A,14215
|
32
|
-
praisonaiagents/tools/yfinance_tools.py,sha256=
|
33
|
-
praisonaiagents-0.0.
|
34
|
-
praisonaiagents-0.0.
|
35
|
-
praisonaiagents-0.0.
|
36
|
-
praisonaiagents-0.0.
|
32
|
+
praisonaiagents/tools/yfinance_tools.py,sha256=s2PBj_1v7oQnOobo2fDbQBACEHl61ftG4beG6Z979ZE,8529
|
33
|
+
praisonaiagents-0.0.36.dist-info/METADATA,sha256=x6Ivo2TMN_tYww70m6DEMXtGwO3cmgc86B_SQMT0uO0,306
|
34
|
+
praisonaiagents-0.0.36.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
35
|
+
praisonaiagents-0.0.36.dist-info/top_level.txt,sha256=_HsRddrJ23iDx5TTqVUVvXG2HeHBL5voshncAMDGjtA,16
|
36
|
+
praisonaiagents-0.0.36.dist-info/RECORD,,
|
File without changes
|
File without changes
|