rag-memory-epf-mcp 3.1.3 → 3.1.5
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 +5 -13
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -83,18 +83,10 @@ class RAGKnowledgeGraphManager {
|
|
|
83
83
|
console.error(`✅ ${EMBEDDING_MODEL} model loaded successfully (fp16)`);
|
|
84
84
|
}
|
|
85
85
|
catch (error) {
|
|
86
|
-
console.error('❌ Failed to load embedding model
|
|
87
|
-
|
|
88
|
-
console.error(
|
|
89
|
-
|
|
90
|
-
this.embeddingModel = await pipeline('feature-extraction', FALLBACK_MODEL, { revision: 'main' });
|
|
91
|
-
this.modelInitialized = true;
|
|
92
|
-
console.error(`✅ ${FALLBACK_MODEL} loaded (fallback — 384-dim, English-focused)`);
|
|
93
|
-
}
|
|
94
|
-
catch (retryError) {
|
|
95
|
-
console.error('❌ All embedding models failed to load. Search will not work.', retryError instanceof Error ? retryError.message : retryError);
|
|
96
|
-
this.modelInitialized = false;
|
|
97
|
-
}
|
|
86
|
+
console.error('❌ Failed to load embedding model:', error instanceof Error ? error.message : error);
|
|
87
|
+
console.error('⚠️ Semantic search will be unavailable. Other tools (CRUD, graph queries) still work.');
|
|
88
|
+
console.error('💡 Fix: Ensure ONNX model cache is accessible. Try: rm -rf ~/.npm/_onnx_models && restart.');
|
|
89
|
+
this.modelInitialized = false;
|
|
98
90
|
}
|
|
99
91
|
}
|
|
100
92
|
async runMigrations() {
|
|
@@ -1803,7 +1795,7 @@ class RAGKnowledgeGraphManager {
|
|
|
1803
1795
|
const similarEntities = Array.from(entityMap.values()).sort((a, b) => a.distance - b.distance);
|
|
1804
1796
|
for (const entity of similarEntities) {
|
|
1805
1797
|
const similarity = Math.max(0, 1 - entity.distance / 2);
|
|
1806
|
-
if (similarity > 0.
|
|
1798
|
+
if (similarity > 0.4) {
|
|
1807
1799
|
queryMatchedEntities.add(entity.name);
|
|
1808
1800
|
// Get connected entities via relationships
|
|
1809
1801
|
const connected = this.db.prepare(`
|