mirror of https://github.com/langgenius/dify.git
[autofix.ci] apply automated fixes
This commit is contained in:
parent
03049edeea
commit
2ef2c1b113
|
|
@ -235,9 +235,7 @@ class FunctionCallAgentRunner(BaseAgentRunner):
|
|||
}
|
||||
else:
|
||||
inputs_to_pass = (
|
||||
kwargs.get("inputs")
|
||||
if tool_instance.tool_provider_type() == ToolProviderType.MCP
|
||||
else None
|
||||
kwargs.get("inputs") if tool_instance.tool_provider_type() == ToolProviderType.MCP else None
|
||||
)
|
||||
# invoke tool
|
||||
tool_invoke_response, message_files, tool_invoke_meta = ToolEngine.agent_invoke(
|
||||
|
|
|
|||
|
|
@ -168,8 +168,9 @@ class MCPTool(Tool):
|
|||
sse_read_timeout=self.sse_read_timeout,
|
||||
provider_entity=provider_entity,
|
||||
) as mcp_client:
|
||||
return mcp_client.invoke_tool(tool_name=self.entity.identity.name, tool_args=tool_parameters,
|
||||
_meta=_meta)
|
||||
return mcp_client.invoke_tool(
|
||||
tool_name=self.entity.identity.name, tool_args=tool_parameters, _meta=_meta
|
||||
)
|
||||
except MCPConnectionError as e:
|
||||
raise ToolInvokeError(f"Failed to connect to MCP server: {e}") from e
|
||||
except Exception as e:
|
||||
|
|
|
|||
|
|
@ -198,7 +198,7 @@ class ToolEngine:
|
|||
conversation_id: str | None = None,
|
||||
app_id: str | None = None,
|
||||
message_id: str | None = None,
|
||||
inputs: dict[str, Any] | None = None,
|
||||
inputs: dict[str, Any] | None = None,
|
||||
) -> Generator[ToolInvokeMessage | ToolInvokeMeta, None, None]:
|
||||
"""
|
||||
Invoke the tool with the given arguments.
|
||||
|
|
|
|||
Loading…
Reference in New Issue