Feat/workflow phase2 (#4687)
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
from core.tools.entities.values import ToolLabelEnum
|
||||
from core.tools.errors import ToolProviderCredentialValidationError
|
||||
from core.tools.provider.builtin.devdocs.tools.searchDevDocs import SearchDevDocsTool
|
||||
from core.tools.provider.builtin_tool_provider import BuiltinToolProviderController
|
||||
@@ -7,7 +8,7 @@ class DevDocsProvider(BuiltinToolProviderController):
|
||||
def _validate_credentials(self, credentials: dict) -> None:
|
||||
try:
|
||||
SearchDevDocsTool().fork_tool_runtime(
|
||||
meta={
|
||||
runtime={
|
||||
"credentials": credentials,
|
||||
}
|
||||
).invoke(
|
||||
@@ -18,4 +19,9 @@ class DevDocsProvider(BuiltinToolProviderController):
|
||||
},
|
||||
)
|
||||
except Exception as e:
|
||||
raise ToolProviderCredentialValidationError(str(e))
|
||||
raise ToolProviderCredentialValidationError(str(e))
|
||||
|
||||
def _get_tool_labels(self) -> list[ToolLabelEnum]:
|
||||
return [
|
||||
ToolLabelEnum.SEARCH, ToolLabelEnum.PRODUCTIVITY
|
||||
]
|
Reference in New Issue
Block a user