Fix AgentInitializer to has last statement of returning base class (#1301)

From the last update, AgentInitializer lost ability to chain another
AgentInitializer via tool.
Fix issue: https://github.com/logspace-ai/langflow/issues/1255
This commit is contained in:
Gabriel Luiz Freitas Almeida 2024-02-01 09:18:04 -03:00 committed by GitHub
commit 8f9d3ce155
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -41,12 +41,11 @@ class AgentInitializerComponent(CustomComponent):
handle_parsing_errors=True,
max_iterations=max_iterations,
)
else:
return initialize_agent(
tools=tools,
llm=llm,
agent=agent,
return_intermediate_steps=True,
handle_parsing_errors=True,
max_iterations=max_iterations,
)
return initialize_agent(
tools=tools,
llm=llm,
agent=agent,
return_intermediate_steps=True,
handle_parsing_errors=True,
max_iterations=max_iterations,
)