Update stream.ts

This commit is contained in:
Zhuyi Xue 2025-05-08 15:17:21 -07:00 • committed by GitHub
parent 5db24e4bbc
commit a13df1f613
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -58,7 +58,7 @@ function parseDataLine(line: string): any {
}
function parseSseLine(line: string): { done: boolean; data: any } {
if (line.startsWith("data: [DONE]")) {
if (line.startsWith("data:[DONE]") || line.startsWith("data: [DONE]")) {
return { done: true, data: undefined };
}
if (line.startsWith("data:")) {