Module: LlmLogs::BatchesHelper
- Defined in:
- app/helpers/llm_logs/batches_helper.rb
Constant Summary collapse
- ROUTING_VALUE_LENGTH =
80
Instance Method Summary collapse
Instance Method Details
#routing_display_value(value) ⇒ Object
5 6 7 8 9 10 |
# File 'app/helpers/llm_logs/batches_helper.rb', line 5 def routing_display_value(value) full_value = routing_full_value(value) return full_value if full_value.length <= ROUTING_VALUE_LENGTH "#{full_value.first(ROUTING_VALUE_LENGTH - 3)}..." end |
#routing_full_value(value) ⇒ Object
12 13 14 15 16 17 18 19 20 21 |
# File 'app/helpers/llm_logs/batches_helper.rb', line 12 def routing_full_value(value) case value when Hash, Array JSON.generate(value) when nil "null" else value.to_s end end |