diff --git a/lib/ruby_llm/active_record/acts_as.rb b/lib/ruby_llm/active_record/acts_as.rb index a5a904421..6e6f37a46 100644 --- a/lib/ruby_llm/active_record/acts_as.rb +++ b/lib/ruby_llm/active_record/acts_as.rb @@ -154,6 +154,11 @@ def on_end_message(...) self end + def on_tool_call(...) + to_llm.on_tool_call(...) + self + end + def create_user_message(content, with: nil) message_record = messages.create!(role: :user, content: content) persist_content(message_record, with) if with.present?