Weitere Tools eingebaut. Damit ist die SQL AI einsatzbereit.

This commit is contained in:
2026-01-28 22:27:34 +01:00
parent fa0a7c3b1e
commit 9b2573ebb8
5 changed files with 414 additions and 102 deletions

View File

@@ -2,8 +2,6 @@
set -euo pipefail
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
# shellcheck disable=SC1090
source "${ROOT}/.env"
ts(){ date -Is; }
@@ -11,8 +9,6 @@ ts(){ date -Is; }
log_dir="${ROOT}/logs"
mkdir -p "$log_dir"
log_file="${log_dir}/update-$(date -Iseconds).log"
# log everything (stdout+stderr)
exec > >(tee -a "$log_file") 2>&1
echo "[$(ts)] update: starting (ROOT=$ROOT)"
@@ -60,4 +56,15 @@ echo "[$(ts)] update: verifying model exists..."
docker exec -it ollama ollama list | grep -F "${EXPERT_MODEL}" >/dev/null && \
echo "[$(ts)] update: OK: ${EXPERT_MODEL} is available."
# Warmup (loads model + GPU kernels, reduces first real query latency)
if [[ -x "${ROOT}/bin/sqlai" ]]; then
echo "[$(ts)] update: warmup: sending a short request (no-metrics)..."
"${ROOT}/bin/sqlai" ask --text "Warmup: reply with exactly 'OK'." --no-metrics || {
echo "[$(ts)] update: WARN: warmup failed (continuing)."
}
echo "[$(ts)] update: warmup: done"
else
echo "[$(ts)] update: WARN: ${ROOT}/bin/sqlai not executable; skipping warmup."
fi
echo "[$(ts)] update: complete"