Based on QuantumNous/new-api v1.0.0-rc.36 (shallow history squashed). - CNY quota display mode: RMB-denominated top-up and crediting across Epay/Waffo channels - New CheckinButton in both authenticated and public headers (Turnstile supported) - New /subscribe page with public plan snapshot, Alipay/balance payment, auto group upgrade/reset - New /docs 12-section beginner guide with anchor navigation - New home PromoBanner linking to /docs; i18n synced (en/zh/zh-TW/fr/ja/ru/vi) - README: document custom features, live demo https://ai.88531.cn
32 lines
893 B
Go
32 lines
893 B
Go
package plugins_test
|
|
|
|
import "testing"
|
|
|
|
func TestKlingResponsesProtocol(t *testing.T) {
|
|
testVideoResponsesProtocol(t, videoResponsesTestCase{
|
|
pluginKey: "kling",
|
|
model: "kling-v2-master",
|
|
requestBody: map[string]any{
|
|
"model": "kling-v2-master",
|
|
"input": []any{map[string]any{"role": "user", "content": []any{
|
|
map[string]any{"type": "input_text", "text": "camera orbit"},
|
|
map[string]any{"type": "input_image", "image_url": "https://cdn.example/frame.png"},
|
|
}}},
|
|
"seconds": 10,
|
|
"metadata": map[string]any{
|
|
"mode": "pro",
|
|
},
|
|
},
|
|
wantAction: "image_to_video",
|
|
wantRequest: map[string]any{
|
|
"model": "kling-v2-master",
|
|
"prompt": "camera orbit",
|
|
"image": "https://cdn.example/frame.png",
|
|
"duration": float64(10),
|
|
"metadata": map[string]any{"mode": "pro"},
|
|
},
|
|
wantUsageKeys: []string{"units"},
|
|
wantVendorName: "kling",
|
|
})
|
|
}
|