Class: TranslationAPI::Llm::Log
- Inherits:
-
Object
- Object
- TranslationAPI::Llm::Log
- Defined in:
- lib/translation_api/llm/log.rb
Instance Method Summary collapse
-
#initialize(provider:, response:, cost:) ⇒ Log
constructor
A new instance of Log.
- #write ⇒ Object
Constructor Details
#initialize(provider:, response:, cost:) ⇒ Log
Returns a new instance of Log.
8 9 10 11 12 |
# File 'lib/translation_api/llm/log.rb', line 8 def initialize(provider:, response:, cost:) @provider = provider @response = response @cost = cost end |
Instance Method Details
#write ⇒ Object
14 15 16 17 18 |
# File 'lib/translation_api/llm/log.rb', line 14 def write write_translated_text write_used_tokens write_total_cost end |