mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2026-01-25 10:00:50 +01:00
llama.cpp: fix unicode decoding (closes #6856)
This commit is contained in:
parent
ba976d1390
commit
9c9df2063f
|
|
@ -152,7 +152,7 @@ class LlamaServer:
|
|||
full_text = ""
|
||||
|
||||
# Process the streaming response
|
||||
for line in response.iter_lines(decode_unicode=True):
|
||||
for line in response.iter_lines():
|
||||
if shared.stop_everything:
|
||||
break
|
||||
|
||||
|
|
@ -160,6 +160,8 @@ class LlamaServer:
|
|||
continue
|
||||
|
||||
try:
|
||||
line = line.decode('utf-8')
|
||||
|
||||
# Check if the line starts with "data: " and remove it
|
||||
if line.startswith('data: '):
|
||||
line = line[6:] # Remove the "data: " prefix
|
||||
|
|
|
|||
Loading…
Reference in a new issue