From 78eb3a5f34e254f0753056d87ff40e87628b8e6c Mon Sep 17 00:00:00 2001 From: Anirban Kar Date: Mon, 6 Jan 2025 19:18:52 +0530 Subject: [PATCH] fix: streaming issue fixed for build versions (#1006) * fix: streaming issue fixed for build versions * added keep-alive header --- app/routes/api.chat.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/routes/api.chat.ts b/app/routes/api.chat.ts index 05f8746c..8c15bf27 100644 --- a/app/routes/api.chat.ts +++ b/app/routes/api.chat.ts @@ -139,7 +139,8 @@ async function chatAction({ context, request }: ActionFunctionArgs) { return new Response(stream.readable, { status: 200, headers: { - contentType: 'text/plain; charset=utf-8', + contentType: 'text/event-stream', + connection: 'keep-alive', }, }); } catch (error: any) {