文生视频和图生视频功能完成

This commit is contained in:
GeekMaster
2025-07-23 19:11:30 +08:00
parent 54fe49de5d
commit a3f6a641aa
20 changed files with 640 additions and 610 deletions

16
api/test/app_test.go Normal file
View File

@@ -0,0 +1,16 @@
package test
import (
"geekai/utils"
"testing"
)
// TestNewService 测试创建爬虫服务
func TestNewService(t *testing.T) {
videoURL := `https://p3-aiop-sign.byteimg.com/tos-cn-i-vuqhorh59i/2025072310444223AAB2C93CE2B9BB8573-6843-0~tplv-vuqhorh59i-image.image?rk3s=7f9e702d&x-expires=1753325083&x-signature=%2F5V3H%2FWPQlOej6VtVZyf%2BNJBWok%3D`
filePath := "test_video.png"
err := utils.DownloadFile(videoURL, filePath, "")
if err != nil {
t.Fatalf("下载视频失败: %v", err)
}
}