@tiledesk/tiledesk-server 2.10.95 → 2.10.96

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,7 +5,13 @@
5
5
  🚀 IN PRODUCTION 🚀
6
6
  (https://www.npmjs.com/package/@tiledesk/tiledesk-server/v/2.3.77)
7
7
 
8
- # 2.10.95
8
+ # 2.10.96
9
+ - Added: support for hybrid search
10
+ - Added: support for chunks_only option
11
+ - Added: support for native logs
12
+ - Bug fix: unexpceted indexing run of all urls in the project
13
+
14
+ # 2.10.95 (Aborted)
9
15
  - Added: support for hybrid search
10
16
  - Added: support for chunks_only option
11
17
  - Added: support for native logs
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.10.95",
4
+ "version": "2.10.96",
5
5
  "scripts": {
6
6
  "start": "node ./bin/www",
7
7
  "pretest": "mongodb-runner start",
package/routes/kb.js CHANGED
@@ -1341,7 +1341,7 @@ router.post('/multi', upload.single('uploadFile'), async (req, res) => {
1341
1341
  }
1342
1342
  })
1343
1343
 
1344
- saveBulk(operations, kbs, project_id).then((result) => {
1344
+ saveBulk(operations, kbs, project_id, namespace_id).then((result) => {
1345
1345
 
1346
1346
  let ns = namespaces.find(n => n.id === namespace_id);
1347
1347
  let engine = ns.engine || default_engine;
@@ -1456,7 +1456,7 @@ router.post('/csv', upload.single('uploadFile'), async (req, res) => {
1456
1456
  }
1457
1457
  })
1458
1458
 
1459
- saveBulk(operations, kbs, project_id).then((result) => {
1459
+ saveBulk(operations, kbs, project_id, namespace_id).then((result) => {
1460
1460
 
1461
1461
  let ns = namespaces.find(n => n.id === namespace_id);
1462
1462
  let engine = ns.engine || default_engine;
@@ -1623,13 +1623,13 @@ router.delete('/:kb_id', async (req, res) => {
1623
1623
  * ****************************************
1624
1624
  */
1625
1625
 
1626
- async function saveBulk(operations, kbs, project_id) {
1626
+ async function saveBulk(operations, kbs, project_id, namespace) {
1627
1627
 
1628
1628
  return new Promise((resolve, reject) => {
1629
1629
  KB.bulkWrite(operations, { ordered: false }).then((result) => {
1630
1630
  winston.verbose("bulkWrite operations result: ", result);
1631
1631
 
1632
- KB.find({ id_project: project_id, source: { $in: kbs.map(kb => kb.source) } }).lean().then((documents) => {
1632
+ KB.find({ id_project: project_id, namespace: namespace, source: { $in: kbs.map(kb => kb.source) } }).lean().then((documents) => {
1633
1633
  winston.debug("documents: ", documents);
1634
1634
  resolve(documents)
1635
1635
  }).catch((err) => {
@@ -44,6 +44,7 @@ class WebhookService {
44
44
  }
45
45
  let json_value = JSON.parse(value);
46
46
  payload.preloaded_request_id = json_value.request_id;
47
+ payload.draft = true;
47
48
  }
48
49
 
49
50
  let token = await this.generateChatbotToken(chatbot);