praisonaiagents 0.0.129__py3-none-any.whl → 0.0.130__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.
- praisonaiagents/process/process.py +15 -8
- praisonaiagents/tools/README.md +13 -0
- praisonaiagents/tools/__init__.py +1 -0
- {praisonaiagents-0.0.129.dist-info → praisonaiagents-0.0.130.dist-info}/METADATA +1 -1
- {praisonaiagents-0.0.129.dist-info → praisonaiagents-0.0.130.dist-info}/RECORD +7 -7
- {praisonaiagents-0.0.129.dist-info → praisonaiagents-0.0.130.dist-info}/WHEEL +0 -0
- {praisonaiagents-0.0.129.dist-info → praisonaiagents-0.0.130.dist-info}/top_level.txt +0 -0
@@ -265,6 +265,17 @@ class Process:
|
|
265
265
|
# Parse JSON and validate with Pydantic
|
266
266
|
return self._parse_manager_instructions(response, ManagerInstructions)
|
267
267
|
|
268
|
+
def _check_all_tasks_completed(self) -> bool:
|
269
|
+
"""Check if all tasks are completed and handle workflow completion.
|
270
|
+
|
271
|
+
Returns:
|
272
|
+
bool: True if all tasks are completed and workflow should exit, False otherwise.
|
273
|
+
"""
|
274
|
+
if all(task.status == "completed" for task in self.tasks.values()):
|
275
|
+
logging.info("All tasks are completed.")
|
276
|
+
self.workflow_finished = True
|
277
|
+
return True
|
278
|
+
return False
|
268
279
|
|
269
280
|
async def aworkflow(self) -> AsyncGenerator[str, None]:
|
270
281
|
"""Async version of workflow method"""
|
@@ -327,10 +338,8 @@ Tasks by type:
|
|
327
338
|
""")
|
328
339
|
|
329
340
|
# ADDED: Check if all tasks are completed and set workflow_finished flag
|
330
|
-
if
|
331
|
-
|
332
|
-
self.workflow_finished = True
|
333
|
-
# The next iteration loop check will break the workflow
|
341
|
+
if self._check_all_tasks_completed():
|
342
|
+
break # Exit immediately to prevent task reset
|
334
343
|
|
335
344
|
task_id = current_task.id
|
336
345
|
logging.debug(f"""
|
@@ -887,10 +896,8 @@ Tasks by type:
|
|
887
896
|
""")
|
888
897
|
|
889
898
|
# ADDED: Check if all tasks are completed and set workflow_finished flag
|
890
|
-
if
|
891
|
-
|
892
|
-
self.workflow_finished = True
|
893
|
-
# The next iteration loop check will break the workflow
|
899
|
+
if self._check_all_tasks_completed():
|
900
|
+
break # Exit immediately to prevent task reset
|
894
901
|
|
895
902
|
|
896
903
|
# Handle loop task file reading at runtime
|
praisonaiagents/tools/README.md
CHANGED
@@ -99,6 +99,19 @@ Ask yourself these questions:
|
|
99
99
|
- Each search is independent and secure
|
100
100
|
- Alternative to traditional search engines for privacy
|
101
101
|
|
102
|
+
|
103
|
+
### Spider Tool (Function-Based)
|
104
|
+
- General-purpose web scraping and crawling
|
105
|
+
- Supports CSS selectors for precise content extraction
|
106
|
+
- Can crawl multiple pages and extract links/images
|
107
|
+
- Flexible for various web scraping needs
|
108
|
+
|
109
|
+
### Newspaper Tool (Function-Based)
|
110
|
+
- Specialized for news article extraction
|
111
|
+
- Extracts article title, text, authors, and publish date
|
112
|
+
- Includes NLP processing for keywords and summaries
|
113
|
+
- Categorizes news sources by topic
|
114
|
+
|
102
115
|
### Stock Market Tool (Class-Based)
|
103
116
|
- Does multiple things: check prices, get company info, get historical data
|
104
117
|
- Remembers stock information to avoid repeated downloads
|
@@ -28,14 +28,14 @@ praisonaiagents/mcp/mcp_sse.py,sha256=KO10tAgZ5vSKeRhkJIZcdJ0ZmhRybS39i1KybWt4D7
|
|
28
28
|
praisonaiagents/memory/__init__.py,sha256=aEFdhgtTqDdMhc_JCWM-f4XI9cZIj7Wz5g_MUa-0amg,397
|
29
29
|
praisonaiagents/memory/memory.py,sha256=D5BmQTktv6VOJ49yW2m1MjjCJ5UDSX1Qo46_443ymKo,44276
|
30
30
|
praisonaiagents/process/__init__.py,sha256=lkYbL7Hn5a0ldvJtkdH23vfIIZLIcanK-65C0MwaorY,52
|
31
|
-
praisonaiagents/process/process.py,sha256=
|
31
|
+
praisonaiagents/process/process.py,sha256=uYvxL1TD_2Ku04dyBN_GV3DvoCuyv3Y2Iy7QODNin18,73906
|
32
32
|
praisonaiagents/task/__init__.py,sha256=VL5hXVmyGjINb34AalxpBMl-YW9m5EDcRkMTKkSSl7c,80
|
33
33
|
praisonaiagents/task/task.py,sha256=ReLwXPpfu3L7ba97RpzCOp5eFbLj26oK9mDsnLX6Bok,21471
|
34
34
|
praisonaiagents/telemetry/__init__.py,sha256=5iAOrj_N_cKMmh2ltWGYs3PfOYt_jcwUoElW8fTAIsc,3062
|
35
35
|
praisonaiagents/telemetry/integration.py,sha256=8h8TDlPFTbsBmU5rIYNOibJbwEEEWmzS1ENE9uPTvvg,8696
|
36
36
|
praisonaiagents/telemetry/telemetry.py,sha256=SAEK5lrHn-Rb3nk_Yx1sjAdRxqT63ycyNRv3ZGh9Rck,11812
|
37
|
-
praisonaiagents/tools/README.md,sha256=
|
38
|
-
praisonaiagents/tools/__init__.py,sha256=
|
37
|
+
praisonaiagents/tools/README.md,sha256=am9mlHp46sC1U9HfyXtX-E_cckxpazprl4tuVFYHP_0,4905
|
38
|
+
praisonaiagents/tools/__init__.py,sha256=9NYh9anzJZlaLtrRINdM1uD6JfNSuOzZAFMaarO6yAU,9321
|
39
39
|
praisonaiagents/tools/arxiv_tools.py,sha256=1stb31zTjLTon4jCnpZG5de9rKc9QWgC0leLegvPXWo,10528
|
40
40
|
praisonaiagents/tools/calculator_tools.py,sha256=S1xPT74Geurvjm52QMMIG29zDXVEWJmM6nmyY7yF298,9571
|
41
41
|
praisonaiagents/tools/csv_tools.py,sha256=4Yr0QYwBXt-1BDXGLalB2eSsFR2mB5rH3KdHmRBQY6E,10036
|
@@ -57,7 +57,7 @@ praisonaiagents/tools/xml_tools.py,sha256=iYTMBEk5l3L3ryQ1fkUnNVYK-Nnua2Kx2S0dxN
|
|
57
57
|
praisonaiagents/tools/yaml_tools.py,sha256=uogAZrhXV9O7xvspAtcTfpKSQYL2nlOTvCQXN94-G9A,14215
|
58
58
|
praisonaiagents/tools/yfinance_tools.py,sha256=s2PBj_1v7oQnOobo2fDbQBACEHl61ftG4beG6Z979ZE,8529
|
59
59
|
praisonaiagents/tools/train/data/generatecot.py,sha256=H6bNh-E2hqL5MW6kX3hqZ05g9ETKN2-kudSjiuU_SD8,19403
|
60
|
-
praisonaiagents-0.0.
|
61
|
-
praisonaiagents-0.0.
|
62
|
-
praisonaiagents-0.0.
|
63
|
-
praisonaiagents-0.0.
|
60
|
+
praisonaiagents-0.0.130.dist-info/METADATA,sha256=yId1o9u0MH_G-DszUmZ31Hvn-PNznFt5l7bXCHeYh9U,1699
|
61
|
+
praisonaiagents-0.0.130.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
62
|
+
praisonaiagents-0.0.130.dist-info/top_level.txt,sha256=_HsRddrJ23iDx5TTqVUVvXG2HeHBL5voshncAMDGjtA,16
|
63
|
+
praisonaiagents-0.0.130.dist-info/RECORD,,
|
File without changes
|
File without changes
|