feat: support define tags in tool yaml (#4763)

This commit is contained in:
Yeuoly 2024-05-29 15:19:14 +08:00 • committed by GitHub
commit 74f38eacda
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
82 changed files with 187 additions and 255 deletions

View file

@ -1,6 +1,5 @@
from typing import Any
from core.tools.entities.values import ToolLabelEnum
from core.tools.errors import ToolProviderCredentialValidationError
from core.tools.provider.builtin.searxng.tools.searxng_search import SearXNGSearchTool
from core.tools.provider.builtin_tool_provider import BuiltinToolProviderController
@ -24,8 +23,3 @@ class SearXNGProvider(BuiltinToolProviderController):
)
except Exception as e:
raise ToolProviderCredentialValidationError(str(e))
def _get_tool_labels(self) -> list[ToolLabelEnum]:
return [
ToolLabelEnum.SEARCH, ToolLabelEnum.PRODUCTIVITY
]

View file

@ -8,6 +8,9 @@ identity:
en_US: A free internet metasearch engine.
zh_Hans: 开源互联网元搜索引擎
icon: icon.svg
tags:
- search
- productivity
credentials_for_provider:
searxng_base_url:
type: secret-input