Closed arunbaby0 closed 3 months ago
3 immediate issues Im seeing.
These are not valid parameters for the task class, you need human_input= True
Thanks for the quick response, @theCyberTech. However, I am still facing issues. PFB the changed code. I want the front agent to ask the human to select either second or third agent. And for second and third agent also, I want human interaction to finally decide what the human wants. And at every step I am expecting the human input.
front = Agent(
role='Front Agent',
goal='...',
verbose=True,
memory=True,
backstory=(
"..."
),
tools=[]
)
second = Agent(
role='Second Agent',
goal='...',
verbose=True,
memory=True,
backstory=(
"..."
),
tools=[]
)
third = Agent(
role='Third Agent',
goal='...',
verbose=True,
memory=True,
backstory=(
"..."
),
tools=[]
)
front_task = Task(
description=(
"Interact with the customer to determine if their request"
),
expected_output=(
"A decision on whether the customer's request is for first agent or second,"
"and delegation to the respective agent."
),
agent=front,
human_input=True
)
second_task = Task(
description=(
"Ask the customer relevant questions to understand their"
),
expected_output=(
"A detailed list of the customer's requirements and preferences"
),
agent=second,
human_input=True
)
third_task = Task(
description=(
"Ask the customer relevant questions to understand"
),
expected_output=(
"A detailed list of the customer's service requirements"
),
agent=third,
human_input=True
)
# Create Crew
my_crew = Crew(
agents=[front_desk_agent, sales_agent, service_agent],
tasks=[front_desk_task, sales_task, service_task],
manager_llm=ChatOpenAI(temperature=0, model="gpt-4"), # Mandatory if manager_agent is not set
process=Process.hierarchical, # Specifies the hierarchical management approach
memory=True, # Enable memory usage for enhanced task execution
manager_agent=None, # Optional: explicitly set a specific agent as manager instead of the manager_llm
)
# Kick off the crew with a sample input
result = my_crew.kickoff()
print(result)
Ok, I have some suggestions but we are better off taking this to discord if that's ok?
IF you could raise a support post I can respond there in detail
Sure. I will post it there. Thanks, @theCyberTech
hello, guys! I'm currently trying to implement the same flow in my project could you please share how did you solve it?
I am trying to create a hierarchical crew with 3 agents for chatbot, the main agent should route the interaction of the human to the other 2 agents based on the human inputs (chat messages). Also, the other 2 agents should take human input at each step of the process to find out what the human wants.
In this, the agent is not stopping to get any inputs from the user. What I am missing here?