module RubyLLM::ActiveRecord::MessageMethods

MessageMethods is mixed into models that call acts_as_message. It converts persisted records into RubyLLM::Message objects and adds token, cost, prompt-caching, and rendering helpers.

message = chat_record.messages.last
message.tokens.input
message.cost.total
message.cache_until_here!