@tiledesk/tiledesk-server 2.13.23 → 2.13.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -5,6 +5,12 @@
5
5
  🚀 IN PRODUCTION 🚀
6
6
  (https://www.npmjs.com/package/@tiledesk/tiledesk-server/v/2.3.77)
7
7
 
8
+ # 2.13.25
9
+ - Fixed bug: LLM preview doesn't works
10
+
11
+ # 2.13.24
12
+ - Code improvements
13
+
8
14
  # 2.13.23
9
15
  - Updated whatsapp-connector to 1.0.9
10
16
  - Updated messenger-connector to 0.1.28
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tiledesk/tiledesk-server",
3
3
  "description": "The Tiledesk server module",
4
- "version": "2.13.23",
4
+ "version": "2.13.25",
5
5
  "scripts": {
6
6
  "start": "node ./bin/www",
7
7
  "pretest": "mongodb-runner start",
package/routes/faq_kb.js CHANGED
@@ -681,8 +681,9 @@ router.post('/fork/:id_faq_kb', roleChecker.hasRole('admin'), async (req, res) =
681
681
 
682
682
  chatbot.template = "empty";
683
683
 
684
+ let savedChatbot
684
685
  try {
685
- let savedChatbot = await cs.createBot(api_url, token, chatbot, landing_project_id);
686
+ savedChatbot = await cs.createBot(api_url, token, chatbot, landing_project_id);
686
687
  winston.debug("savedChatbot: ", savedChatbot)
687
688
  } catch(err) {
688
689
  winston.error("Error creating new chatbot: ", err);
@@ -692,9 +693,10 @@ router.post('/fork/:id_faq_kb', roleChecker.hasRole('admin'), async (req, res) =
692
693
  if (!savedChatbot) {
693
694
  return res.status(500).send({ success: false, message: "Unable to create new chatbot" });
694
695
  }
695
-
696
+
697
+ let import_result
696
698
  try {
697
- let import_result = await cs.importFaqs(api_url, savedChatbot._id, token, chatbot, landing_project_id);
699
+ import_result = await cs.importFaqs(api_url, savedChatbot._id, token, chatbot, landing_project_id);
698
700
  winston.debug("imported: ", import_result);
699
701
  } catch(err) {
700
702
  winston.error("Error importing intents on new chatbot: ", err);
@@ -24,7 +24,7 @@ class IntegrationService {
24
24
  }
25
25
  }
26
26
 
27
- async getKeyFromIntegration(id_project, integration_name) {
27
+ async getKeyFromIntegration(id_project, integration_name = 'openai') {
28
28
  if (!id_project || !integration_name) {
29
29
  throw({ code: 422, error: "Fields 'id_project', 'integration_name' are mandatory" });
30
30
  }
@@ -38,7 +38,7 @@ class IntegrationService {
38
38
  return integration?.value?.apikey;
39
39
 
40
40
  } catch (err) {
41
- winston.error("Erro getting integration: ", err);
41
+ winston.error("Error getting integration: ", err);
42
42
  throw({ code: err.code || 500, error: err.error || `Error getting integration for ${integration_name} for project ${id_project}` })
43
43
  }
44
44
  }