Spaces:
Paused
Paused
Update app/editor/fetch-sse.ts
Browse files- app/editor/fetch-sse.ts +2 -4
app/editor/fetch-sse.ts
CHANGED
@@ -51,6 +51,7 @@ export async function fetchSSE(
|
|
51 |
}
|
52 |
|
53 |
|
|
|
54 |
const msg = `llm error ${res.status}: ${reason}`
|
55 |
const error = new llmError(msg, { cause: res })
|
56 |
error.statusCode = res.status
|
@@ -59,10 +60,7 @@ export async function fetchSSE(
|
|
59 |
}
|
60 |
|
61 |
const parser = createParser((event) => {
|
62 |
-
|
63 |
-
|
64 |
-
onMessage(event.data)
|
65 |
-
}
|
66 |
})
|
67 |
|
68 |
// handle special response errors
|
|
|
51 |
}
|
52 |
|
53 |
|
54 |
+
|
55 |
const msg = `llm error ${res.status}: ${reason}`
|
56 |
const error = new llmError(msg, { cause: res })
|
57 |
error.statusCode = res.status
|
|
|
60 |
}
|
61 |
|
62 |
const parser = createParser((event) => {
|
63 |
+
onMessage(event.data)
|
|
|
|
|
|
|
64 |
})
|
65 |
|
66 |
// handle special response errors
|