UNPKG

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
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); } }