Update docs, configs, and scripts

Co-Authored-By: Oz <oz-agent@warp.dev>
This commit is contained in:
Raghav
2026-04-19 09:42:52 +05:30
parent 12b66edd22
commit 319881a09f
11 changed files with 157 additions and 62 deletions

View File

@ -11,11 +11,13 @@ if [[ ! -f "${ENV_FILE}" ]]; then
exit 1
fi
set -a
# shellcheck disable=SC1090
source "${ENV_FILE}"
set +a
BACKEND_PORT="${BACKEND_PORT:-8000}"
GEMMA_MODEL_ID="${GEMMA_MODEL_ID:-google/gemma-3-1b-it}"
GEMMA_MODEL_ID="${GEMMA_MODEL_ID:?GEMMA_MODEL_ID must be set in .env}"
VLLM_API_KEY="${VLLM_API_KEY:-EMPTY}"
API_URL="http://localhost:${BACKEND_PORT}/v1/chat/completions"
@ -35,7 +37,7 @@ cat > "${payload_file}" <<JSON
}
JSON
http_status="$(curl -sS -o "${response_file}" -w '%{http_code}' -H "Content-Type: application/json" -H "Authorization: Bearer ${VLLM_API_KEY}" -X POST "${API_URL}" --data @"${payload_file}")"
http_status="$(curl -sS -o "${response_file}" -w '%{http_code}' -H "Content-Type: application/json" -H "Authorization: Bearer ${VLLM_API_KEY}" -X POST "${API_URL}" --data @"${payload_file}")"
if [[ ! "${http_status}" =~ ^2 ]]; then
echo "[test_api][error] API returned HTTP ${http_status}" >&2