mirror of
https://github.com/langgenius/dify-plugin-daemon.git
synced 2026-07-22 17:56:00 -04:00
15 lines
456 B
Python
15 lines
456 B
Python
from typing import Any
|
|
|
|
from dify_plugin import ToolProvider
|
|
from dify_plugin.errors.tool import ToolProviderCredentialValidationError
|
|
|
|
|
|
class {{ .PluginName | SnakeToCamel }}Provider(ToolProvider):
|
|
def _validate_credentials(self, credentials: dict[str, Any]) -> None:
|
|
try:
|
|
"""
|
|
IMPLEMENT YOUR VALIDATION HERE
|
|
"""
|
|
except Exception as e:
|
|
raise ToolProviderCredentialValidationError(str(e))
|