Files
html/api/ai-benchmark-daily.sh
2026-04-12 22:57:03 +02:00

18 lines
627 B
Bash
Executable File

#!/bin/bash
# Daily AI Benchmark — runs all 5 topics
for topic in strategy code pharma security erp; do
python3 /var/www/html/api/ai-benchmark-runner.py $topic >> /var/log/ai-benchmark.log 2>&1
sleep 5
done
# Regenerate cache
python3 -c "
import json
db=json.load(open('/opt/wevads/vault/ai-benchmark.json'))
mx={}
for b in db['benchmarks'][-5:]:
mx[b['topic']]={ai:r['score'] for ai,r in b['results'].items()}
cache={'report':db,'matrix':mx,'generated':db.get('last_run','')}
json.dump(cache,open('/var/www/html/api/ai-benchmark-cache.json','w'))
"
echo "$(date) Benchmark complete" >> /var/log/ai-benchmark.log