Skip to content

Commit

Permalink
refactor: Add SequentialCrewComponent for better organization.
Browse files Browse the repository at this point in the history
  • Loading branch information
ogabrielluiz committed Aug 20, 2024
1 parent 63ed6ba commit 5538328
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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(
Expand Down

0 comments on commit 5538328

Please sign in to comment.