Spaces:
Sleeping
Sleeping
Update server.js
Browse files
server.js
CHANGED
|
@@ -85,7 +85,7 @@ app.post('/gen', async (req, res) => {
|
|
| 85 |
console.log(response);
|
| 86 |
|
| 87 |
const content = JSON.parse(response.data);
|
| 88 |
-
res.json({
|
| 89 |
|
| 90 |
} else {
|
| 91 |
const content = response;
|
|
|
|
| 85 |
console.log(response);
|
| 86 |
|
| 87 |
const content = JSON.parse(response.data);
|
| 88 |
+
res.json({ content: content.candidates[0].content.parts.map(part => part.text).join('') });
|
| 89 |
|
| 90 |
} else {
|
| 91 |
const content = response;
|