wingbot 3.67.4 → 3.67.6

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": "wingbot",
3
- "version": "3.67.4",
3
+ "version": "3.67.6",
4
4
  "description": "Enterprise Messaging Bot Conversation Engine",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/src/Ai.js CHANGED
@@ -303,6 +303,7 @@ class Ai {
303
303
  if (typeof wordEntityDetector === 'function' && wordEntityDetector.length === 0) {
304
304
  // @ts-ignore
305
305
  this._wordEntityDetectorFactory = wordEntityDetector;
306
+ this._wordEntityDetector = null;
306
307
  return this;
307
308
  }
308
309
 
package/src/ChatGpt.js CHANGED
@@ -270,7 +270,7 @@ class ChatGpt {
270
270
  presence_penalty: presencePenalty,
271
271
  max_tokens: maxTokens,
272
272
  temperature,
273
- functions
273
+ ...(functions.length ? { functions } : {})
274
274
  };
275
275
 
276
276
  if (typeof user === 'string') {
@@ -10,25 +10,27 @@ const DEFAULT_PHRASES_CACHE_TIME = 3600000; // one hour
10
10
 
11
11
  /**
12
12
  * @typedef {object} Entity
13
- * @param {string} entity
14
- * @param {string} value
15
- * @param {number} score
13
+ * @prop {string} entity
14
+ * @prop {string} value
15
+ * @prop {number} score
16
16
  */
17
17
 
18
18
  /**
19
19
  * @typedef {object} Intent
20
- * @param {string} intent
21
- * @param {number} score
22
- * @param {Entity[]} [entities]
20
+ * @prop {string} intent
21
+ * @prop {number} score
22
+ * @prop {Entity[]} [entities]
23
23
  */
24
24
 
25
25
  /**
26
26
  * @typedef {object} Result
27
- * @param {Entity[]} entities
28
- * @param {Intent[]} intents
27
+ * @prop {string} [text]
28
+ * @prop {Entity[]} entities
29
+ * @prop {Intent[]} intents
29
30
  */
30
31
 
31
32
  /** @typedef {import('../Request')} Request */
33
+
32
34
  class CachedModel extends CustomEntityDetectionModel {
33
35
 
34
36
  /**
@@ -47,7 +47,7 @@ const { iterateThroughWords } = require('../utils/ai');
47
47
 
48
48
  /**
49
49
  * @typedef {object} Result
50
- * @prop {string} text
50
+ * @prop {string} [text]
51
51
  * @prop {Entity[]} entities
52
52
  * @prop {Intent[]} intents
53
53
  */