feat: initial commit

This commit is contained in:
2026-08-29 13:17:59 +02:00
commit 142f5f5759
91 changed files with 6155 additions and 0 deletions
+22
View File
@@ -0,0 +1,22 @@
#!/usr/bin/env bash
# Czeka, aż endpoint OpenAI odpowie na /v1/models. Pobranie modelu potrafi trwać,
# więc domyślny limit jest hojny, a komunikat mówi, gdzie zajrzeć.
set -euo pipefail
url="${1:?podaj base_url, np. http://localhost:8000/v1}"
timeout="${2:-900}"
log="${3:-}"
deadline=$(( $(date +%s) + timeout ))
printf 'czekam na %s/models ' "$url"
while [ "$(date +%s)" -lt "$deadline" ]; do
if curl -fsS --max-time 5 "$url/models" >/dev/null 2>&1; then
printf '\nendpoint gotowy: %s\n' "$url"
exit 0
fi
printf '.'
sleep 3
done
printf '\n'
echo "endpoint nie odpowiedział w ciągu ${timeout}s" >&2
[ -n "$log" ] && [ -f "$log" ] && { echo "--- ostatnie 30 linii $log:" >&2; tail -30 "$log" >&2; }
exit 1