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
412 413 414 415 416 417 418 419 420 421 422 |
# File 'lib/ruby_llm/active_record/acts_as_legacy.rb', line 412 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 |