Add test.sh
This commit is contained in:
6
test.sh
6
test.sh
@@ -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": "自動化測試訊息"}
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user