Module: LLM::ActiveRecord::ActsAsAgent::InstanceMethods

Defined in:
lib/llm/active_record/acts_as_agent.rb

Instance Method Summary collapse

Instance Method Details

#llmLLM::Provider

Returns the resolved provider instance for this record.

Returns:



96
97
98
99
100
101
102
# File 'lib/llm/active_record/acts_as_agent.rb', line 96

def llm
  options = self.class.llm_plugin_options
  return @llm if @llm
  @llm = Utils.resolve_provider(self, options, ActsAsAgent::EMPTY_HASH)
  @llm.tracer = Utils.resolve_option(self, options[:tracer]) if options[:tracer]
  @llm
end