fix: check webhook key of Wecom tool in valid UUID form and fix typo (#2719)
parent
405a00bb2c
commit
0ac250a035
@ -1,8 +1,8 @@
|
||||
from core.tools.provider.builtin.wecom.tools.wecom_group_bot import WecomRepositoriesTool
|
||||
from core.tools.provider.builtin.wecom.tools.wecom_group_bot import WecomGroupBotTool
|
||||
from core.tools.provider.builtin_tool_provider import BuiltinToolProviderController
|
||||
|
||||
|
||||
class WecomProvider(BuiltinToolProviderController):
|
||||
def _validate_credentials(self, credentials: dict) -> None:
|
||||
WecomRepositoriesTool()
|
||||
WecomGroupBotTool()
|
||||
pass
|
||||
|
||||
@ -0,0 +1,9 @@
|
||||
import uuid
|
||||
|
||||
|
||||
def is_valid_uuid(uuid_str: str) -> bool:
|
||||
try:
|
||||
uuid.UUID(uuid_str)
|
||||
return True
|
||||
except Exception:
|
||||
return False
|
||||
Loading…
Reference in New Issue