Rooni commited on
Commit
52a93ef
·
verified ·
1 Parent(s): f0b1ab4

Update server.js

Browse files
Files changed (1) hide show
  1. server.js +3 -1
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[0].message.content.trim();
 
 
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"}` });