Files
wevia-brain/blade-orchestrator.sh
2026-04-12 23:01:36 +02:00

16 lines
777 B
Bash
Executable File

#!/bin/bash
# BLADE IA Orchestrator - runs */30
LOG=/tmp/blade-orch.log
echo "$(date): tick" >> $LOG
# Check GGUF availability
HTTP=$(curl -sf -o /dev/null -w '%{http_code}' https://huggingface.co/yace222/weval-brain-v3-gguf/resolve/main/unsloth.Q4_K_M.gguf 2>/dev/null)
if [ "$HTTP" = "200" ] && [ ! -f /opt/wevia-brain/finetune/weval-brain-v3.gguf ]; then
echo "$(date): downloading GGUF" >> $LOG
wget -q https://huggingface.co/yace222/weval-brain-v3-gguf/resolve/main/unsloth.Q4_K_M.gguf -O /opt/wevia-brain/finetune/weval-brain-v3.gguf
cd /opt/wevia-brain/finetune && ollama create weval-brain-v3 -f Modelfile-v3 2>> $LOG
echo "$(date): LOADED" >> $LOG
fi
# Health check
curl -sf http://127.0.0.1/api/wevia-master-api.php?health >> $LOG 2>/dev/null
echo '' >> $LOG