fix(api): 视频生成 - 修正 Video Generations 时长字段类型
This commit is contained in:
@@ -1054,7 +1054,7 @@ func newAPIChannel2VideoBody(input canvasGenerationInput) (map[string]interface{
|
||||
body := map[string]interface{}{
|
||||
"model": input.Config.Model,
|
||||
"prompt": strings.TrimSpace(input.Prompt),
|
||||
"seconds": seconds,
|
||||
"seconds": strconv.Itoa(seconds),
|
||||
"aspect_ratio": ratio,
|
||||
"resolution": resolution,
|
||||
"generate_audio": parseBool(input.Config.VideoGenerateAudio, true),
|
||||
|
||||
@@ -782,7 +782,7 @@ func TestRunNewAPIChannel2VideoTaskDownloadsTemporaryResult(t *testing.T) {
|
||||
if err := json.NewDecoder(r.Body).Decode(&body); err != nil {
|
||||
t.Fatalf("decode request: %v", err)
|
||||
}
|
||||
if body["model"] != "grok-image-video" || body["seconds"] != float64(10) || body["aspect_ratio"] != "9:16" || body["resolution"] != "720p" {
|
||||
if body["model"] != "grok-image-video" || body["seconds"] != "10" || body["aspect_ratio"] != "9:16" || body["resolution"] != "720p" {
|
||||
t.Errorf("body = %#v", body)
|
||||
}
|
||||
images, ok := body["image_urls"].([]interface{})
|
||||
|
||||
Reference in New Issue
Block a user