@tiledesk/tiledesk-tybot-connector 0.2.138-rc6 → 0.2.138-rc7
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/TdCache.js
CHANGED
|
@@ -21,10 +21,10 @@ class TdCache {
|
|
|
21
21
|
* Connect redis client
|
|
22
22
|
*/
|
|
23
23
|
this.client = redis.createClient(
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
24
|
+
{
|
|
25
|
+
url: `redis://${this.redis_host}:${this.redis_port}`,
|
|
26
|
+
password: this.redis_password
|
|
27
|
+
});
|
|
28
28
|
this.client.on('error', err => {
|
|
29
29
|
reject(err);
|
|
30
30
|
if (callback) {
|
package/index.js
CHANGED
|
@@ -4,7 +4,7 @@ const bodyParser = require('body-parser');
|
|
|
4
4
|
const { TiledeskClient } = require('@tiledesk/tiledesk-client');
|
|
5
5
|
const { ExtApi } = require('./ExtApi.js');
|
|
6
6
|
const { ExtUtil } = require('./ExtUtil.js');
|
|
7
|
-
const { TdCache } = require('./
|
|
7
|
+
const { TdCache } = require('./TdCache_v3.js');
|
|
8
8
|
const { TiledeskChatbot } = require('./models/TiledeskChatbot.js');
|
|
9
9
|
const { MongodbBotsDataSource } = require('./models/MongodbBotsDataSource.js');
|
|
10
10
|
// const { MongodbIntentsMachine } = require('./models/MongodbIntentsMachine.js');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tiledesk/tiledesk-tybot-connector",
|
|
3
|
-
"version": "0.2.138-
|
|
3
|
+
"version": "0.2.138-rc7",
|
|
4
4
|
"description": "Tiledesk Tybot connector",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"mongoose": "^6.3.5",
|
|
30
30
|
"multer": "^1.4.5-lts.1",
|
|
31
31
|
"nanoid": "^3.1.25",
|
|
32
|
-
"redis": "^
|
|
32
|
+
"redis": "^3.1.2",
|
|
33
33
|
"uuid": "^3.3.3",
|
|
34
34
|
"vm2": "^3.9.13"
|
|
35
35
|
},
|
|
@@ -624,10 +624,10 @@ class DirAskGPTV2 {
|
|
|
624
624
|
return new Promise((resolve) => {
|
|
625
625
|
let engine = {
|
|
626
626
|
name: "pinecone",
|
|
627
|
-
type:
|
|
627
|
+
type: process.env.PINECONE_TYPE,
|
|
628
628
|
apikey: "",
|
|
629
629
|
vector_size: 1536,
|
|
630
|
-
index_name:
|
|
630
|
+
index_name: process.env.PINECONE_INDEX
|
|
631
631
|
}
|
|
632
632
|
resolve(engine);
|
|
633
633
|
})
|
|
@@ -26,6 +26,7 @@ class DirMessage {
|
|
|
26
26
|
this.token = context.token;
|
|
27
27
|
this.log = this.context.log;
|
|
28
28
|
this.supportRequest = this.context.supportRequest
|
|
29
|
+
this.hMessage = false
|
|
29
30
|
}
|
|
30
31
|
|
|
31
32
|
execute(directive, callback) {
|
|
@@ -70,6 +71,7 @@ class DirMessage {
|
|
|
70
71
|
}
|
|
71
72
|
if (directive.name === Directives.HMESSAGE) {
|
|
72
73
|
action.attributes.subtype = "info";
|
|
74
|
+
this.hMessage = true;
|
|
73
75
|
}
|
|
74
76
|
// if (directive.name === Directives.HMESSAGE) {
|
|
75
77
|
// action.sender = "tiledesk";
|
|
@@ -95,7 +97,7 @@ class DirMessage {
|
|
|
95
97
|
const message = action;
|
|
96
98
|
if (this.log) {console.log("Message to extEndpoint:", JSON.stringify(message))};
|
|
97
99
|
|
|
98
|
-
if(this.supportRequest && !this.supportRequest.draft){
|
|
100
|
+
if(this.hMessage && this.supportRequest && !this.supportRequest.draft){
|
|
99
101
|
callback();
|
|
100
102
|
return;
|
|
101
103
|
}
|