Compare commits

...

2 Commits

Author SHA1 Message Date
史悦
1bc8d41559 修改tts地址 2025-05-16 13:24:49 +08:00
史悦
5a72eb7c64 增加 WebSearch 返回结果,加入今天的日期 2025-05-14 16:15:09 +08:00
2 changed files with 5 additions and 4 deletions

View File

@ -8,9 +8,9 @@ namespace GLMSearch.Tools
[McpServerToolType] [McpServerToolType]
public static class GLMWebSearch public static class GLMWebSearch
{ {
[McpServerTool(Name = "WebSearch"), Description("通过关键字进行Web搜索")] [McpServerTool(Name = "WebSearch"), Description("通过关键字进行Web搜索。返回结果中包含当前的日期,如有必要,请注意甄别搜索结果的时效性。")]
public static string WebSearch( public static string WebSearch(
[Description("搜索关键字")] string keyword, [Description("搜索关键字,注意要输入检索的关键字而不是问题本身,要解决一个问题可能需要多次搜索,直接搜索问题本身可能会限定搜索范围。")] string keyword,
[Description("搜索引擎,请务必从[search_std,search_pro,search_pro_quark]search_pro_quark")] string search_engine = "search_pro_quark") [Description("搜索引擎,请务必从[search_std,search_pro,search_pro_quark]search_pro_quark")] string search_engine = "search_pro_quark")
{ {
Console.WriteLine($"接收到搜索任务:{keyword}"); Console.WriteLine($"接收到搜索任务:{keyword}");
@ -44,7 +44,8 @@ namespace GLMSearch.Tools
new JProperty("content", result["content"]), new JProperty("content", result["content"]),
new JProperty("title", result["title"]), new JProperty("title", result["title"]),
new JProperty("media", result["media"]), new JProperty("media", result["media"]),
new JProperty("link", result["link"]) new JProperty("link", result["link"]),
new JProperty("today", DateTime.Now.ToString("yyyy-MM-dd"))
); );
}).ToList(); }).ToList();

View File

@ -35,7 +35,7 @@ namespace GLMSearch.Tool
filteredPayload[prop.Name] = value; filteredPayload[prop.Name] = value;
} }
} }
var response = "http://148.135.77.70:8010/tts" var response = "https://tts.01061220.xyz/tts"
.SetQueryParams(filteredPayload).GetAsync().GetAwaiter().GetResult(); .SetQueryParams(filteredPayload).GetAsync().GetAwaiter().GetResult();
if (response != null) if (response != null)
{ {