OlympiaAI / raix-rails

Ruby AI eXtensions for Rails
MIT License
49 stars 4 forks source link

History module #2

Open loicboutet opened 1 week ago

loicboutet commented 1 week ago

This is a first draft to change raix-rails to a rails engine. I'm not very used to rails engine and had some trouble to setup the tests. If you see anything that looks weird tell me !

Anyway it seems to work quite well right now. And adding include Raix::History in your model is going to add a relationship to chat_messages and the transcript method is going to be overloaded.

I still have a few tests to do to make sure everything work as intended in conjuction with ChatCompletion. But I wanted to show the work early to make sure if everything seems good.