Skip to content

Commit fce60e9

Browse files
authoredFeb 28, 2025··
Merge pull request #399 from MervinPraison/develop
Bump version to 2.0.80 and update praisonaiagents dependency
2 parents 2975342 + 42db516 commit fce60e9

File tree

9 files changed

+63
-21
lines changed

9 files changed

+63
-21
lines changed
 

‎docker/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
FROM python:3.11-slim
22
WORKDIR /app
33
COPY . .
4-
RUN pip install flask praisonai==2.0.79 gunicorn markdown
4+
RUN pip install flask praisonai==2.0.80 gunicorn markdown
55
EXPOSE 8080
66
CMD ["gunicorn", "-b", "0.0.0.0:8080", "api:app"]

‎docs/api/praisonai/deploy.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ <h2 id="raises">Raises</h2>
110110
file.write(&#34;FROM python:3.11-slim\n&#34;)
111111
file.write(&#34;WORKDIR /app\n&#34;)
112112
file.write(&#34;COPY . .\n&#34;)
113-
file.write(&#34;RUN pip install flask praisonai==2.0.79 gunicorn markdown\n&#34;)
113+
file.write(&#34;RUN pip install flask praisonai==2.0.80 gunicorn markdown\n&#34;)
114114
file.write(&#34;EXPOSE 8080\n&#34;)
115115
file.write(&#39;CMD [&#34;gunicorn&#34;, &#34;-b&#34;, &#34;0.0.0.0:8080&#34;, &#34;api:app&#34;]\n&#39;)
116116

‎praisonai.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ class Praisonai < Formula
33

44
desc "AI tools for various AI applications"
55
homepage "https://github.com/MervinPraison/PraisonAI"
6-
url "https://github.com/MervinPraison/PraisonAI/archive/refs/tags/2.0.79.tar.gz"
6+
url "https://github.com/MervinPraison/PraisonAI/archive/refs/tags/2.0.80.tar.gz"
77
sha256 "1828fb9227d10f991522c3f24f061943a254b667196b40b1a3e4a54a8d30ce32" # Replace with actual SHA256 checksum
88
license "MIT"
99

‎praisonai/deploy.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def create_dockerfile(self):
5656
file.write("FROM python:3.11-slim\n")
5757
file.write("WORKDIR /app\n")
5858
file.write("COPY . .\n")
59-
file.write("RUN pip install flask praisonai==2.0.79 gunicorn markdown\n")
59+
file.write("RUN pip install flask praisonai==2.0.80 gunicorn markdown\n")
6060
file.write("EXPOSE 8080\n")
6161
file.write('CMD ["gunicorn", "-b", "0.0.0.0:8080", "api:app"]\n')
6262

‎pyproject.toml

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "PraisonAI"
3-
version = "2.0.79"
3+
version = "2.0.80"
44
description = "PraisonAI is an AI Agents Framework with Self Reflection. PraisonAI application combines PraisonAI Agents, AutoGen, and CrewAI into a low-code solution for building and managing multi-agent LLM systems, focusing on simplicity, customisation, and efficient human-agent collaboration."
55
readme = "README.md"
66
license = ""
@@ -12,7 +12,7 @@ dependencies = [
1212
"rich>=13.7",
1313
"markdown>=3.5",
1414
"pyparsing>=3.0.0",
15-
"praisonaiagents>=0.0.64",
15+
"praisonaiagents>=0.0.65",
1616
"python-dotenv>=0.19.0",
1717
"instructor>=1.3.3",
1818
"PyYAML>=6.0",
@@ -84,7 +84,7 @@ autogen = ["pyautogen>=0.2.19", "praisonai-tools>=0.0.7", "crewai"]
8484

8585
[tool.poetry]
8686
name = "PraisonAI"
87-
version = "2.0.79"
87+
version = "2.0.80"
8888
description = "PraisonAI is an AI Agents Framework with Self Reflection. PraisonAI application combines PraisonAI Agents, AutoGen, and CrewAI into a low-code solution for building and managing multi-agent LLM systems, focusing on simplicity, customisation, and efficient human–agent collaboration."
8989
authors = ["Mervin Praison"]
9090
license = ""
@@ -102,7 +102,7 @@ python = ">=3.10,<3.13"
102102
rich = ">=13.7"
103103
markdown = ">=3.5"
104104
pyparsing = ">=3.0.0"
105-
praisonaiagents = ">=0.0.64"
105+
praisonaiagents = ">=0.0.65"
106106
python-dotenv = ">=0.19.0"
107107
instructor = ">=1.3.3"
108108
PyYAML = ">=6.0"

‎src/praisonai-agents/praisonaiagents/agents/agents.py

+48-6
Original file line numberDiff line numberDiff line change
@@ -477,8 +477,14 @@ async def arun_all_tasks(self):
477477
else:
478478
self.run_task(task_id)
479479

480-
async def astart(self, content=None, **kwargs):
481-
"""Async version of start method"""
480+
async def astart(self, content=None, return_dict=False, **kwargs):
481+
"""Async version of start method
482+
483+
Args:
484+
content: Optional content to add to all tasks' context
485+
return_dict: If True, returns the full results dictionary instead of only the final response
486+
**kwargs: Additional arguments
487+
"""
482488
if content:
483489
# Add content to context of all tasks
484490
for task in self.tasks.values():
@@ -488,10 +494,25 @@ async def astart(self, content=None, **kwargs):
488494
task.context.append(content)
489495

490496
await self.arun_all_tasks()
491-
return {
497+
498+
# Get results
499+
results = {
492500
"task_status": self.get_all_tasks_status(),
493501
"task_results": {task_id: self.get_task_result(task_id) for task_id in self.tasks}
494502
}
503+
504+
# By default, return only the final agent's response
505+
if not return_dict:
506+
# Get the last task (assuming sequential processing)
507+
task_ids = list(self.tasks.keys())
508+
if task_ids:
509+
last_task_id = task_ids[-1]
510+
last_result = self.get_task_result(last_task_id)
511+
if last_result:
512+
return last_result.raw
513+
514+
# Return full results dict if return_dict is True or if no final result was found
515+
return results
495516

496517
def save_output_to_file(self, task, task_output):
497518
if task.output_file:
@@ -801,8 +822,14 @@ def get_agent_details(self, agent_name):
801822
return str(agent[0])
802823
return None
803824

804-
def start(self, content=None, **kwargs):
805-
"""Start agent execution with optional content and config"""
825+
def start(self, content=None, return_dict=False, **kwargs):
826+
"""Start agent execution with optional content and config
827+
828+
Args:
829+
content: Optional content to add to all tasks' context
830+
return_dict: If True, returns the full results dictionary instead of only the final response
831+
**kwargs: Additional arguments
832+
"""
806833
if content:
807834
# Add content to context of all tasks
808835
for task in self.tasks.values():
@@ -815,10 +842,25 @@ def start(self, content=None, **kwargs):
815842

816843
# Run tasks as before
817844
self.run_all_tasks()
818-
return {
845+
846+
# Get results
847+
results = {
819848
"task_status": self.get_all_tasks_status(),
820849
"task_results": {task_id: self.get_task_result(task_id) for task_id in self.tasks}
821850
}
851+
852+
# By default, return only the final agent's response
853+
if not return_dict:
854+
# Get the last task (assuming sequential processing)
855+
task_ids = list(self.tasks.keys())
856+
if task_ids:
857+
last_task_id = task_ids[-1]
858+
last_result = self.get_task_result(last_task_id)
859+
if last_result:
860+
return last_result.raw
861+
862+
# Return full results dict if return_dict is True or if no final result was found
863+
return results
822864

823865
def set_state(self, key: str, value: Any) -> None:
824866
"""Set a state value"""

‎src/praisonai-agents/pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "praisonaiagents"
7-
version = "0.0.64"
7+
version = "0.0.65"
88
description = "Praison AI agents for completing complex tasks with Self Reflection Agents"
99
authors = [
1010
{ name="Mervin Praison" }

‎src/praisonai-agents/uv.lock

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎uv.lock

+5-5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)