Module: LlmCostTracker::TagQuery
- Defined in:
- lib/llm_cost_tracker/tag_query.rb
Class Method Summary collapse
Class Method Details
.apply(model, tags) ⇒ Object
8 9 10 11 12 13 14 15 16 |
# File 'lib/llm_cost_tracker/tag_query.rb', line 8 def apply(model, ) = () return model.all if .empty? return postgres_json_query(model, ) if model. return mysql_json_query(model, ) if model. text_query(model, ) end |
.normalize_tags(tags) ⇒ Object
18 19 20 |
# File 'lib/llm_cost_tracker/tag_query.rb', line 18 def () ( || {}).to_h.transform_keys(&:to_s).transform_values(&:to_s) end |