🐛 fix(loading.py): remove unnecessary type hinting for allowed_tools variable

The type hinting for allowed_tools variable is unnecessary as it is already defined in the previous line. Removing the type hinting improves the readability of the code.
This commit is contained in:
Gabriel Luiz Freitas Almeida 2023-06-23 11:04:03 -03:00
commit bcb80a08b2

View file

@ -233,7 +233,7 @@ def load_agent_executor(agent_class: type[agent_module.Agent], params, **kwargs)
if not isinstance(allowed_tools, (list, set)) and isinstance(
allowed_tools, BaseTool
):
allowed_tools: Sequence[BaseTool] = [allowed_tools]
allowed_tools = [allowed_tools]
tool_names = [tool.name for tool in allowed_tools]
# Agent class requires an output_parser but Agent classes
# have a default output_parser.