Spaces:
Running
Running
feat: break stream processing loop upon receiving complete stage event
Browse files- index.html +3 -0
index.html
CHANGED
|
@@ -503,6 +503,9 @@
|
|
| 503 |
if (event.stage === "error") {
|
| 504 |
throw new Error(event.message);
|
| 505 |
}
|
|
|
|
|
|
|
|
|
|
| 506 |
}
|
| 507 |
}
|
| 508 |
|
|
|
|
| 503 |
if (event.stage === "error") {
|
| 504 |
throw new Error(event.message);
|
| 505 |
}
|
| 506 |
+
if (event.stage === "complete") {
|
| 507 |
+
break;
|
| 508 |
+
}
|
| 509 |
}
|
| 510 |
}
|
| 511 |
|