Class: LlmLogs::BatchesController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- LlmLogs::BatchesController
- Defined in:
- app/controllers/llm_logs/batches_controller.rb
Instance Method Summary collapse
Instance Method Details
#index ⇒ Object
3 4 5 6 7 8 |
# File 'app/controllers/llm_logs/batches_controller.rb', line 3 def index @batches = Batch.recent @batches = @batches.where(purpose: params[:purpose]) if params[:purpose].present? @batches = @batches.where(status: params[:status]) if params[:status].present? @batches = @batches.page(params[:page]).per(50) end |
#show ⇒ Object
10 11 12 13 |
# File 'app/controllers/llm_logs/batches_controller.rb', line 10 def show @batch = Batch.find(params[:id]) @requests = @batch.requests.order(:created_at).page(params[:page]).per(100) end |