Browse Source

fix: completion stop invalid (#355)

John Wang 1 year ago
parent
commit
ab115b5f87
1 changed files with 1 additions and 0 deletions
  1. 1 0
      api/core/callback_handler/llm_callback_handler.py

+ 1 - 0
api/core/callback_handler/llm_callback_handler.py

@@ -79,6 +79,7 @@ class LLMCallbackHandler(BaseCallbackHandler):
             self.conversation_message_task.append_message_text(token)
         except ConversationTaskStoppedException as ex:
             self.on_llm_error(error=ex)
+            raise ex
 
         self.llm_message.completion += token