wingbot 3.68.16 → 3.68.17

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.68.16",
3
+ "version": "3.68.17",
4
4
  "description": "Enterprise Messaging Bot Conversation Engine",
5
5
  "main": "index.js",
6
6
  "type": "commonjs",
package/src/Ai.js CHANGED
@@ -237,20 +237,26 @@ class Ai {
237
237
  * @template {CustomEntityDetectionModel} T
238
238
  * @param {string|WingbotModel|T} model - wingbot model name or AI plugin
239
239
  * @param {string} prefix - model prefix
240
+ * @param {object} [options={}]
241
+ * @param {number} [options.cacheSize]
242
+ * @param {boolean} [options.verbose]
243
+ * @param {number} [options.cachePhrasesTime]
244
+ *
240
245
  *
241
246
  * @returns {T}
242
247
  * @memberOf Ai
243
248
  */
244
- register (model = null, prefix = this.DEFAULT_PREFIX) {
249
+ register (model = null, prefix = this.DEFAULT_PREFIX, options = {}) {
245
250
  /** @type {T} */
246
251
  let modelObj;
247
252
 
248
253
  if (!model) {
249
254
  // @ts-ignore
250
- modelObj = new CustomEntityDetectionModel({ prefix });
255
+ modelObj = new CustomEntityDetectionModel({ ...options, prefix });
251
256
  } else if (typeof model === 'string') {
252
257
  // @ts-ignore
253
258
  modelObj = new WingbotModel({
259
+ ...options,
254
260
  model,
255
261
  prefix
256
262
  }, this.logger);
@@ -37,6 +37,7 @@ class CachedModel extends CustomEntityDetectionModel {
37
37
  * @param {object} options
38
38
  * @param {string} [options.prefix]
39
39
  * @param {number} [options.cacheSize]
40
+ * @param {boolean} [options.verbose]
40
41
  * @param {number} [options.cachePhrasesTime]
41
42
  * @param {{ warn: Function, error: Function, log: Function }} [log]
42
43
  */