@tiledesk/tiledesk-server 2.9.31 → 2.9.33
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +13 -0
- package/config/labels/widget.json +15 -0
- package/deploy.sh +1 -1
- package/models/kb_setting.js +53 -1
- package/package.json +3 -3
- package/routes/kb.js +205 -35
- package/routes/project.js +108 -1
- package/routes/request.js +85 -94
- package/services/openaiService.js +6 -2
- package/test/kbRoute.js +319 -37
- package/test/projectRoute.js +41 -0
package/CHANGELOG.md
CHANGED
@@ -5,6 +5,19 @@
|
|
5
5
|
🚀 IN PRODUCTION 🚀
|
6
6
|
(https://www.npmjs.com/package/@tiledesk/tiledesk-server/v/2.3.77)
|
7
7
|
|
8
|
+
# 2.10.0
|
9
|
+
- Added support for engine to namespace
|
10
|
+
- Added support for advanced context to kb
|
11
|
+
- Added support for scrape types to kb
|
12
|
+
- Updated tybot-connector to 0.2.112
|
13
|
+
- Updated vxml-connector to 0.1.54
|
14
|
+
- Updated widget.json translation file
|
15
|
+
|
16
|
+
# 2.9.32
|
17
|
+
- Added voice filters in get requests
|
18
|
+
- Added endpoint to get all projects
|
19
|
+
- Updated vxml-connector to 0.1.49
|
20
|
+
|
8
21
|
# 2.9.31
|
9
22
|
- Improved conversations queues management
|
10
23
|
- Added conversation status 150 (ABANDONED)
|
@@ -61,6 +61,7 @@
|
|
61
61
|
"CLOSE_CHAT": "Close chat",
|
62
62
|
"MINIMIZE":"Minimize",
|
63
63
|
"MAXIMIZE":"Maximize",
|
64
|
+
"CONFIRM_CLOSE_CHAT":"Are you sure you wanna close this chat?",
|
64
65
|
|
65
66
|
"INFO_SUPPORT_USER_ADDED_SUBJECT":"you",
|
66
67
|
"INFO_SUPPORT_USER_ADDED_YOU_VERB":"you have been added ",
|
@@ -160,6 +161,7 @@
|
|
160
161
|
"CLOSE_CHAT": "Chiudi chat",
|
161
162
|
"MINIMIZE":"Minimizza",
|
162
163
|
"MAXIMIZE":"Massimizza",
|
164
|
+
"CONFIRM_CLOSE_CHAT":"Vuoi davvero chiudere questa chat?",
|
163
165
|
|
164
166
|
"INFO_SUPPORT_USER_ADDED_SUBJECT":"tu",
|
165
167
|
"INFO_SUPPORT_USER_ADDED_YOU_VERB":"sei stato aggiunto ",
|
@@ -259,6 +261,7 @@
|
|
259
261
|
"CLOSE_CHAT": "Fermer le chat",
|
260
262
|
"MINIMIZE":"Minimiser",
|
261
263
|
"MAXIMIZE":"Maximiser",
|
264
|
+
"CONFIRM_CLOSE_CHAT":"Etes-vous sûr de vouloir fermer cette discussion?",
|
262
265
|
|
263
266
|
"INFO_SUPPORT_USER_ADDED_SUBJECT":"toi",
|
264
267
|
"INFO_SUPPORT_USER_ADDED_YOU_VERB":"ont été ajoutés à ",
|
@@ -358,6 +361,7 @@
|
|
358
361
|
"CLOSE_CHAT": "Cerrar chat",
|
359
362
|
"MINIMIZE":"Minimizar",
|
360
363
|
"MAXIMIZE":"Maximizar",
|
364
|
+
"CONFIRM_CLOSE_CHAT":"¿Estás segura de que quieres cerrar este chat?",
|
361
365
|
|
362
366
|
"INFO_SUPPORT_USER_ADDED_SUBJECT":"tú",
|
363
367
|
"INFO_SUPPORT_USER_ADDED_YOU_VERB":"han sido agregados a ",
|
@@ -457,6 +461,7 @@
|
|
457
461
|
"CLOSE_CHAT": "Chat schließen",
|
458
462
|
"MINIMIZE":"Minimieren",
|
459
463
|
"MAXIMIZE":"Maximieren",
|
464
|
+
"CONFIRM_CLOSE_CHAT":"Möchten Sie diesen Chat wirklich schließen?",
|
460
465
|
|
461
466
|
"INFO_SUPPORT_USER_ADDED_SUBJECT": "Sie",
|
462
467
|
"INFO_SUPPORT_USER_ADDED_YOU_VERB": "Sie wurden hinzugefügt ",
|
@@ -556,6 +561,7 @@
|
|
556
561
|
"CLOSE_CHAT": "Fechar bate-papo",
|
557
562
|
"MINIMIZE":"Minimizar",
|
558
563
|
"MAXIMIZE":"Maximizar",
|
564
|
+
"CONFIRM_CLOSE_CHAT":"Tem certeza de que deseja fechar este bate-papo?",
|
559
565
|
|
560
566
|
"INFO_SUPPORT_USER_ADDED_SUBJECT": "você",
|
561
567
|
"INFO_SUPPORT_USER_ADDED_YOU_VERB": "você foi adicionado ",
|
@@ -655,6 +661,7 @@
|
|
655
661
|
"CLOSE_CHAT": "Закрыть чат",
|
656
662
|
"MINIMIZE":"Свести к минимуму",
|
657
663
|
"MAXIMIZE":"Максимизировать",
|
664
|
+
"CONFIRM_CLOSE_CHAT":"Вы уверены, что хотите закрыть этот чат?",
|
658
665
|
|
659
666
|
"INFO_SUPPORT_USER_ADDED_SUBJECT": "вы",
|
660
667
|
"INFO_SUPPORT_USER_ADDED_YOU_VERB": "вы добавлены ",
|
@@ -754,6 +761,7 @@
|
|
754
761
|
"CLOSE_CHAT": "Sohbeti kapat",
|
755
762
|
"MINIMIZE":"Küçült",
|
756
763
|
"MAXIMIZE":"Büyüt",
|
764
|
+
"CONFIRM_CLOSE_CHAT":"Bu sohbeti kapatmak istediğinizden emin misiniz?",
|
757
765
|
|
758
766
|
"INFO_SUPPORT_USER_ADDED_SUBJECT": "siz",
|
759
767
|
"INFO_SUPPORT_USER_ADDED_YOU_VERB": "eklendiniz ",
|
@@ -855,6 +863,7 @@
|
|
855
863
|
"CLOSE_CHAT": "Затвори ћаскање",
|
856
864
|
"MINIMIZE":"Минимизирајте",
|
857
865
|
"MAXIMIZE":"Максимизирајте",
|
866
|
+
"CONFIRM_CLOSE_CHAT":"Да ли сте сигурни да желите да затворите ово ћаскање?",
|
858
867
|
|
859
868
|
"INFO_SUPPORT_USER_ADDED_SUBJECT":"ти",
|
860
869
|
"INFO_SUPPORT_USER_ADDED_YOU_VERB":"додани сте",
|
@@ -956,6 +965,7 @@
|
|
956
965
|
"CLOSE_CHAT": "إغلاق الدردشة",
|
957
966
|
"MINIMIZE":"تصغير",
|
958
967
|
"MAXIMIZE":"تحقيق أقصى قدر",
|
968
|
+
"CONFIRM_CLOSE_CHAT":"هل أنت متأكد أنك تريد إغلاق هذه الدردشة؟",
|
959
969
|
|
960
970
|
"INFO_SUPPORT_USER_ADDED_SUBJECT": "أنت",
|
961
971
|
"INFO_SUPPORT_USER_ADDED_YOU_VERB": "لقد تم اضافتك ",
|
@@ -1057,6 +1067,7 @@
|
|
1057
1067
|
"CLOSE_CHAT": "Закрити чат",
|
1058
1068
|
"MINIMIZE":"Згорнути",
|
1059
1069
|
"MAXIMIZE":"Максимізувати",
|
1070
|
+
"CONFIRM_CLOSE_CHAT":"Ви впевнені, що бажаєте закрити цей чат?",
|
1060
1071
|
|
1061
1072
|
"INFO_SUPPORT_USER_ADDED_SUBJECT": "ти",
|
1062
1073
|
"INFO_SUPPORT_USER_ADDED_YOU_VERB": "вас додали ",
|
@@ -1157,6 +1168,7 @@
|
|
1157
1168
|
"CLOSE_CHAT":"Stäng chatten",
|
1158
1169
|
"MINIMIZE":"Minimera",
|
1159
1170
|
"MAXIMIZE":"Maximera",
|
1171
|
+
"CONFIRM_CLOSE_CHAT":"Är du säker på att du vill stänga den här chatten?",
|
1160
1172
|
|
1161
1173
|
"INFO_SUPPORT_USER_ADDED_SUBJECT": "du",
|
1162
1174
|
"INFO_SUPPORT_USER_ADDED_YOU_VERB": "du har lagts till ",
|
@@ -1257,6 +1269,7 @@
|
|
1257
1269
|
"CLOSE_CHAT":"Чатты жабу",
|
1258
1270
|
"MINIMIZE":"Кішірейту",
|
1259
1271
|
"MAXIMIZE":"Үлкейту",
|
1272
|
+
"CONFIRM_CLOSE_CHAT":"Бұл чатты шынымен жапқыңыз келе ме?",
|
1260
1273
|
|
1261
1274
|
"INFO_SUPPORT_USER_ADDED_SUBJECT": "сен",
|
1262
1275
|
"INFO_SUPPORT_USER_ADDED_YOU_VERB": "сіз қосылдыңыз ",
|
@@ -1357,6 +1370,7 @@
|
|
1357
1370
|
"CLOSE_CHAT":"Chatni yopish",
|
1358
1371
|
"MINIMIZE":"Minimallashtirish",
|
1359
1372
|
"MAXIMIZE":"Maksimallashtirish",
|
1373
|
+
"CONFIRM_CLOSE_CHAT":"Bu chatni yopmoqchi ekanligingizga ishonchingiz komilmi?",
|
1360
1374
|
|
1361
1375
|
"INFO_SUPPORT_USER_ADDED_SUBJECT": "siz",
|
1362
1376
|
"INFO_SUPPORT_USER_ADDED_YOU_VERB": "qo'shildingiz ",
|
@@ -1457,6 +1471,7 @@
|
|
1457
1471
|
"CLOSE_CHAT": "Söhbəti bağlayın",
|
1458
1472
|
"MINIMIZE":"Minimallaşdırın",
|
1459
1473
|
"MAXIMIZE":"Maksimallaşdırın",
|
1474
|
+
"CONFIRM_CLOSE_CHAT":"Bu söhbəti bağlamaq istədiyinizə əminsiniz?",
|
1460
1475
|
|
1461
1476
|
"INFO_SUPPORT_USER_ADDED_SUBJECT": "Sən",
|
1462
1477
|
"INFO_SUPPORT_USER_ADDED_YOU_VERB": "siz əlavə olundunuz ",
|
package/deploy.sh
CHANGED
package/models/kb_setting.js
CHANGED
@@ -2,6 +2,31 @@ var mongoose = require('mongoose');
|
|
2
2
|
var Schema = mongoose.Schema;
|
3
3
|
var winston = require('../config/winston');
|
4
4
|
|
5
|
+
var EngineSchema = new Schema({
|
6
|
+
name: {
|
7
|
+
type: String,
|
8
|
+
required: true
|
9
|
+
},
|
10
|
+
type: {
|
11
|
+
type: String,
|
12
|
+
required: true
|
13
|
+
},
|
14
|
+
apikey: {
|
15
|
+
type: String,
|
16
|
+
required: false
|
17
|
+
},
|
18
|
+
vector_size: {
|
19
|
+
type: Number,
|
20
|
+
required: true
|
21
|
+
},
|
22
|
+
index_name: {
|
23
|
+
type: String,
|
24
|
+
required: true
|
25
|
+
}
|
26
|
+
}, {
|
27
|
+
_id: false // This is schema is always used as an embedded object inside NamespaceSchema
|
28
|
+
})
|
29
|
+
|
5
30
|
var NamespaceSchema = new Schema({
|
6
31
|
id_project: {
|
7
32
|
type: String,
|
@@ -22,6 +47,10 @@ var NamespaceSchema = new Schema({
|
|
22
47
|
default: {
|
23
48
|
type: Boolean,
|
24
49
|
default: false
|
50
|
+
},
|
51
|
+
engine: {
|
52
|
+
type: EngineSchema,
|
53
|
+
required: false
|
25
54
|
}
|
26
55
|
}, {
|
27
56
|
timestamps: true
|
@@ -59,12 +88,34 @@ var KBSchema = new Schema({
|
|
59
88
|
status: {
|
60
89
|
type: Number,
|
61
90
|
required: false
|
91
|
+
},
|
92
|
+
scrape_type: {
|
93
|
+
type: Number,
|
94
|
+
required: false
|
95
|
+
},
|
96
|
+
scrape_options: {
|
97
|
+
type: Object,
|
98
|
+
required: false,
|
99
|
+
default: undefined,
|
100
|
+
tags_to_extract: {
|
101
|
+
type: Array,
|
102
|
+
required: false
|
103
|
+
},
|
104
|
+
unwanted_tags: {
|
105
|
+
type: Array,
|
106
|
+
required: false
|
107
|
+
},
|
108
|
+
unwanted_classnames: {
|
109
|
+
type: Array,
|
110
|
+
required: false
|
111
|
+
}
|
62
112
|
}
|
63
113
|
}, {
|
64
114
|
timestamps: true
|
65
115
|
})
|
66
116
|
|
67
117
|
|
118
|
+
|
68
119
|
// DEPRECATED !! - Start
|
69
120
|
var KBSettingSchema = new Schema({
|
70
121
|
id_project: {
|
@@ -93,7 +144,7 @@ KBSchema.index({ createdAt: -1, updatedAt: -1 })
|
|
93
144
|
|
94
145
|
// DEPRECATED
|
95
146
|
const KBSettings = mongoose.model('KBSettings', KBSettingSchema);
|
96
|
-
|
147
|
+
const Engine = mongoose.model('Engine', EngineSchema)
|
97
148
|
const Namespace = mongoose.model('Namespace', NamespaceSchema)
|
98
149
|
const KB = mongoose.model('KB', KBSchema)
|
99
150
|
|
@@ -105,5 +156,6 @@ const KB = mongoose.model('KB', KBSchema)
|
|
105
156
|
module.exports = {
|
106
157
|
KBSettings: KBSettings,
|
107
158
|
Namespace: Namespace,
|
159
|
+
Engine: Engine,
|
108
160
|
KB: KB
|
109
161
|
}
|
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.9.
|
4
|
+
"version": "2.9.33",
|
5
5
|
"scripts": {
|
6
6
|
"start": "node ./bin/www",
|
7
7
|
"pretest": "mongodb-runner start",
|
@@ -48,11 +48,11 @@
|
|
48
48
|
"@tiledesk/tiledesk-rasa-connector": "^1.0.10",
|
49
49
|
"@tiledesk/tiledesk-telegram-connector": "^0.1.14",
|
50
50
|
"@tiledesk/tiledesk-train-jobworker": "^0.0.11",
|
51
|
-
"@tiledesk/tiledesk-tybot-connector": "^0.2.
|
51
|
+
"@tiledesk/tiledesk-tybot-connector": "^0.2.112",
|
52
52
|
"@tiledesk/tiledesk-whatsapp-connector": "^0.1.73",
|
53
53
|
"@tiledesk/tiledesk-whatsapp-jobworker": "^0.0.8",
|
54
54
|
"@tiledesk/tiledesk-sms-connector": "^0.1.10",
|
55
|
-
"@tiledesk/tiledesk-vxml-connector": "^0.1.
|
55
|
+
"@tiledesk/tiledesk-vxml-connector": "^0.1.49",
|
56
56
|
"amqplib": "^0.5.5",
|
57
57
|
"app-root-path": "^3.0.0",
|
58
58
|
"bcrypt-nodejs": "0.0.3",
|