Class: Assistant::DatadiveToolBuilder

Inherits:
Object
  • Object
show all
Defined in:
app/services/assistant/datadive_tool_builder.rb

Overview

Builds the Sunny chat tools for the "Amazon DataDive" service. Each tool is
a thin RubyLLM::Tool wrapper over Api::Datadive::Client (read-only v1
surface) — Niche research, keyword lists, competitor stats, Rank Radar
rankings, and per-fulfillment-center seller inventory.

Registered in ChatToolBuilder under the amazon_datadive
service key (TOOL_SERVICE_MAP, chat_services, build_service_tools).

See Also:

Class Method Summary collapse

Class Method Details

.toolsArray<RubyLLM::Tool>

Returns instantiated DataDive tools (empty on build failure).

Returns:

  • (Array<RubyLLM::Tool>)

    instantiated DataDive tools (empty on build failure)



16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# File 'app/services/assistant/datadive_tool_builder.rb', line 16

def tools
  @tools ||= [
    build_list_niches_tool,
    build_niche_competitors_tool,
    build_niche_keywords_tool,
    build_niche_keyword_roots_tool,
    build_niche_ranking_juices_tool,
    build_list_rank_radars_tool,
    build_rank_radar_keywords_tool,
    build_asin_inventory_tool
  ]
rescue StandardError => e
  Rails.logger.warn("[DatadiveToolBuilder] Failed to build DataDive tools: #{e.message}")
  []
end