Module: LlmCostTracker::Reconciliation::Sources::Fingerprint
- Defined in:
- lib/llm_cost_tracker/reconciliation/sources/fingerprint.rb
Constant Summary collapse
- DIGEST_LENGTH =
16
Class Method Summary collapse
Class Method Details
.compute(keys, attributes) ⇒ Object
13 14 15 16 |
# File 'lib/llm_cost_tracker/reconciliation/sources/fingerprint.rb', line 13 def compute(keys, attributes) source_string = keys.map { |key| attributes[key].to_s }.join("|") Digest::SHA256.hexdigest(source_string)[0, DIGEST_LENGTH] end |