diff --git a/playground/structs/concurrent_workflow.py b/playground/structs/concurrent_workflow.py index f152e4bb..a228d247 100644 --- a/playground/structs/concurrent_workflow.py +++ b/playground/structs/concurrent_workflow.py @@ -1,5 +1,5 @@ -import os -from dotenv import load_dotenv +import os +from dotenv import load_dotenv from swarms import OpenAIChat, Task, ConcurrentWorkflow, Agent # Load environment variables from .env file diff --git a/pyproject.toml b/pyproject.toml index ace542a5..4ce89fc3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api" [tool.poetry] name = "swarms" -version = "3.5.8" +version = "3.5.9" description = "Swarms - Pytorch" license = "MIT" authors = ["Kye Gomez "] diff --git a/swarms/structs/recursive_workflow.py b/swarms/structs/recursive_workflow.py index 7c1429d3..1d7ae773 100644 --- a/swarms/structs/recursive_workflow.py +++ b/swarms/structs/recursive_workflow.py @@ -76,7 +76,10 @@ class RecursiveWorkflow(BaseStructure): for task in self.task_pool: while True: result = task.run() - if result is not None and self.stop_token in result: + if ( + result is not None + and self.stop_token in result + ): break logger.info(f"{result}") except Exception as error: diff --git a/swarms/structs/task.py b/swarms/structs/task.py index c7ad12ab..ad86c18e 100644 --- a/swarms/structs/task.py +++ b/swarms/structs/task.py @@ -54,6 +54,7 @@ class Task: >>> task.result """ + agent: Union[Callable, Agent] description: str args: List[Any] = field(default_factory=list) @@ -87,7 +88,9 @@ class Task: if isinstance(self.agent, Agent): if self.condition is None or self.condition(): self.result = self.agent.run( - *self.args, **self.kwargs + task=self.description, + *self.args, + **self.kwargs, ) self.history.append(self.result)