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) {