@getmikk/intent-engine 2.0.17 → 2.0.18

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": "@getmikk/intent-engine",
3
- "version": "2.0.17",
3
+ "version": "2.0.18",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "registry": "https://registry.npmjs.org/"
@@ -152,10 +152,16 @@ export class SemanticSearcher {
152
152
  }).filter((r): r is SemanticMatch => r !== null)
153
153
  }
154
154
 
155
- private async ensurePipeline() {
155
+ private async ensurePipeline(progressMsg?: string) {
156
156
  if (this.pipeline) return
157
+ if (progressMsg && this.onProgress) {
158
+ this.onProgress(0)
159
+ }
157
160
  const { pipeline } = await import('@xenova/transformers')
158
161
  this.pipeline = await pipeline('feature-extraction', SemanticSearcher.MODEL)
162
+ if (this.onProgress) {
163
+ this.onProgress(5)
164
+ }
159
165
  }
160
166
  }
161
167