Update server.js
Browse files
server.js
CHANGED
|
@@ -26,8 +26,8 @@ app.post("/chat", async (req, res) => {
|
|
| 26 |
|
| 27 |
response.data.on("data", (chunk) => {
|
| 28 |
try {
|
| 29 |
-
const parsed = chunk
|
| 30 |
-
if (parsed?.response) res.write(parsed?.response);
|
| 31 |
} catch (err) {}
|
| 32 |
});
|
| 33 |
|
|
|
|
| 26 |
|
| 27 |
response.data.on("data", (chunk) => {
|
| 28 |
try {
|
| 29 |
+
const parsed = chunk?.toString()
|
| 30 |
+
if (parsed?.response || parsed) res.write(parsed?.response || parsed);
|
| 31 |
} catch (err) {}
|
| 32 |
});
|
| 33 |
|