From 2e87d9c2e1d693ebb3f18da788f495fad7301a40 Mon Sep 17 00:00:00 2001 From: charnould Date: Thu, 16 Jan 2025 17:45:58 +0100 Subject: [PATCH] fix: change `Content-Type` from `text/plain` to `text/event-stream` --- controllers/GET.ai.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/controllers/GET.ai.ts b/controllers/GET.ai.ts index dee5424..7d667f1 100644 --- a/controllers/GET.ai.ts +++ b/controllers/GET.ai.ts @@ -203,8 +203,7 @@ export const controller = async (c: Context) => { // If incoming request comes from www: return a stream c.header('X-Vercel-AI-Data-Stream', 'v1') - c.header('Content-Type', 'text/plain; charset=utf-8') - // c.header('Content-Type', 'text/event-stream') + c.header('Content-Type', 'text/event-stream; charset=utf-8') return stream(c, (stream) => stream