FIX: eat all leading spaces llms provide when they stream them (#1280)

* FIX: eat all leading spaces llms provide when they stream them

* improve so we don't stop replying...
This commit is contained in:
Sam
2025-04-24 22:07:26 +10:00
committed by GitHub
parent 2060426709
commit 65718f6dbe
2 changed files with 7 additions and 1 deletions
+3
View File
@@ -39,6 +39,9 @@ module DiscourseAi
def <<(partial)
return if partial.to_s.empty?
# we throw away leading spaces prior to message creation for now
# by design
return if partial.to_s.blank? && !@reply
if @client_id
ChatSDK::Channel.stop_reply(