rag-memory-epf-mcp 3.1.2 → 3.1.3
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/dist/index.js +8 -7
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -78,20 +78,21 @@ class RAGKnowledgeGraphManager {
|
|
|
78
78
|
// Configure environment to allow remote model downloads
|
|
79
79
|
env.allowRemoteModels = true;
|
|
80
80
|
env.allowLocalModels = true;
|
|
81
|
-
this.embeddingModel = await pipeline('feature-extraction', EMBEDDING_MODEL, { revision: 'main' });
|
|
81
|
+
this.embeddingModel = await pipeline('feature-extraction', EMBEDDING_MODEL, { revision: 'main', dtype: 'fp16' });
|
|
82
82
|
this.modelInitialized = true;
|
|
83
|
-
console.error(`✅ ${EMBEDDING_MODEL} model loaded successfully (
|
|
83
|
+
console.error(`✅ ${EMBEDDING_MODEL} model loaded successfully (fp16)`);
|
|
84
84
|
}
|
|
85
85
|
catch (error) {
|
|
86
|
-
console.error('❌ Failed to load embedding model (
|
|
87
|
-
|
|
86
|
+
console.error('❌ Failed to load embedding model (fp16):', error instanceof Error ? error.message : error);
|
|
87
|
+
const FALLBACK_MODEL = 'Xenova/all-MiniLM-L6-v2';
|
|
88
|
+
console.error(`🔄 Falling back to ${FALLBACK_MODEL}...`);
|
|
88
89
|
try {
|
|
89
|
-
this.embeddingModel = await pipeline('feature-extraction',
|
|
90
|
+
this.embeddingModel = await pipeline('feature-extraction', FALLBACK_MODEL, { revision: 'main' });
|
|
90
91
|
this.modelInitialized = true;
|
|
91
|
-
console.error(`✅ ${
|
|
92
|
+
console.error(`✅ ${FALLBACK_MODEL} loaded (fallback — 384-dim, English-focused)`);
|
|
92
93
|
}
|
|
93
94
|
catch (retryError) {
|
|
94
|
-
console.error('❌
|
|
95
|
+
console.error('❌ All embedding models failed to load. Search will not work.', retryError instanceof Error ? retryError.message : retryError);
|
|
95
96
|
this.modelInitialized = false;
|
|
96
97
|
}
|
|
97
98
|
}
|