mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-07-23 15:19:38 +02:00
Add streaming chat
This commit is contained in:
parent
d1b83541c1
commit
3f9858a67f
9 changed files with 127 additions and 13 deletions
|
@ -4,7 +4,12 @@ class MessagesController < ApplicationController
|
|||
def create
|
||||
@message = @chat.messages.create!(message_params.merge(role: "user"))
|
||||
|
||||
redirect_to chat_path(@chat)
|
||||
AiResponseJob.perform_later(@message)
|
||||
|
||||
respond_to do |format|
|
||||
format.turbo_stream
|
||||
format.html { redirect_to chat_path(@chat) }
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue