Class: Assistant::WebSearchToolBuilder
- Inherits:
-
Object
- Object
- Assistant::WebSearchToolBuilder
- Defined in:
- app/services/assistant/web_search_tool_builder.rb
Overview
Builds the web_search RubyLLM::Tool for finding pages on the public web.
The search itself is delegated to Heatwave::WebSearch (Oxylabs parsed
Google SERP). This tool returns organic results only — titles, URLs, and
snippets for relevance triage; reading a result is the fetch_url tool's
job (Heatwave::Crawler), so the pair composes: search finds, fetch reads.
Usage (via ChatToolBuilder):
tools = Assistant::WebSearchToolBuilder.tools
Class Method Summary collapse
-
.tools ⇒ Array<RubyLLM::Tool>
The web_search tool(s).
Class Method Details
.tools ⇒ Array<RubyLLM::Tool>
Returns the web_search tool(s).
17 18 19 20 21 22 |
# File 'app/services/assistant/web_search_tool_builder.rb', line 17 def tools @tools ||= [build_web_search_tool] rescue StandardError => e Rails.logger.warn("[WebSearchToolBuilder] Failed to build web_search tools: #{e.}") [] end |