@tiledesk/tiledesk-server 2.14.9 → 2.14.10
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,10 @@
|
|
|
5
5
|
🚀 IN PRODUCTION 🚀
|
|
6
6
|
(https://www.npmjs.com/package/@tiledesk/tiledesk-server/v/2.3.77)
|
|
7
7
|
|
|
8
|
+
# 2.14.10
|
|
9
|
+
- Added support for a custom reranking_multiplier parameter in the /qa endpoint
|
|
10
|
+
- Improved DB performance by optimizing the query used to find conversations to be closed automatically
|
|
11
|
+
|
|
8
12
|
# 2.14.9
|
|
9
13
|
- Improved the requests search function and added the ability to specify a timezone when searching
|
|
10
14
|
|
package/models/analyticResult.js
CHANGED
package/package.json
CHANGED
|
@@ -83,8 +83,14 @@ findUnresponsiveRequests() {
|
|
|
83
83
|
winston.debug("CloseBotUnresponsiveRequestTask query",query);
|
|
84
84
|
|
|
85
85
|
Request.find(query)
|
|
86
|
-
|
|
87
|
-
|
|
86
|
+
.sort({ createdAt: 'asc'})
|
|
87
|
+
.limit(this.queryLimit)
|
|
88
|
+
.hint({ status: 1, hasBot: 1, createdAt: 1 })
|
|
89
|
+
.exec(function(err, requests) {
|
|
90
|
+
|
|
91
|
+
// Request.find(query)
|
|
92
|
+
// .sort({createdAt: 'asc'}) //DA TESTARE
|
|
93
|
+
// .limit(this.queryLimit).exec(function(err, requests) {
|
|
88
94
|
//it is limited to 1000 results but after same days it all ok
|
|
89
95
|
if (err) {
|
|
90
96
|
winston.error("CloseBotUnresponsiveRequestTask error getting unresponsive requests ", err);
|
package/routes/kb.js
CHANGED
|
@@ -364,8 +364,19 @@ router.post('/qa', async (req, res) => {
|
|
|
364
364
|
data.search_type = 'hybrid';
|
|
365
365
|
|
|
366
366
|
if (data.reranking === true) {
|
|
367
|
-
data.reranking_multiplier = 3;
|
|
368
367
|
data.reranker_model = "cross-encoder/ms-marco-MiniLM-L-6-v2";
|
|
368
|
+
|
|
369
|
+
if (!data.reranking_multiplier) {
|
|
370
|
+
data.reranking_multiplier = 3;
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
if ((data.top_k * data.reranking_multiplier) > 100) {
|
|
374
|
+
let calculatedRerankingMultiplier = Math.floor(100 / data.top_k);
|
|
375
|
+
if (calculatedRerankingMultiplier < 1) {
|
|
376
|
+
calculatedRerankingMultiplier = 1;
|
|
377
|
+
}
|
|
378
|
+
data.reranking_multiplier = calculatedRerankingMultiplier;
|
|
379
|
+
}
|
|
369
380
|
}
|
|
370
381
|
}
|
|
371
382
|
|