codacus commited on
Commit
78eb3a5
·
unverified ·
1 Parent(s): 49c7129

fix: streaming issue fixed for build versions (#1006)

Browse files

* fix: streaming issue fixed for build versions

* added keep-alive header

Files changed (1) hide show
  1. app/routes/api.chat.ts +2 -1
app/routes/api.chat.ts CHANGED
@@ -139,7 +139,8 @@ async function chatAction({ context, request }: ActionFunctionArgs) {
139
  return new Response(stream.readable, {
140
  status: 200,
141
  headers: {
142
- contentType: 'text/plain; charset=utf-8',
 
143
  },
144
  });
145
  } catch (error: any) {
 
139
  return new Response(stream.readable, {
140
  status: 200,
141
  headers: {
142
+ contentType: 'text/event-stream',
143
+ connection: 'keep-alive',
144
  },
145
  });
146
  } catch (error: any) {