mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2024-11-22 16:17:57 +01:00
llama.cpp: make Stop button work with streaming disabled (#3620)
This commit is contained in:
parent
f6724a1a01
commit
942ad6067d
@ -125,6 +125,8 @@ class LlamaCppModel:
|
|||||||
|
|
||||||
output = ""
|
output = ""
|
||||||
for completion_chunk in completion_chunks:
|
for completion_chunk in completion_chunks:
|
||||||
|
if shared.stop_everything:
|
||||||
|
break
|
||||||
text = completion_chunk['choices'][0]['text']
|
text = completion_chunk['choices'][0]['text']
|
||||||
output += text
|
output += text
|
||||||
if callback:
|
if callback:
|
||||||
|
Loading…
Reference in New Issue
Block a user