Class: Assistant::AnalyticsToolBuilder

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

Overview

Routes to per-provider tool builders for analytics integrations.

Usage (via ChatToolBuilder):
tools = Assistant::AnalyticsToolBuilder.tools('google_analytics')

Class Method Summary collapse

Class Method Details

.tools(service_key) ⇒ Array<RubyLLM::Tool>

Returns tools for the requested analytics provider.

Parameters:

  • service_key (String)

    provider identifier, e.g. 'google_analytics'

Returns:

  • (Array<RubyLLM::Tool>)

    tools for the requested analytics provider



14
15
16
17
18
19
20
21
22
23
# File 'app/services/assistant/analytics_tool_builder.rb', line 14

def tools(service_key)
  case service_key
  when 'google_analytics' then Ga4ToolBuilder.tools
  when 'search_console'   then GscToolBuilder.tools
  when 'google_ads'       then GoogleAdsToolBuilder.tools
  when 'ahrefs'           then AhrefsToolBuilder.tools
  when 'keywords_people_use' then KwpuToolBuilder.tools
  else []
  end
end