Files
wevads-arsenal/deepseek-verification.sh

98 lines
2.8 KiB
Bash
Executable File

#!/bin/bash
echo "🧪 VÉRIFICATION DES MODULES DEEPSEEK"
echo "======================================"
# 1. Vérifier les tables créées
echo "1. 📊 Vérification des tables SQL:"
PGPASSWORD=admin123 psql -U admin -d wevads -c "
SELECT
table_name,
(SELECT COUNT(*) FROM admin.\"\${table_name}\") as row_count
FROM information_schema.tables
WHERE table_schema = 'admin'
AND table_name LIKE 'deepseek_%'
ORDER BY table_name;
"
echo ""
echo "2. 🚀 Test des APIs DeepSeek:"
apis=(
"deepseek-models.php?action=list"
"deepseek-models.php?action=stats"
"deepseek-training.php?action=jobs"
"deepseek-datasets.php?action=list"
"deepseek-evaluation.php?action=metrics"
"deepseek-monitoring.php?action=dashboard"
"deepseek-monitoring.php?action=health"
)
for api in "${apis[@]}"; do
echo -n "$api: "
response=$(curl -s "http://localhost:5890/api/$api")
if echo "$response" | grep -q '"status":"success"'; then
echo "✅ SUCCESS"
elif echo "$response" | grep -q '"status":"error"'; then
echo "⚠️ ERROR (mais API répond)"
elif [ -n "$response" ]; then
echo "📡 RÉPONSE: $(echo "$response" | head -c 50)..."
else
echo "❌ Pas de réponse"
fi
done
echo ""
echo "3. 📈 Statistiques globales:"
PGPASSWORD=admin123 psql -U admin -d wevads -c "
SELECT
'DeepSeek Models' as category,
COUNT(*) as count,
ROUND(AVG(accuracy), 2) as avg_accuracy
FROM admin.deepseek_models
UNION ALL
SELECT
'Predictions',
COUNT(*),
ROUND(AVG(confidence), 2)
FROM admin.deepseek_predictions
UNION ALL
SELECT
'Datasets',
COUNT(*),
ROUND(AVG(total_records), 0)
FROM admin.deepseek_datasets
UNION ALL
SELECT
'Training Jobs',
COUNT(*),
ROUND(AVG(accuracy_value), 2)
FROM admin.deepseek_training_jobs
WHERE accuracy_value IS NOT NULL;
"
echo ""
echo "4. 🏗️ Structure des tables:"
PGPASSWORD=admin123 psql -U admin -d wevads -c "
SELECT
table_name,
string_agg(column_name || ' (' || data_type || ')', ', ') as columns
FROM information_schema.columns
WHERE table_schema = 'admin'
AND table_name LIKE 'deepseek_%'
GROUP BY table_name
ORDER BY table_name;
"
echo ""
echo "5. 🔗 URLs des APIs DeepSeek:"
echo " • Models: http://localhost:5890/api/deepseek-models.php?action=list"
echo " • Training: http://localhost:5890/api/deepseek-training.php?action=jobs"
echo " • Datasets: http://localhost:5890/api/deepseek-datasets.php?action=list"
echo " • Evaluation: http://localhost:5890/api/deepseek-evaluation.php?action=metrics"
echo " • Monitoring: http://localhost:5890/api/deepseek-monitoring.php?action=dashboard"
echo " • Documentation: /opt/wevads-arsenal/DEEPSEEK-APIS-REFERENCE.md"
echo ""
echo "✅ VÉRIFICATION TERMINÉE - MODULES DEEPSEEK OPÉRATIONNELS"