mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-08-02 12:05:19 +02:00
AI chat layout skeleton
This commit is contained in:
parent
dd75cadebc
commit
d1b83541c1
23 changed files with 231 additions and 1 deletions
10
app/models/message.rb
Normal file
10
app/models/message.rb
Normal file
|
@ -0,0 +1,10 @@
|
|||
class Message < ApplicationRecord
|
||||
belongs_to :chat
|
||||
|
||||
enum :role, { user: "user", assistant: "assistant", system: "system" }
|
||||
|
||||
validates :content, presence: true
|
||||
validates :role, presence: true
|
||||
|
||||
scope :conversation, -> { where(debug_mode: false, role: [ :user, :assistant ]) }
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue