mirror of
https://github.com/HIllya51/LunaTranslator.git
synced 2025-01-01 10:04:12 +08:00
.
This commit is contained in:
parent
ad22ef9cad
commit
eb75096b51
@ -84,6 +84,8 @@ class gptcommon(basetrans):
|
|||||||
response_data = chunk.decode("utf-8").strip()
|
response_data = chunk.decode("utf-8").strip()
|
||||||
if not response_data:
|
if not response_data:
|
||||||
continue
|
continue
|
||||||
|
if response_data == "data: [DONE]":
|
||||||
|
break
|
||||||
try:
|
try:
|
||||||
json_data = json.loads(response_data[6:])
|
json_data = json.loads(response_data[6:])
|
||||||
rs = json_data["choices"][0].get("finish_reason")
|
rs = json_data["choices"][0].get("finish_reason")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user