From dfd6ccbd41083bbab039c11df59097b4b965afd6 Mon Sep 17 00:00:00 2001 From: AskaEth Date: Sun, 28 Jun 2026 11:42:14 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=A7=BB=E9=99=A4=20DuckDuckGo=20?= =?UTF-8?q?=E5=9B=9E=E9=80=80=EF=BC=8Cweb=5Fsearch=20=E4=BB=85=E7=94=A8=20?= =?UTF-8?q?SearXNG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/ai-core/cmd/main.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/backend/ai-core/cmd/main.go b/backend/ai-core/cmd/main.go index 4f44efc..4be5e99 100644 --- a/backend/ai-core/cmd/main.go +++ b/backend/ai-core/cmd/main.go @@ -38,7 +38,6 @@ import ( pluginFile "git.yeij.top/AskaEth/Cyrene-Plugins/file" pluginHTTP "git.yeij.top/AskaEth/Cyrene-Plugins/http" pluginWF "git.yeij.top/AskaEth/Cyrene-Plugins/web_fetch" - pluginWS "git.yeij.top/AskaEth/Cyrene-Plugins/web_search" ) var cfg Config @@ -195,12 +194,10 @@ func main() { registerPlugins(toolRegistry) for _, t := range pluginFile.NewFilePlugin(dataDir).Tools() { toolRegistry.Register(t) } for _, t := range pluginHTTP.NewHTTPPlugin().Tools() { toolRegistry.Register(t) } - // 优先使用本地 SearXNG,不可用时回退 DuckDuckGo + // 仅使用本地 SearXNG(国内 DuckDuckGo 不可用) searxngURL := getEnv("SEARXNG_URL", "") if searxngURL != "" { toolRegistry.Register(wrapTool(tools.NewWebSearchToolWithURL(searxngURL), "web_search", "Search the web via SearXNG", "search")) - } else { - for _, t := range pluginWS.NewWebSearchPlugin().Tools() { toolRegistry.Register(t) } } for _, t := range pluginWF.NewWebFetchPlugin().Tools() { toolRegistry.Register(t) } // ai-core 专属工具 — 通过 sdk.Tool 适配器注册