mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-07 02:21:23 +00:00
cleanup
This commit is contained in:
1 parent
df2a890f71
commit
48d40ca099
2 files changed
+7
-3
No files matched your search
+5
-3
@@ -1,6 +1,5 @@
|
||||
use crate::client::router_client::RouterClient;
|
||||
use crate::errors::artcraft_router_error::ArtcraftRouterError;
|
||||
use crate::errors::client_error::{ClientError, ClientType};
|
||||
use crate::generate::generate_video::video_generation_cost_estimate::VideoGenerationCostEstimate;
|
||||
use crate::generate::generate_video_v2::providers::kinovi::seedance_2p0::draft_request::KinoviSeedance2p0DraftRequest;
|
||||
use crate::generate::generate_video_v2::providers::kinovi::seedance_2p0::ready_request::KinoviSeedance2p0ReadyRequest;
|
||||
@@ -12,13 +11,16 @@ pub enum VideoGenerationDraftRequest {
|
||||
}
|
||||
|
||||
impl VideoGenerationDraftRequest {
|
||||
|
||||
|
||||
/// Return a cost estimate to fulfill the request.
|
||||
pub fn estimate_cost(&self) -> Result<VideoGenerationCostEstimate, ArtcraftRouterError> {
|
||||
match self {
|
||||
VideoGenerationDraftRequest::KinoviSeedance2p0(draft) => Ok(draft.estimate_cost()),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// Finalize the draft request before generation
|
||||
/// This may involve uploading media to the provider.
|
||||
pub async fn finalize(self, client: &RouterClient) -> Result<VideoGenerationRequest, ArtcraftRouterError> {
|
||||
match self {
|
||||
VideoGenerationDraftRequest::KinoviSeedance2p0(draft) => {
|
||||
|
||||
+2
@@ -9,6 +9,8 @@ pub enum VideoGenerationRequest {
|
||||
}
|
||||
|
||||
impl VideoGenerationRequest {
|
||||
/// Send the video generation request
|
||||
/// If successful, returns the job IDs.
|
||||
pub async fn send_request(&self, client: &RouterClient) -> Result<GenerateVideoResponse, ArtcraftRouterError> {
|
||||
match self {
|
||||
VideoGenerationRequest::KinoviSeedance2p0(request) => {
|
||||
|
||||
Reference in new issue
Block a user