llama.cpp: make Stop button work with streaming disabled (#3620)

This commit is contained in:
Cebtenzzre 2023-08-18 23:17:27 -04:00 committed by GitHub
parent f6724a1a01
commit 942ad6067d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -125,6 +125,8 @@ class LlamaCppModel:
output = ""
for completion_chunk in completion_chunks:
if shared.stop_everything:
break
text = completion_chunk['choices'][0]['text']
output += text
if callback: