mirror of
https://github.com/QuantumNous/new-api.git
synced 2026-09-11 22:49:57 +00:00
32 lines
1.0 KiB
Go
32 lines
1.0 KiB
Go
package plugins_test
|
|
|
|
import "testing"
|
|
|
|
func TestViduResponsesProtocol(t *testing.T) {
|
|
testVideoResponsesProtocol(t, videoResponsesTestCase{
|
|
pluginKey: "vidu",
|
|
model: "viduq2",
|
|
requestBody: map[string]any{
|
|
"model": "viduq2",
|
|
"input": []any{map[string]any{"role": "user", "content": []any{
|
|
map[string]any{"type": "input_text", "text": "move between frames"},
|
|
map[string]any{"type": "input_image", "image_url": "https://cdn.example/first.png"},
|
|
map[string]any{"type": "input_image", "image_url": "https://cdn.example/last.png"},
|
|
}}},
|
|
"seconds": 8,
|
|
"size": "720p",
|
|
},
|
|
wantAction: "first_tail_to_video",
|
|
wantRequest: map[string]any{
|
|
"model": "viduq2",
|
|
"prompt": "move between frames",
|
|
"images": []any{"https://cdn.example/first.png", "https://cdn.example/last.png"},
|
|
"duration": float64(8),
|
|
"size": "720p",
|
|
},
|
|
wantUsageKeys: []string{"credits", "duration", "resolution"},
|
|
wantSubmitUsageKeys: []string{"duration", "resolution"},
|
|
wantVendorName: "vidu",
|
|
})
|
|
}
|