Spaces:
Running
Running
Update server.js
Browse files
server.js
CHANGED
@@ -127,7 +127,7 @@ app.post('/crebeta', async (req, res) => {
|
|
127 |
|
128 |
if (response.data.choices && response.data.choices.length > 0 && response.data.choices[0].message) {
|
129 |
const content = response.data.choices[0].message.content.trim();
|
130 |
-
|
131 |
res.json({ content });
|
132 |
} else {
|
133 |
res.status(500).json({ content: 'errora' }); // Ошибка прочтения
|
|
|
127 |
|
128 |
if (response.data.choices && response.data.choices.length > 0 && response.data.choices[0].message) {
|
129 |
const content = response.data.choices[0].message.content.trim();
|
130 |
+
// console.log(`\n---\nПользователь: ${prompt}\n Ответ:\n ${content}`);
|
131 |
res.json({ content });
|
132 |
} else {
|
133 |
res.status(500).json({ content: 'errora' }); // Ошибка прочтения
|