Multiple minor fixes (#1530)

This commit is contained in:
Lianmin Zheng
2024-09-28 14:43:35 -07:00
committed by GitHub
parent 065bb94753
commit 4e4459b91f
8 changed files with 26 additions and 23 deletions

View File

@@ -615,7 +615,7 @@ class Runtime:
if chunk == "data: [DONE]\n\n":
break
data = json.loads(chunk[5:].strip("\n"))
if hasattr(data, "text"):
if "text" in data:
cur = data["text"][pos:]
if cur:
yield cur