@tiledesk/tiledesk-server 2.14.2 → 2.14.4
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 +6 -0
- package/package.json +1 -1
- package/routes/webhook.js +6 -0
- package/services/requestService.js +3 -1
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.14.4
|
|
9
|
+
- Fixed bug: missing embeddings on content coming from auto-reindex scheduler
|
|
10
|
+
|
|
11
|
+
# 2.14.3
|
|
12
|
+
- Fixed bug: first message not sent from default chatbot. Refactored availableAgentsCount handling in requestService to ensure accurate snapshot updates during request creation.
|
|
13
|
+
|
|
8
14
|
# 2.14.2
|
|
9
15
|
- Updated updateRequestSnapshotQueued.js to update the snapshot only
|
|
10
16
|
|
package/package.json
CHANGED
package/routes/webhook.js
CHANGED
|
@@ -9,6 +9,7 @@ const webhookService = require('../services/webhookService');
|
|
|
9
9
|
const errorCodes = require('../errorCodes');
|
|
10
10
|
const aiManager = require('../services/aiManager');
|
|
11
11
|
var ObjectId = require('mongoose').Types.ObjectId;
|
|
12
|
+
const default_embedding = require('../config/kb/embedding');
|
|
12
13
|
|
|
13
14
|
const port = process.env.PORT || '3000';
|
|
14
15
|
let TILEBOT_ENDPOINT = "http://localhost:" + port + "/modules/tilebot/";;
|
|
@@ -186,6 +187,11 @@ router.post('/kb/reindex', async (req, res) => {
|
|
|
186
187
|
}
|
|
187
188
|
|
|
188
189
|
json.engine = namespace.engine || (namespace.hybrid ? default_engine_hybrid : default_engine);
|
|
190
|
+
json.hybrid = namespace.hybrid;
|
|
191
|
+
|
|
192
|
+
let embedding = namespace.embedding || default_embedding;
|
|
193
|
+
embedding.api_key = process.env.EMBEDDING_API_KEY || process.env.GPTKEY;
|
|
194
|
+
json.embedding = embedding;
|
|
189
195
|
|
|
190
196
|
let resources = [];
|
|
191
197
|
resources.push(json);
|
|
@@ -608,6 +608,9 @@ class RequestService {
|
|
|
608
608
|
if (dep_id) {
|
|
609
609
|
snapshot.department = result.department;
|
|
610
610
|
}
|
|
611
|
+
|
|
612
|
+
snapshot.availableAgentsCount = this.getAvailableAgentsCount(agents);
|
|
613
|
+
|
|
611
614
|
if (request.requester) {
|
|
612
615
|
snapshot.requester = request.requester;
|
|
613
616
|
}
|
|
@@ -671,7 +674,6 @@ class RequestService {
|
|
|
671
674
|
await q.exec();
|
|
672
675
|
|
|
673
676
|
snapshot.agents = agents;
|
|
674
|
-
snapshot.availableAgentsCount = this.getAvailableAgentsCount(agents);
|
|
675
677
|
requestEvent.emit("request.create.simple", savedRequest, snapshot);
|
|
676
678
|
|
|
677
679
|
if (isStandardConversation) {
|