This gem provides an engine for the popular boxcars gem. Once installed to your Rails application, you can navigate to /boxcars/station/chat to do Q&A with ActiveRecord using an LLM for translation.
Usage
How to use my plugin.
Installation
Add this line to your application's Gemfile:
gem "boxcars-station"
And then execute:
$ bundle
Or install it yourself as:
$ gem install boxcars-station
Configure Permissions and Route
Note - for security, you should probably mount this only for Admins for now since this is early days and we haven't hardened Boxcars to prevent malicious prompt injection. For example, if you use Adminstrate, you could do the following in the routes file:
authenticated :user, ->(u) { u.admin? } do
mount Boxcars::Station::Engine => "/boxcars/station"
end
Initializer
by default, Boxcars-station is set to read-only, but will consider all models. To limit the scope, create an initializer to configure the settings with something like:
Boxcars::Station.configure do |config|
config.read_only = false
config.active_record_models = [Model1, Model2, ...]
end
Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/BoxcarsAI/boxcars-station. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the code of conduct.
License
The gem is available as open source under the terms of the MIT License.
Code of Conduct
Everyone interacting in the Boxcars project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.