refactor: tool

This commit is contained in:
Yeuoly
2024-09-20 02:25:14 +08:00
parent c472ea6c67
commit 661392eaef
524 changed files with 338 additions and 31279 deletions

View File

@ -0,0 +1,30 @@
from core.entities.provider_entities import ProviderConfig
from core.tools.__base.tool import Tool
from core.tools.__base.tool_provider import ToolProviderController
from core.tools.entities.tool_entities import ToolProviderType
class PluginToolProvider(ToolProviderController):
@property
def provider_type(self) -> ToolProviderType:
"""
returns the type of the provider
:return: type of the provider
"""
return ToolProviderType.PLUGIN
def get_tool(self, tool_name: str) -> Tool:
"""
return tool with given name
"""
return super().get_tool(tool_name)
def get_credentials_schema(self) -> dict[str, ProviderConfig]:
"""
get credentials schema
"""
return super().get_credentials_schema()