1
0
Fork 0
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:
Zach Gollwitzer 2025-03-12 14:06:42 -04:00
parent d1b83541c1
commit 3f9858a67f
9 changed files with 127 additions and 13 deletions

View file

@ -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