Spaces:
Sleeping
Sleeping
Update server.js
Browse files
server.js
CHANGED
@@ -56,7 +56,9 @@ app.post('/pl', async (req, res) => {
|
|
56 |
});
|
57 |
|
58 |
if (response.data.choices && response.data.choices.length > 0 && response.data.choices[0].message) {
|
59 |
-
const content = response.data.choices
|
|
|
|
|
60 |
res.json({ content });
|
61 |
} else {
|
62 |
res.json({ content: `{"error":"", "title":"Ошибка", "text":"Произошла ошибка на сервере. (Ошибка прочтения)", "okb":"Ок", "oklink":"", "cancelable":"true"}` });
|
|
|
56 |
});
|
57 |
|
58 |
if (response.data.choices && response.data.choices.length > 0 && response.data.choices[0].message) {
|
59 |
+
const content = response.data.choices.trim();
|
60 |
+
|
61 |
+
console.info(response.data.choices.trim());
|
62 |
res.json({ content });
|
63 |
} else {
|
64 |
res.json({ content: `{"error":"", "title":"Ошибка", "text":"Произошла ошибка на сервере. (Ошибка прочтения)", "okb":"Ок", "oklink":"", "cancelable":"true"}` });
|