llm-checker
Version:
Intelligent CLI tool with AI-powered model selection that analyzes your hardware and recommends optimal LLM models for your system
58 lines (48 loc) β’ 2.48 kB
JavaScript
const EnhancedOllamaClient = require('../ollama/enhanced-client');
async function checkOllamaIntegration() {
const ollama = new EnhancedOllamaClient();
try {
// Verificar si Ollama estΓ‘ corriendo
const status = await ollama.getStatus();
if (!status.running) {
console.log('π¦ Ollama Status: β Not running');
console.log(' Start with: ollama serve');
return;
}
console.log(`π¦ Ollama Status: β
Running (v${status.version})`);
// π Nueva funcionalidad mejorada
console.log('π Analyzing compatibility with enhanced model database...');
const enhanced = await ollama.getEnhancedCompatibleModels();
console.log(`π¦ Installed: ${enhanced.installed} total, ${enhanced.compatible} compatible`);
console.log(`π Available: ${enhanced.total_available} models in Ollama library`);
// Mostrar modelos compatibles encontrados
if (enhanced.compatible > 0) {
console.log('\nβ
Compatible Models Found:');
enhanced.compatible_models.forEach(model => {
const matchType = model.match_type === 'exact' ? 'π―' : 'π';
console.log(` ${matchType} ${model.name} (Score: ${model.score}/100)`);
console.log(` Local: ${model.local_name}`);
console.log(` Pulls: ${model.pulls?.toLocaleString() || 'Unknown'}`);
console.log(` Install: ${model.installation.ollama}`);
});
} else {
console.log('\nβ οΈ No compatible models found in current database');
}
// Mostrar recomendaciones
if (enhanced.recommendations.length > 0) {
console.log('\nπ‘ Recommended popular models:');
enhanced.recommendations.slice(0, 5).forEach(model => {
console.log(` π ${model.name} (${model.pulls?.toLocaleString() || 'Unknown'} pulls)`);
console.log(` ${model.description}`);
console.log(` Install: ${model.installation.ollama}`);
});
}
// Info del cache
if (enhanced.cache_info) {
const cached = new Date(enhanced.cache_info.cached_at).toLocaleString();
console.log(`\nπ Model data cached at: ${cached}`);
}
} catch (error) {
console.error('β Error checking Ollama integration:', error.message);
}
}