diff --git a/sequential_workflow_example.py b/sequential_workflow_example.py index ff868697..360b685e 100644 --- a/sequential_workflow_example.py +++ b/sequential_workflow_example.py @@ -27,21 +27,17 @@ agent2 = Agent(llm=llm, max_loops=1) # Create another agent for a different task agent3 = Agent(llm=llm, max_loops=1) -# agent4 = Agent(llm=anthropic, max_loops="auto") - # Create the workflow workflow = SequentialWorkflow(max_loops=1) # Add tasks to the workflow workflow.add( - "Generate a 10,000 word blog on health and wellness.", agent1 + agent1, "Generate a 10,000 word blog on health and wellness.", ) # Suppose the next task takes the output of the first task as input -workflow.add("Summarize the generated blog", agent2) - workflow.add( - "Create a references sheet of materials for the curriculm", agent3 + agent2, "Summarize the generated blog", ) # Run the workflow diff --git a/swarms/structs/sequential_workflow.py b/swarms/structs/sequential_workflow.py index b56210df..50ce8e41 100644 --- a/swarms/structs/sequential_workflow.py +++ b/swarms/structs/sequential_workflow.py @@ -133,7 +133,6 @@ class SequentialWorkflow: self, agent: Union[Callable, Agent], task: Optional[str] = None, - img: Optional[str] = None, *args, **kwargs, ) -> None: @@ -143,7 +142,6 @@ class SequentialWorkflow: Args: agent (Union[Callable, Agent]): The model or agent to execute the task. task (str): The task description or the initial input for the Agent. - img (str): The image to understand for the task. *args: Additional arguments to pass to the task execution. **kwargs: Additional keyword arguments to pass to the task execution. """ @@ -154,24 +152,14 @@ class SequentialWorkflow: ) # Append the task to the tasks list - if img: - self.tasks.append( - Task( - description=task, - agent=agent, - args=list(args), - kwargs=kwargs, - ) - ) - else: - self.tasks.append( - Task( - description=task, - agent=agent, - args=list(args), - kwargs=kwargs, - ) + self.tasks.append( + Task( + description=task, + agent=agent, + args=list(args), + kwargs=kwargs, ) + ) def reset_workflow(self) -> None: """Resets the workflow by clearing the results of each task."""