This commit is contained in:
Timothy Jaeryang Baek committed 2025-01-11 20:23:26 -08:00
1 parent 5d3f778b2a
commit b1bcca90b5
2 files changed
+5 -4

No files matched your search

+3 -3
View File
@@ -966,12 +966,12 @@ async def process_chat_response(
if not data.strip():
continue
# "data: " is the prefix for each event
if not data.startswith("data: "):
# "data:" is the prefix for each event
if not data.startswith("data:"):
continue
# Remove the prefix
data = data[len("data: ") :]
data = data[len("data:") :].strip()
try:
data = json.loads(data)