From 553832860ac366d729a5624456a51f5e19a94b78 Mon Sep 17 00:00:00 2001 From: Gabriel Luiz Freitas Almeida Date: Tue, 20 Aug 2024 17:17:50 -0300 Subject: [PATCH] refactor: Add SequentialCrewComponent for better organization. --- .../starter_projects/sequential_tasks_agent.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/backend/base/langflow/initial_setup/starter_projects/sequential_tasks_agent.py b/src/backend/base/langflow/initial_setup/starter_projects/sequential_tasks_agent.py index ebdeb2e950b..7af7c4ec637 100644 --- a/src/backend/base/langflow/initial_setup/starter_projects/sequential_tasks_agent.py +++ b/src/backend/base/langflow/initial_setup/starter_projects/sequential_tasks_agent.py @@ -1,3 +1,4 @@ +from langflow.components.agents.SequentialCrew import SequentialCrewComponent from langflow.components.agents.SequentialTaskAgent import SequentialTaskAgentComponent from langflow.components.inputs.TextInput import TextInputComponent from langflow.components.models.OpenAIModel import OpenAIModelComponent @@ -77,9 +78,14 @@ def sequential_tasks_agent_graph(): previous_task=editor_task_agent.build_agent_and_task, ) + crew_component = SequentialCrewComponent() + crew_component.set( + tasks=comedian_task_agent.build_agent_and_task, + ) + # Set up the output component chat_output = ChatOutput() - chat_output.set(input_value=comedian_task_agent.build_agent_and_task) + chat_output.set(input_value=crew_component.build_output) # Create the graph graph = Graph(