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
464 465 466 467 468 469 470 471 472 473 474 |
# File 'lib/ruby_llm/active_record/acts_as_legacy.rb', line 464 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 |