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