mirror of
https://github.com/HIllya51/LunaTranslator.git
synced 2024-12-29 00:24:13 +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()
|
||||
if not response_data:
|
||||
continue
|
||||
if response_data == "data: [DONE]":
|
||||
break
|
||||
try:
|
||||
json_data = json.loads(response_data[6:])
|
||||
rs = json_data["choices"][0].get("finish_reason")
|
||||
|
Loading…
x
Reference in New Issue
Block a user