Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions lib/ruby_llm/template/railtie.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,17 @@ class Railtie < Rails::Railtie
config.template_directory ||= app.root.join("app", "prompts")
end
end

initializer "ruby_llm_template.active_record" do
if defined?(RubyLLM::ActiveRecord::ChatMethods)
RubyLLM::ActiveRecord::ChatMethods.module_eval do
def with_template(...)
to_llm.with_template(...)
self
end
end
end
end
end
end
end