93 lines
3.2 KiB
PowerShell
93 lines
3.2 KiB
PowerShell
# 文本视频智能体 API 测试脚本
|
|
# PowerShell 脚本用于运行各种测试示例
|
|
|
|
Write-Host "🚀 文本视频智能体 API 测试脚本" -ForegroundColor Green
|
|
Write-Host "================================" -ForegroundColor Green
|
|
Write-Host ""
|
|
|
|
# 检查是否在正确的目录
|
|
if (-not (Test-Path "Cargo.toml")) {
|
|
Write-Host "❌ 错误: 请在 text-video-agent-rust-sdk 目录下运行此脚本" -ForegroundColor Red
|
|
exit 1
|
|
}
|
|
|
|
# 显示可用的测试选项
|
|
Write-Host "📋 可用的测试选项:" -ForegroundColor Yellow
|
|
Write-Host "1. 健康检查测试 (health_check)"
|
|
Write-Host "2. LLM 聊天测试 (llm_chat_test)"
|
|
Write-Host "3. Midjourney 图像生成测试 (midjourney_image_test)"
|
|
Write-Host "4. 文件上传和媒体分析测试 (file_upload_test)"
|
|
Write-Host "5. 综合功能测试 (comprehensive_test)"
|
|
Write-Host "6. 运行所有测试"
|
|
Write-Host "0. 退出"
|
|
Write-Host ""
|
|
|
|
do {
|
|
$choice = Read-Host "请选择要运行的测试 (0-6)"
|
|
|
|
switch ($choice) {
|
|
"1" {
|
|
Write-Host "🔍 运行健康检查测试..." -ForegroundColor Cyan
|
|
cargo run --example health_check
|
|
break
|
|
}
|
|
"2" {
|
|
Write-Host "🤖 运行 LLM 聊天测试..." -ForegroundColor Cyan
|
|
cargo run --example llm_chat_test
|
|
break
|
|
}
|
|
"3" {
|
|
Write-Host "🎨 运行 Midjourney 图像生成测试..." -ForegroundColor Cyan
|
|
cargo run --example midjourney_image_test
|
|
break
|
|
}
|
|
"4" {
|
|
Write-Host "📁 运行文件上传和媒体分析测试..." -ForegroundColor Cyan
|
|
cargo run --example file_upload_test
|
|
break
|
|
}
|
|
"5" {
|
|
Write-Host "🚀 运行综合功能测试..." -ForegroundColor Cyan
|
|
cargo run --example comprehensive_test
|
|
break
|
|
}
|
|
"6" {
|
|
Write-Host "🎯 运行所有测试..." -ForegroundColor Cyan
|
|
Write-Host ""
|
|
|
|
Write-Host "1/5 健康检查测试" -ForegroundColor Yellow
|
|
cargo run --example health_check
|
|
Write-Host ""
|
|
|
|
Write-Host "2/5 LLM 聊天测试" -ForegroundColor Yellow
|
|
cargo run --example llm_chat_test
|
|
Write-Host ""
|
|
|
|
Write-Host "3/5 Midjourney 图像生成测试" -ForegroundColor Yellow
|
|
cargo run --example midjourney_image_test
|
|
Write-Host ""
|
|
|
|
Write-Host "4/5 文件上传和媒体分析测试" -ForegroundColor Yellow
|
|
cargo run --example file_upload_test
|
|
Write-Host ""
|
|
|
|
Write-Host "5/5 综合功能测试" -ForegroundColor Yellow
|
|
cargo run --example comprehensive_test
|
|
Write-Host ""
|
|
|
|
Write-Host "✅ 所有测试完成!" -ForegroundColor Green
|
|
break
|
|
}
|
|
"0" {
|
|
Write-Host "👋 退出测试脚本" -ForegroundColor Green
|
|
exit 0
|
|
}
|
|
default {
|
|
Write-Host "❌ 无效选择,请输入 0-6 之间的数字" -ForegroundColor Red
|
|
}
|
|
}
|
|
} while ($true)
|
|
|
|
Write-Host ""
|
|
Write-Host "🎉 测试完成!" -ForegroundColor Green
|