From 25151bfda2577c348643c0e90d8c7a45c0a255ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E5=94=AF?= Date: Wed, 8 Jul 2026 12:26:28 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20three-way-check.sh=20=E2=80=94=20add=20X?= =?UTF-8?q?-API-Key=20to=20zhiyid=20endpoint=20check,=20replace=20***=20pl?= =?UTF-8?q?aceholder?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/three-way-check.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/three-way-check.sh b/scripts/three-way-check.sh index 0f86a85..0375f56 100644 --- a/scripts/three-way-check.sh +++ b/scripts/three-way-check.sh @@ -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