@ruvector/ruvllm 2.5.1 → 2.5.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/bin/cli.js +23 -7
- package/package.json +1 -1
package/bin/cli.js
CHANGED
|
@@ -72,6 +72,8 @@ async function runQuery(llm, text, flags) {
|
|
|
72
72
|
}
|
|
73
73
|
|
|
74
74
|
async function runGenerate(llm, prompt, flags) {
|
|
75
|
+
console.error('Warning: Built-in SIMD inference is experimental. For production use, configure an external LLM provider (Ollama, OpenAI, etc.).');
|
|
76
|
+
|
|
75
77
|
const config = {};
|
|
76
78
|
if (flags.temperature) config.temperature = parseFloat(flags.temperature);
|
|
77
79
|
if (flags['max-tokens']) config.maxTokens = parseInt(flags['max-tokens']);
|
|
@@ -106,19 +108,33 @@ async function runMemorySearch(llm, query, flags) {
|
|
|
106
108
|
}
|
|
107
109
|
|
|
108
110
|
async function runStats(llm, flags) {
|
|
109
|
-
|
|
111
|
+
let stats;
|
|
112
|
+
try {
|
|
113
|
+
stats = llm.stats();
|
|
114
|
+
} catch (e) {
|
|
115
|
+
stats = null;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
if (!stats) {
|
|
119
|
+
if (flags.json) {
|
|
120
|
+
console.log(formatJson({ error: 'No inference data available' }));
|
|
121
|
+
} else {
|
|
122
|
+
console.log('\nNo inference data available. Run some queries first.');
|
|
123
|
+
}
|
|
124
|
+
return;
|
|
125
|
+
}
|
|
110
126
|
|
|
111
127
|
if (flags.json) {
|
|
112
128
|
console.log(formatJson(stats));
|
|
113
129
|
} else {
|
|
114
130
|
console.log('\nRuvLLM Statistics:');
|
|
115
131
|
console.log(formatTable({
|
|
116
|
-
'Total Queries': stats.totalQueries,
|
|
117
|
-
'Memory Nodes': stats.memoryNodes,
|
|
118
|
-
'Patterns Learned': stats.patternsLearned,
|
|
119
|
-
'Avg Latency': `${stats.avgLatencyMs.toFixed(2)}ms`,
|
|
120
|
-
'Cache Hit Rate': `${(stats.cacheHitRate * 100).toFixed(1)}%`,
|
|
121
|
-
'Router Accuracy': `${(stats.routerAccuracy * 100).toFixed(1)}%`,
|
|
132
|
+
'Total Queries': stats.totalQueries ?? 0,
|
|
133
|
+
'Memory Nodes': stats.memoryNodes ?? 0,
|
|
134
|
+
'Patterns Learned': stats.patternsLearned ?? 0,
|
|
135
|
+
'Avg Latency': `${(stats.avgLatencyMs ?? 0).toFixed(2)}ms`,
|
|
136
|
+
'Cache Hit Rate': `${((stats.cacheHitRate ?? 0) * 100).toFixed(1)}%`,
|
|
137
|
+
'Router Accuracy': `${((stats.routerAccuracy ?? 0) * 100).toFixed(1)}%`,
|
|
122
138
|
}));
|
|
123
139
|
}
|
|
124
140
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ruvector/ruvllm",
|
|
3
|
-
"version": "2.5.
|
|
3
|
+
"version": "2.5.3",
|
|
4
4
|
"description": "Self-learning LLM orchestration with SONA adaptive learning, HNSW memory, FastGRNN routing, and SIMD inference",
|
|
5
5
|
"main": "dist/cjs/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|