Add test.sh

This commit is contained in:
ChenKaiLiuG
2025-12-23 22:47:40 +08:00
parent a8f57ec60b
commit 13c8f8aa3c
5 changed files with 248 additions and 86 deletions

View File

@@ -64,8 +64,8 @@ fi
# ==================== 測試 3: API Models 端點 ====================
print_test "測試 API Models 端點"
MODELS_RESPONSE=$(curl -s http://localhost:18000/v1/models)
if echo "$MODELS_RESPONSE" | grep -q "human-admin"; then
print_success "Models 端點返回 human-admin 模型"
if echo "$MODELS_RESPONSE" | grep -q "tobiichiGPT"; then
print_success "Models 端點返回 tobiichiGPT 模型"
else
print_error "Models 端點測試失敗"
fi
@@ -104,7 +104,7 @@ echo " → 發送測試訊息到 API..."
curl -X POST http://localhost:18000/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{
"model": "human-admin",
"model": "tobiichiGPT",
"messages": [
{"role": "user", "content": "自動化測試訊息"}
]