Module: RubyLLM::Accounting::Usage::Result
- Included in:
- Embedding, Image, Message, Moderation, OCR, Rerank, Speech, Transcription
- Defined in:
- lib/ruby_llm/accounting/usage.rb
Overview
Shared storage for result objects carrying attempt accounting.
Instance Method Summary collapse
-
#ruby_llm_usage_entries ⇒ Object
:nodoc:.
-
#ruby_llm_usage_entries=(entries) ⇒ Object
:nodoc:.
Instance Method Details
#ruby_llm_usage_entries ⇒ Object
:nodoc:
26 27 28 |
# File 'lib/ruby_llm/accounting/usage.rb', line 26 def ruby_llm_usage_entries # :nodoc: @ruby_llm_usage_entries ||= [] end |
#ruby_llm_usage_entries=(entries) ⇒ Object
:nodoc:
30 31 32 33 |
# File 'lib/ruby_llm/accounting/usage.rb', line 30 def ruby_llm_usage_entries=(entries) # :nodoc: @ruby_llm_usage_entries = Array(entries) @ruby_llm_usage_entries.each { |entry| entry. = self if is_a?(Message) } end |