mirror of
https://github.com/ParisNeo/lollms-webui.git
synced 2025-04-23 02:00:46 +00:00
cancel gen repared
This commit is contained in:
parent
46a4f5e0d6
commit
dc203e1e95
@ -488,15 +488,12 @@ class LoLLMsAPPI():
|
||||
)
|
||||
self.socketio.sleep(0)
|
||||
self.current_discussion.update_message(self.current_ai_message_id, self.current_generated_text)
|
||||
if self.cancel_gen:
|
||||
ASCIIColors.warning("Generation canceled")
|
||||
self.cancel_gen = False
|
||||
|
||||
|
||||
# if stop generation is detected then stop
|
||||
if not self.cancel_gen:
|
||||
return True
|
||||
else:
|
||||
self.cancel_gen = False
|
||||
ASCIIColors.warning("Generation canceled")
|
||||
return False
|
||||
else:
|
||||
self.current_generated_text = self.remove_text_from_string(self.current_generated_text, anti_prompt_to_remove)
|
||||
|
Loading…
x
Reference in New Issue
Block a user