🐛 fix(custom.py): remove unnecessary type ignore comments
The type ignore comments are unnecessary as the code is already type annotated. Removing them improves code readability and maintainability.
This commit is contained in:
parent
14757ca402
commit
188fd4ad0a
1 changed files with 10 additions and 10 deletions
|
|
@ -83,8 +83,8 @@ class JsonAgent(CustomAgentExecutor):
|
|||
prompt=prompt,
|
||||
)
|
||||
agent = ZeroShotAgent(
|
||||
llm_chain=llm_chain, allowed_tools=tool_names
|
||||
) # type: ignore
|
||||
llm_chain=llm_chain, allowed_tools=tool_names # type: ignore
|
||||
)
|
||||
return cls.from_agent_and_tools(agent=agent, tools=tools, verbose=True)
|
||||
|
||||
def run(self, *args, **kwargs):
|
||||
|
|
@ -132,8 +132,8 @@ class CSVAgent(CustomAgentExecutor):
|
|||
)
|
||||
tool_names = {tool.name for tool in tools}
|
||||
agent = ZeroShotAgent(
|
||||
llm_chain=llm_chain, allowed_tools=tool_names, **kwargs
|
||||
) # type: ignore
|
||||
llm_chain=llm_chain, allowed_tools=tool_names, **kwargs # type: ignore
|
||||
)
|
||||
|
||||
return cls.from_agent_and_tools(agent=agent, tools=tools, verbose=True)
|
||||
|
||||
|
|
@ -171,8 +171,8 @@ class VectorStoreAgent(CustomAgentExecutor):
|
|||
)
|
||||
tool_names = {tool.name for tool in tools}
|
||||
agent = ZeroShotAgent(
|
||||
llm_chain=llm_chain, allowed_tools=tool_names, **kwargs
|
||||
) # type: ignore
|
||||
llm_chain=llm_chain, allowed_tools=tool_names, **kwargs # type: ignore
|
||||
)
|
||||
return AgentExecutor.from_agent_and_tools(
|
||||
agent=agent, tools=tools, verbose=True
|
||||
)
|
||||
|
|
@ -241,8 +241,8 @@ class SQLAgent(CustomAgentExecutor):
|
|||
)
|
||||
tool_names = {tool.name for tool in tools} # type: ignore
|
||||
agent = ZeroShotAgent(
|
||||
llm_chain=llm_chain, allowed_tools=tool_names, **kwargs
|
||||
) # type: ignore
|
||||
llm_chain=llm_chain, allowed_tools=tool_names, **kwargs # type: ignore
|
||||
)
|
||||
return AgentExecutor.from_agent_and_tools(
|
||||
agent=agent,
|
||||
tools=tools, # type: ignore
|
||||
|
|
@ -286,8 +286,8 @@ class VectorStoreRouterAgent(CustomAgentExecutor):
|
|||
)
|
||||
tool_names = {tool.name for tool in tools}
|
||||
agent = ZeroShotAgent(
|
||||
llm_chain=llm_chain, allowed_tools=tool_names, **kwargs
|
||||
) # type: ignore
|
||||
llm_chain=llm_chain, allowed_tools=tool_names, **kwargs # type: ignore
|
||||
)
|
||||
return AgentExecutor.from_agent_and_tools(
|
||||
agent=agent, tools=tools, verbose=True
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue