mirror of
https://github.com/langflow-ai/langflow.git
synced 2026-07-23 17:58:35 +08:00
refactor(loading.py): add comment explaining type ignore for agent variable
This commit is contained in:
committed by
Gabriel Luiz Freitas Almeida
parent
f00420ecbe
commit
3b5b63e070
@ -166,7 +166,9 @@ def load_agent_executor(agent_class: type[agent_module.Agent], params, **kwargs)
|
||||
allowed_tools = params["allowed_tools"]
|
||||
llm_chain = params["llm_chain"]
|
||||
tool_names = [tool.name for tool in allowed_tools]
|
||||
agent = agent_class(allowed_tools=tool_names, llm_chain=llm_chain)
|
||||
# Agent class requires an output_parser but Agent classes
|
||||
# have a default output_parser.
|
||||
agent = agent_class(allowed_tools=tool_names, llm_chain=llm_chain) # type: ignore
|
||||
return AgentExecutor.from_agent_and_tools(
|
||||
agent=agent,
|
||||
tools=allowed_tools,
|
||||
|
||||
Reference in New Issue
Block a user