1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-08-10 07:55:21 +02:00

Remove stale class

This commit is contained in:
Zach Gollwitzer 2025-03-31 16:29:08 -04:00
parent 38ee33e9f7
commit 973ba519db

View file

@ -1,29 +0,0 @@
class Assistant::ResponseStreamer
def initialize(assistant_message, follow_up_streamer: nil)
@assistant_message = assistant_message
@follow_up_streamer = follow_up_streamer
end
def call(chunk)
case chunk.type
when "output_text"
assistant_message.content += chunk.data
assistant_message.save!
when "response"
response = chunk.data
chat.update!(latest_assistant_response_id: response.id)
end
end
private
attr_reader :assistant_message, :follow_up_streamer
def chat
assistant_message.chat
end
# If a follow-up streamer is provided, this is the first response to the LLM
def first_response?
follow_up_streamer.present?
end
end