diff --git a/package.json b/package.json index fdbd3ad2..1b0d28da 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@soulcraft/brainy", - "version": "0.2.1", + "version": "0.2.2", "description": "A vector database using HNSW indexing with Origin Private File System storage", "main": "dist/index.js", "module": "dist/index.js", diff --git a/src/utils/embedding.ts b/src/utils/embedding.ts index 6e101003..7445b121 100644 --- a/src/utils/embedding.ts +++ b/src/utils/embedding.ts @@ -91,8 +91,8 @@ export class UniversalSentenceEncoder implements EmbeddingModel { try { // Dynamically import TensorFlow.js and Universal Sentence Encoder // Use type assertions to tell TypeScript these modules exist - this.tf = await import('@tensorflow/tfjs/dist/tf.esm.js' as any) - this.use = await import('@tensorflow-models/universal-sentence-encoder/dist/universal-sentence-encoder.esm.js' as any) + this.tf = await import('@tensorflow/tfjs') + this.use = await import('@tensorflow-models/universal-sentence-encoder') // Load the model this.model = await this.use.load()