Class: OllamaChat::TokenEstimator::Estimate

Inherits:
Object
  • Object
show all
Includes:
Utils::ValueFormatter
Defined in:
lib/ollama_chat/token_estimator.rb

Overview

Represents the result of a calculation including raw values and their human-readable formatted strings.

Instance Method Summary collapse

Methods included from Utils::ValueFormatter

#format_bytes, #format_tokens

Instance Method Details

#bytes_formattedString

Returns the byte count as a formatted string.

Returns:

  • (String)

    The formatted byte size.



24
25
26
# File 'lib/ollama_chat/token_estimator.rb', line 24

def bytes_formatted
  format_bytes(bytes)
end

#tokens_formattedString

Returns the byte count in a formatted string (e.g., "1.2 KB").

Returns:

  • (String)

    The formatted byte size.



18
19
20
# File 'lib/ollama_chat/token_estimator.rb', line 18

def tokens_formatted
  format_tokens(tokens)
end