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