21 lines
575 B
Bash
21 lines
575 B
Bash
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
BASE_URL="${1:-http://127.0.0.1:8000}"
|
|
|
|
echo "== /v1/models =="
|
|
curl -sS "$BASE_URL/v1/models" | python -m json.tool >/dev/null
|
|
echo "ok"
|
|
|
|
echo "== /health =="
|
|
curl -sS "$BASE_URL/health" | python -m json.tool >/dev/null
|
|
echo "ok"
|
|
|
|
echo "== /v1/chat/completions (non-stream) =="
|
|
curl -sS -X POST "$BASE_URL/v1/chat/completions" -H "Content-Type: application/json" -d '{
|
|
"model": "planner",
|
|
"messages": [{"role":"user","content":"Say hello in 3 words."}],
|
|
"max_tokens": 32
|
|
}' | python -m json.tool >/dev/null
|
|
echo "ok"
|