fix: streaming issue fixed for build versions (#1006)
Browse files* fix: streaming issue fixed for build versions
* added keep-alive header
- 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/
|
|
|
|
| 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) {
|