You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Updated acts_as_* helpers to use canonical 'rails-style' foreign keys (#151)
This updates the acts_as_message, acts_as_chat and acts_as_tool class
methods to use Rails-style foreign keys whenever custom class names are
used as options. For example:
```
class FooMessage < ActiveRecord::Base
acts_as_message chat_class: 'FooChat', tool_call_class: 'FooToolCall'
end
```
will now set the foreign key on the `belongs_to :chat` association to be
`foo_chat_id`, instead of `chat_id`, and will set the foreign key on
`belongs_to :parent_tool_call` association to `foo_tool_call_id` instead
of just `tool_call_id`.
This is consistent with Rails' naming conventions for class names and
foreign keys. Changes are backwards-compatible with existing
code/behavior, and don't require a major or minor version bump.
Updated test cases to ensure that the associations are working, but
didn't re-record VCR tests, since I don't have an OpenAPI key.
Closes#150
Co-authored-by: Carmine Paolino <[email protected]>
0 commit comments