mirror of
https://github.com/langgenius/dify.git
synced 2026-05-05 18:08:07 +08:00
Merge branch 'fix/chore-fix' into dev/plugin-deploy
This commit is contained in:
@ -45,15 +45,9 @@ class BuiltinToolProviderController(ToolProviderController):
|
||||
),
|
||||
)
|
||||
|
||||
def _get_builtin_tools(self) -> list[BuiltinTool]:
|
||||
"""
|
||||
returns a list of tools that the provider can provide
|
||||
|
||||
:return: list of tools
|
||||
"""
|
||||
if self.tools:
|
||||
return self.tools
|
||||
self._load_tools()
|
||||
|
||||
def _load_tools(self):
|
||||
provider = self.entity.identity.name
|
||||
tool_path = path.join(path.dirname(path.realpath(__file__)), "providers", provider, "tools")
|
||||
# get all the yaml files in the tool path
|
||||
@ -86,7 +80,14 @@ class BuiltinToolProviderController(ToolProviderController):
|
||||
)
|
||||
|
||||
self.tools = tools
|
||||
return tools
|
||||
|
||||
def _get_builtin_tools(self) -> list[BuiltinTool]:
|
||||
"""
|
||||
returns a list of tools that the provider can provide
|
||||
|
||||
:return: list of tools
|
||||
"""
|
||||
return self.tools
|
||||
|
||||
def get_credentials_schema(self) -> list[ProviderConfig]:
|
||||
"""
|
||||
|
||||
@ -18,7 +18,6 @@ class PluginTool(Tool):
|
||||
self.tenant_id = tenant_id
|
||||
self.runtime_parameters = None
|
||||
|
||||
@property
|
||||
def tool_provider_type(self) -> ToolProviderType:
|
||||
return ToolProviderType.PLUGIN
|
||||
|
||||
|
||||
Reference in New Issue
Block a user