sapper-iq 1.1.25 → 1.1.26
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 +1 -1
- package/sapper.mjs +16 -1
package/package.json
CHANGED
package/sapper.mjs
CHANGED
|
@@ -522,7 +522,22 @@ async function runSapper() {
|
|
|
522
522
|
}
|
|
523
523
|
}
|
|
524
524
|
|
|
525
|
-
|
|
525
|
+
let localModels;
|
|
526
|
+
try {
|
|
527
|
+
localModels = await ollama.list();
|
|
528
|
+
} catch (e) {
|
|
529
|
+
console.error(chalk.red('\n❌ Cannot connect to Ollama!'));
|
|
530
|
+
console.log(chalk.yellow(' Make sure Ollama is running: ') + chalk.cyan('ollama serve'));
|
|
531
|
+
console.log(chalk.gray(' Or install from: https://ollama.ai\n'));
|
|
532
|
+
process.exit(1);
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
if (!localModels.models || localModels.models.length === 0) {
|
|
536
|
+
console.error(chalk.red('\n❌ No models found!'));
|
|
537
|
+
console.log(chalk.yellow(' Pull a model first: ') + chalk.cyan('ollama pull llama3.2'));
|
|
538
|
+
process.exit(1);
|
|
539
|
+
}
|
|
540
|
+
|
|
526
541
|
console.log(divider());
|
|
527
542
|
console.log(statusBadge('MODELS', 'info') + chalk.gray(' Available Ollama models:\n'));
|
|
528
543
|
localModels.models.forEach((m, i) => {
|