fix gateway loopback validation chains
This commit is contained in:
@@ -251,9 +251,18 @@ func buildVolcesContentFromBody(body map[string]any) []map[string]any {
|
||||
}
|
||||
}
|
||||
|
||||
appendURLContent("image_url", "first_frame", firstNonEmptyStringValue(body, "first_frame", "firstFrame"))
|
||||
firstFrame := firstNonEmptyStringValue(body, "first_frame", "firstFrame")
|
||||
appendURLContent("image_url", "first_frame", firstFrame)
|
||||
appendURLContent("image_url", "last_frame", firstNonEmptyStringValue(body, "last_frame", "lastFrame"))
|
||||
for _, url := range firstNonEmptyStringListFromAny(body["image"], body["images"], body["image_url"], body["imageUrl"], body["image_urls"], body["imageUrls"], body["reference_image"], body["referenceImage"]) {
|
||||
imageURLs := firstNonEmptyStringListFromAny(body["image"], body["images"], body["image_url"], body["imageUrl"], body["image_urls"], body["imageUrls"])
|
||||
if firstFrame == "" && len(imageURLs) > 0 {
|
||||
appendURLContent("image_url", "first_frame", imageURLs[0])
|
||||
imageURLs = imageURLs[1:]
|
||||
}
|
||||
for _, url := range imageURLs {
|
||||
appendURLContent("image_url", "reference_image", url)
|
||||
}
|
||||
for _, url := range firstNonEmptyStringListFromAny(body["reference_image"], body["referenceImage"]) {
|
||||
appendURLContent("image_url", "reference_image", url)
|
||||
}
|
||||
for _, url := range firstNonEmptyStringListFromAny(body["video"], body["video_url"], body["videoUrl"], body["reference_video"], body["referenceVideo"]) {
|
||||
|
||||
Reference in New Issue
Block a user