fix: three-way-check.sh — add X-API-Key to zhiyid endpoint check, replace *** placeholder
This commit is contained in:
parent
8ca3ca0497
commit
25151bfda2
|
|
@ -75,9 +75,9 @@ port_listening 7821 && P_PORT_7821=1
|
|||
port_listening 8000 && P_PORT_8000=1
|
||||
|
||||
# ---------- 3. 端点层 ----------
|
||||
ZHIYID_RAW=$(endpoint_full "http://localhost:7821/api/v1/health")
|
||||
ZHIYID_CODE="${ZHIYID_RAW%%|*}"
|
||||
ZHIYID_BODY="${ZHIYID_RAW#*|}"
|
||||
ZHIYID_RAW=$(curl -s -m 3 -H "X-API-Key: ${API_KEY}" -o /dev/null -w '%{http_code}' "http://localhost:7821/api/v1/health" 2>/dev/null || echo "000")
|
||||
ZHIYID_CODE="$ZHIYID_RAW"
|
||||
ZHIYID_BODY=""
|
||||
|
||||
BGE_RAW=$(endpoint_full "http://localhost:8000/health")
|
||||
BGE_CODE="${BGE_RAW%%|*}"
|
||||
|
|
@ -89,7 +89,7 @@ BGE_OK=0
|
|||
[ "$BGE_CODE" = "200" ] && BGE_OK=1
|
||||
|
||||
# ---------- 抽样功能层 ----------
|
||||
RECALL_OUT=$(curl -s -m 5 -X POST -H "X-API-Key: $API_KEY" \
|
||||
RECALL_OUT=$(curl -s -m 5 -X POST -H "X-API-Key: ${API_KEY}" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{"query":"xiaowei","top_k":2}' \
|
||||
"http://localhost:7821/api/v1/recall" 2>/dev/null)
|
||||
|
|
@ -101,7 +101,7 @@ try:
|
|||
except Exception:
|
||||
print(0)" 2>/dev/null)
|
||||
|
||||
GRAPH_STATS=$(curl -s -m 3 -H "X-API-Key: $API_KEY" \
|
||||
GRAPH_STATS=$(curl -s -m 3 -H "X-API-Key: ${API_KEY}" \
|
||||
"http://localhost:7821/api/v1/graph/stats" 2>/dev/null)
|
||||
GRAPH_NODES=$(echo "$GRAPH_STATS" | python3 -c "
|
||||
import sys, json
|
||||
|
|
|
|||
Loading…
Reference in New Issue