@tiledesk/tiledesk-tybot-connector 2.0.29-rc4 → 2.0.29-rc5

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tiledesk/tiledesk-tybot-connector",
3
- "version": "2.0.29-rc4",
3
+ "version": "2.0.29-rc5",
4
4
  "description": "Tiledesk Tybot connector",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -32,6 +32,11 @@ class DirAskGPTV2 {
32
32
 
33
33
  this.intentDir = new DirIntent(context);
34
34
  this.logger = new Logger({ request_id: this.requestId, dev: this.context.supportRequest?.draft, intent_id: this.context.reply?.attributes?.intent_info?.intent_id });
35
+
36
+ this.rerankingOff = false;
37
+ if (process.env.RERANKING_OFF && (process.env.RERANKING_OFF === "true" || process.env.RERANKING_OFF === true)) {
38
+ this.rerankingOff = true;
39
+ }
35
40
  }
36
41
 
37
42
  execute(directive, callback) {
@@ -294,6 +299,13 @@ class DirAskGPTV2 {
294
299
  json.chat_history_dict = await this.transcriptToLLM(transcript);
295
300
  }
296
301
 
302
+ if (!this.rerankingOff) {
303
+ json.reranking = true;
304
+ json.reranking_multiplier = 3;
305
+ json.reranker_model = "cross-encoder/ms-marco-MiniLM-L-6-v2";
306
+ }
307
+
308
+
297
309
  winston.debug("DirAskGPTV2 json:", json);
298
310
 
299
311
  let kb_endpoint = process.env.KB_ENDPOINT_QA;