Update docs, configs, and scripts
Co-Authored-By: Oz <oz-agent@warp.dev>
This commit is contained in:
@ -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
|
||||
|
||||
Reference in New Issue
Block a user