We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6d12770 commit 6c77ba3Copy full SHA for 6c77ba3
1 file changed
src/routes/chat-completions/handler-streaming.ts
@@ -1,7 +1,7 @@
1
import type { Context } from "hono"
2
3
import consola from "consola"
4
-import { streamSSE } from "hono/streaming"
+import { streamSSE, type SSEMessage } from "hono/streaming"
5
6
import type { ChatCompletionsPayload } from "~/services/copilot/chat-completions/types"
7
@@ -25,9 +25,7 @@ export async function handlerStreaming(c: Context) {
25
26
index++
27
28
- await stream.writeSSE({
29
- data: JSON.stringify(chunk.data),
30
- })
+ await stream.writeSSE(chunk as SSEMessage)
31
}
32
})
33
0 commit comments