mirror of
https://github.com/langgenius/dify.git
synced 2026-05-02 16:38:04 +08:00
fix: mypy issues
This commit is contained in:
@ -44,7 +44,7 @@ class PluginToolProviderController(BuiltinToolProviderController):
|
||||
):
|
||||
raise ToolProviderCredentialValidationError("Invalid credentials")
|
||||
|
||||
def get_tool(self, tool_name: str) -> PluginTool:
|
||||
def get_tool(self, tool_name: str) -> PluginTool: # type: ignore
|
||||
"""
|
||||
return tool with given name
|
||||
"""
|
||||
@ -61,7 +61,7 @@ class PluginToolProviderController(BuiltinToolProviderController):
|
||||
plugin_unique_identifier=self.plugin_unique_identifier,
|
||||
)
|
||||
|
||||
def get_tools(self) -> list[PluginTool]:
|
||||
def get_tools(self) -> list[PluginTool]: # type: ignore
|
||||
"""
|
||||
get all tools
|
||||
"""
|
||||
|
||||
@ -59,7 +59,12 @@ class PluginTool(Tool):
|
||||
plugin_unique_identifier=self.plugin_unique_identifier,
|
||||
)
|
||||
|
||||
def get_runtime_parameters(self) -> list[ToolParameter]:
|
||||
def get_runtime_parameters(
|
||||
self,
|
||||
conversation_id: Optional[str] = None,
|
||||
app_id: Optional[str] = None,
|
||||
message_id: Optional[str] = None,
|
||||
) -> list[ToolParameter]:
|
||||
"""
|
||||
get the runtime parameters
|
||||
"""
|
||||
@ -76,6 +81,9 @@ class PluginTool(Tool):
|
||||
provider=self.entity.identity.provider,
|
||||
tool=self.entity.identity.name,
|
||||
credentials=self.runtime.credentials,
|
||||
conversation_id=conversation_id,
|
||||
app_id=app_id,
|
||||
message_id=message_id,
|
||||
)
|
||||
|
||||
return self.runtime_parameters
|
||||
|
||||
Reference in New Issue
Block a user