class RubyLLM::ActiveRecord::Model
A row of the ruby_llm_models table, one per registry entry. Chats point at it through +belongs_to :model+. The listed scope returns the models the provider still serves; unlisted returns the ones kept only because a chat references them.
Public Instance Methods
Source
# File lib/ruby_llm/active_record/model.rb, line 113 def to_llm RubyLLM::Model.new( id: model_id, name: name, provider: provider, family: family, created_at: model_created_at, context_window: context_window, max_output_tokens: max_output_tokens, knowledge_cutoff: knowledge_cutoff, modalities: modalities&.deep_symbolize_keys || {}, capabilities: capabilities, pricing: pricing&.deep_symbolize_keys || {}, metadata: metadata&.deep_symbolize_keys || {}, unlisted_at: unlisted_at ) end
Returns this registry record as a RubyLLM::Model.