wingbot 3.65.8 → 3.65.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/package.json +2 -2
- package/src/AiMatching.js +9 -1
- package/src/graphApi/GraphApi.js +10 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wingbot",
|
|
3
|
-
"version": "3.65.
|
|
3
|
+
"version": "3.65.10",
|
|
4
4
|
"description": "Enterprise Messaging Bot Conversation Engine",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"compress-json": "^2.1.2",
|
|
58
58
|
"deep-extend": "^0.6.0",
|
|
59
59
|
"form-data": "^4.0.0",
|
|
60
|
-
"graphql": "^
|
|
60
|
+
"graphql": "^16.8.0",
|
|
61
61
|
"jsonwebtoken": "^9.0.0",
|
|
62
62
|
"node-fetch": "^2.6.7",
|
|
63
63
|
"path-to-regexp": "^6.2.1",
|
package/src/AiMatching.js
CHANGED
|
@@ -183,6 +183,12 @@ class AiMatching {
|
|
|
183
183
|
*/
|
|
184
184
|
this.stateEntityScore = 1;
|
|
185
185
|
|
|
186
|
+
/**
|
|
187
|
+
* Score of matched regexp
|
|
188
|
+
* (1.02 by default)
|
|
189
|
+
*/
|
|
190
|
+
this.regexpScore = 1.02;
|
|
191
|
+
|
|
186
192
|
this._ai = ai;
|
|
187
193
|
}
|
|
188
194
|
|
|
@@ -901,7 +907,9 @@ class AiMatching {
|
|
|
901
907
|
return 0;
|
|
902
908
|
}
|
|
903
909
|
|
|
904
|
-
return f
|
|
910
|
+
return f
|
|
911
|
+
? this.regexpScore
|
|
912
|
+
: this.regexpScore - noIntentHandicap;
|
|
905
913
|
});
|
|
906
914
|
|
|
907
915
|
return Math.max(0, ...scores);
|
package/src/graphApi/GraphApi.js
CHANGED
|
@@ -139,8 +139,16 @@ class GraphApi {
|
|
|
139
139
|
audit
|
|
140
140
|
};
|
|
141
141
|
|
|
142
|
-
|
|
143
|
-
|
|
142
|
+
const response = await graphql({
|
|
143
|
+
schema,
|
|
144
|
+
source: body.query,
|
|
145
|
+
rootValue: this._root,
|
|
146
|
+
contextValue: ctx,
|
|
147
|
+
variableValues: body.variables,
|
|
148
|
+
operationName: body.operationName
|
|
149
|
+
});
|
|
150
|
+
|
|
151
|
+
return response;
|
|
144
152
|
}
|
|
145
153
|
|
|
146
154
|
async _schema () {
|