-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmonitor_models.sh
More file actions
executable file
·84 lines (69 loc) · 2.27 KB
/
Copy pathmonitor_models.sh
File metadata and controls
executable file
·84 lines (69 loc) · 2.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
#!/bin/bash
# 📊 AgentFlow Model Health Monitor
# Checks status and performance of all AI models
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
BLUE='\033[0;34m'
PURPLE='\033[0;35m'
CYAN='\033[0;36m'
NC='\033[0m'
echo -e "${BLUE}🔍 AgentFlow Model Health Check${NC}"
echo "$(date)"
echo ""
# Check Ollama service
if curl -s http://localhost:11434/api/tags > /dev/null; then
echo -e "${GREEN}✅ Ollama Service: Running${NC}"
else
echo -e "${RED}❌ Ollama Service: Not Running${NC}"
echo "Please start Ollama with: ollama serve"
exit 1
fi
echo ""
# Check models
MODELS=("llama3.2:1b" "gemma2:2b" "phi3.5:latest" "moondream:latest")
ICONS=("🔵" "🌈" "🟠" "🟣")
COMPANIES=("Meta" "Google" "Microsoft" "Independent")
echo -e "${CYAN}📋 Model Status:${NC}"
for i in "${!MODELS[@]}"; do
model="${MODELS[$i]}"
icon="${ICONS[$i]}"
company="${COMPANIES[$i]}"
if ollama list | grep -q "$model"; then
# Quick test
echo -n " ${icon} Testing $model ($company)... "
start_time=$(date +%s)
if echo "test" | ollama run "$model" > /dev/null 2>&1; then
end_time=$(date +%s)
duration=$((end_time - start_time))
echo -e "${GREEN}Healthy (${duration}s)${NC}"
else
echo -e "${YELLOW}Available but slow/unresponsive${NC}"
fi
else
echo -e " ${icon} $model ($company): ${RED}Not installed${NC}"
fi
done
echo ""
echo -e "${PURPLE}📊 Detailed Model Information:${NC}"
# Get detailed model list
ollama list
echo ""
echo -e "${CYAN}💾 Model Configuration:${NC}"
if [ -f "config/models.json" ]; then
echo "✅ Model configuration found at config/models.json"
echo " - 4 models configured with routing rules"
echo " - Fallback hierarchy established"
echo " - Performance metrics defined"
else
echo "❌ Model configuration not found"
echo " Run ./setup_agentflow_simple.sh to create configuration"
fi
echo ""
echo -e "${CYAN}🔗 Quick Commands:${NC}"
echo "• Test specific model: echo 'Hello' | ollama run <model_name>"
echo "• List all models: ollama list"
echo "• Start Ollama: ollama serve"
echo "• Backend setup: ./start_backend.sh"
echo ""
echo -e "${GREEN}🎉 AgentFlow is ready for development!${NC}"