add self-hosted web search via SearXNG
new search_web tool calls SearXNG (cluster-internal, free, no tracking) instead of Mistral's built-in web_search ($0.03/query + rate limits). returns structured results from DuckDuckGo, Wikipedia, StackOverflow, GitHub, arXiv, and Brave. no API keys, no cost, no rate limits. removed Mistral AgentTool::web_search() from orchestrator — replaced by the custom tool which goes through Sol's normal tool dispatch.
This commit is contained in:
@@ -3,6 +3,7 @@ pub mod devtools;
|
||||
pub mod identity;
|
||||
pub mod research;
|
||||
pub mod room_history;
|
||||
pub mod web_search;
|
||||
pub mod room_info;
|
||||
pub mod script;
|
||||
pub mod search;
|
||||
@@ -197,6 +198,9 @@ impl ToolRegistry {
|
||||
tools.extend(identity::tool_definitions());
|
||||
}
|
||||
|
||||
// Web search (SearXNG — free, self-hosted)
|
||||
tools.push(web_search::tool_definition());
|
||||
|
||||
// Research tool (depth 0 — orchestrator level)
|
||||
if let Some(def) = research::tool_definition(4, 0) {
|
||||
tools.push(def);
|
||||
@@ -329,6 +333,13 @@ impl ToolRegistry {
|
||||
anyhow::bail!("Identity (Kratos) integration not configured")
|
||||
}
|
||||
}
|
||||
"search_web" => {
|
||||
if let Some(ref searxng) = self.config.services.searxng {
|
||||
web_search::search(&searxng.url, arguments).await
|
||||
} else {
|
||||
anyhow::bail!("Web search not configured (missing [services.searxng])")
|
||||
}
|
||||
}
|
||||
"research" => {
|
||||
if let (Some(ref mistral), Some(ref store)) = (&self.mistral, &self.store) {
|
||||
anyhow::bail!("research tool requires execute_research() — call with room + event_id context")
|
||||
|
||||
Reference in New Issue
Block a user