Module: RubyLLM::ActiveRecord::MessageLegacyMethods
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/ruby_llm/active_record/acts_as_legacy.rb
Overview
Methods mixed into message models.
Instance Method Summary collapse
Instance Method Details
#to_llm ⇒ Object
339 340 341 342 343 344 345 346 347 348 349 |
# File 'lib/ruby_llm/active_record/acts_as_legacy.rb', line 339 def to_llm RubyLLM::Message.new( role: role.to_sym, content: extract_content, tool_calls: extract_tool_calls, tool_call_id: extract_tool_call_id, input_tokens: input_tokens, output_tokens: output_tokens, model_id: model_id ) end |