Module: LLM::ActiveRecord::ActsAsAgent::InstanceMethods
- Defined in:
- lib/llm/active_record/acts_as_agent.rb
Instance Method Summary collapse
-
#llm ⇒ LLM::Provider
Returns the resolved provider instance for this record.
Instance Method Details
#llm ⇒ LLM::Provider
Returns the resolved provider instance for this record.
93 94 95 96 97 98 99 100 101 102 |
# File 'lib/llm/active_record/acts_as_agent.rb', line 93 def llm = self.class. columns = Utils.columns() provider = self[columns[:provider_column]] kwargs = Utils.(self, [:provider], ActsAsAgent::EMPTY_HASH) return @llm if @llm @llm = LLM.method(provider).call(**kwargs) @llm.tracer = Utils.resolve_option(self, [:tracer]) if [:tracer] @llm end |