mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-04 01:18:34 +00:00
fix api
This commit is contained in:
1 parent
cb30d4ce9e
commit
f32966ce5a
2 files changed
+6
-6
No files matched your search
@@ -160,10 +160,10 @@ pub async fn generate_video(args: GenerateVideoArgs<'_>) -> Result<GenerateVideo
|
||||
api_params: ApiParams {
|
||||
prompt: args.prompt,
|
||||
resolution: args.resolution.as_str().to_string(),
|
||||
mode: "normal",
|
||||
content_mode: "normal",
|
||||
model: "seedance-20",
|
||||
duration,
|
||||
video_input_mode,
|
||||
mode: video_input_mode,
|
||||
uploaded_urls,
|
||||
batch_count,
|
||||
},
|
||||
@@ -344,7 +344,7 @@ mod tests {
|
||||
session: &session,
|
||||
prompt: "A dog shakes the glasses off its head. The camera pans out as the shiba shakes. The shiba barks.".to_string(),
|
||||
resolution: Resolution::Landscape16x9,
|
||||
duration_seconds: 15,
|
||||
duration_seconds: 5,
|
||||
batch_count: BatchCount::One,
|
||||
start_frame_url: Some("https://static.seedance2-pro.com/materials/20260219/1771496300184-fb32e08c.jpg".to_string()),
|
||||
end_frame_url: None,
|
||||
|
||||
@@ -23,11 +23,11 @@ pub (super) struct BatchRequestJson {
|
||||
pub (super) struct ApiParams {
|
||||
pub prompt: String,
|
||||
pub resolution: String,
|
||||
pub mode: &'static str,
|
||||
#[serde(rename = "contentMode")]
|
||||
pub content_mode: &'static str,
|
||||
pub model: &'static str,
|
||||
pub duration: String,
|
||||
#[serde(rename = "videoInputMode")]
|
||||
pub video_input_mode: &'static str,
|
||||
pub mode: &'static str,
|
||||
#[serde(rename = "uploadedUrls", skip_serializing_if = "Option::is_none")]
|
||||
pub uploaded_urls: Option<Vec<String>>,
|
||||
#[serde(rename = "batchCount", skip_serializing_if = "Option::is_none")]
|
||||
|
||||
Reference in new issue
Block a user