Module: RubyLLM::Agents::Filterable Private

Extended by:
ActiveSupport::Concern
Included in:
AgentsController, ExecutionsController
Defined in:
app/controllers/concerns/ruby_llm/agents/filterable.rb

Overview

This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.

Controller concern for parsing and applying filters

Provides methods for parsing filter parameters from requests and applying them to ActiveRecord scopes.

Examples:

Including in a controller

class ExecutionsController < ApplicationController
  include Filterable

  def index
    statuses = parse_array_param(:statuses)
    @scope = apply_status_filter(Execution.all, statuses)
  end
end

Constant Summary collapse

VALID_STATUSES =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Valid status values for filtering

%w[running success error timeout].freeze