mirror of
https://github.com/HIllya51/LunaTranslator.git
synced 2024-12-29 16:44:13 +08:00
fix
This commit is contained in:
parent
66a3e9f3c1
commit
cf9ced3931
@ -292,7 +292,7 @@ class TS(basetrans):
|
|||||||
output_text = ""
|
output_text = ""
|
||||||
for o in output:
|
for o in output:
|
||||||
if o["choices"][0]["finish_reason"] == None:
|
if o["choices"][0]["finish_reason"] == None:
|
||||||
text_partial = o["choices"][0]["delta"]["content"]
|
text_partial = o["choices"][0]["delta"].get("content", "")
|
||||||
output_text += text_partial
|
output_text += text_partial
|
||||||
yield text_partial
|
yield text_partial
|
||||||
completion_tokens += 1
|
completion_tokens += 1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user