fix(api): 视频生成 - 修正 Video Generations 时长字段类型
This commit is contained in:
1 parent
bf339911e4
commit
d94f4c6bed
2 files changed
+2
-2
No files matched your search
@@ -1054,7 +1054,7 @@ func newAPIChannel2VideoBody(input canvasGenerationInput) (map[string]interface{
|
|||||||
body := map[string]interface{}{
|
body := map[string]interface{}{
|
||||||
"model": input.Config.Model,
|
"model": input.Config.Model,
|
||||||
"prompt": strings.TrimSpace(input.Prompt),
|
"prompt": strings.TrimSpace(input.Prompt),
|
||||||
"seconds": seconds,
|
"seconds": strconv.Itoa(seconds),
|
||||||
"aspect_ratio": ratio,
|
"aspect_ratio": ratio,
|
||||||
"resolution": resolution,
|
"resolution": resolution,
|
||||||
"generate_audio": parseBool(input.Config.VideoGenerateAudio, true),
|
"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 {
|
if err := json.NewDecoder(r.Body).Decode(&body); err != nil {
|
||||||
t.Fatalf("decode request: %v", err)
|
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)
|
t.Errorf("body = %#v", body)
|
||||||
}
|
}
|
||||||
images, ok := body["image_urls"].([]interface{})
|
images, ok := body["image_urls"].([]interface{})
|
||||||
|
|||||||
Reference in new issue
Block a user