Module: OllamaChat::Utils::ValueFormatter
- Included in:
- Chat, FollowChat, Tools::Concern
- Defined in:
- lib/ollama_chat/utils/value_formatter.rb
Overview
Module to format values for user consumption.
Instance Method Summary collapse
-
#format_bytes(bytes) ⇒ String
Formats a byte value into a human‑readable string with units.
Instance Method Details
#format_bytes(bytes) ⇒ String
Formats a byte value into a human‑readable string with units
7 8 9 |
# File 'lib/ollama_chat/utils/value_formatter.rb', line 7 def format_bytes(bytes) Tins::Unit.format(bytes, unit: ?B, prefix: 1024, format: '%.1f %U') end |