Class: LlmCostTracker::ModelsController

Inherits:
ApplicationController show all
Defined in:
app/controllers/llm_cost_tracker/models_controller.rb

Instance Method Summary collapse

Instance Method Details

#indexObject



5
6
7
8
9
10
11
12
13
# File 'app/controllers/llm_cost_tracker/models_controller.rb', line 5

def index
  @sort = params[:sort].to_s
  @rows = Dashboard::TopModels.call(
    scope: Dashboard::Filter.call(params: params),
    limit: nil,
    sort: @sort
  )
  @latency_available = LlmApiCall.latency_column?
end