Spaces:
Sleeping
Sleeping
Update server.js
Browse files
server.js
CHANGED
@@ -61,7 +61,7 @@ app.post('/generate', generateLimiter, async (req, res) => {
|
|
61 |
'Content-Type': 'application/json',
|
62 |
},
|
63 |
});
|
64 |
-
data = json.loads(response.text)
|
65 |
console.log(data['choices'][0]['message']['content'].strip());
|
66 |
res.json(data['choices'][0]['message']['content'].strip());
|
67 |
} catch (error) {
|
|
|
61 |
'Content-Type': 'application/json',
|
62 |
},
|
63 |
});
|
64 |
+
const data = json.loads(response.text)
|
65 |
console.log(data['choices'][0]['message']['content'].strip());
|
66 |
res.json(data['choices'][0]['message']['content'].strip());
|
67 |
} catch (error) {
|