llama.cpp: make Stop button work with streaming disabled (#3620)
This commit is contained in:
parent
f6724a1a01
commit
942ad6067d
1 changed files with 2 additions and 0 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue