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 |
# File 'lib/llm_cost_tracker/tag_query.rb', line 8 def apply(model, ) = () return model.all if .empty? return json_query(model, ) if model. text_query(model, ) end |
.normalize_tags(tags) ⇒ Object
17 18 19 |
# File 'lib/llm_cost_tracker/tag_query.rb', line 17 def () ( || {}).to_h.transform_keys(&:to_s).transform_values(&:to_s) end |