mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-12 12:53:04 +00:00
new api shape for video model info
This commit is contained in:
1 parent
60d7c2c6a9
commit
9cbd7a0802
3 files changed
+61
-2
No files matched your search
+1
-1
@@ -2,7 +2,7 @@ use serde_derive::{Deserialize, Serialize};
|
||||
use utoipa::{IntoParams, ToSchema};
|
||||
|
||||
/// Query string parameters for the image models endpoint.
|
||||
#[derive(Deserialize, IntoParams)]
|
||||
#[derive(Deserialize, IntoParams, ToSchema)]
|
||||
pub struct OmniGenImageModelsQuery {
|
||||
/// Which provider's models to list. Defaults to "artcraft" if absent.
|
||||
pub provider: Option<OmniGenImageModelsProvider>,
|
||||
|
||||
+56
-1
@@ -1,8 +1,13 @@
|
||||
use serde_derive::{Deserialize, Serialize};
|
||||
use utoipa::{IntoParams, ToSchema};
|
||||
use enums::common::generation::common_aspect_ratio::CommonAspectRatio;
|
||||
use enums::common::generation::common_quality::CommonQuality;
|
||||
use enums::common::generation::common_resolution::CommonResolution;
|
||||
use enums::common::generation::common_video_model::CommonVideoModel;
|
||||
use enums::common::generation_provider::GenerationProvider;
|
||||
|
||||
/// Query string parameters for the video models endpoint.
|
||||
#[derive(Deserialize, IntoParams)]
|
||||
#[derive(Deserialize, IntoParams, ToSchema)]
|
||||
pub struct OmniGenVideoModelsQuery {
|
||||
/// Which provider's models to list. Defaults to "artcraft" if absent.
|
||||
pub provider: Option<OmniGenVideoModelsProvider>,
|
||||
@@ -29,4 +34,54 @@ impl Default for OmniGenVideoModelsProvider {
|
||||
#[derive(Serialize, ToSchema)]
|
||||
pub struct OmniGenVideoModelsResponse {
|
||||
pub success: bool,
|
||||
pub providers: OmniGenVideoProviderModels,
|
||||
}
|
||||
|
||||
#[derive(Serialize, ToSchema)]
|
||||
pub struct OmniGenVideoProviderModels {
|
||||
pub provider: GenerationProvider,
|
||||
pub models: Vec<OmniGenVideoModelDetails>,
|
||||
}
|
||||
|
||||
#[derive(Serialize, ToSchema)]
|
||||
pub struct OmniGenVideoModelDetails {
|
||||
|
||||
pub model: CommonVideoModel,
|
||||
pub full_name: Option<String>,
|
||||
// TODO: model_creator: ModelCreator,
|
||||
|
||||
pub supports_text_prompt: Option<bool>,
|
||||
pub supports_negative_text_prompt: Option<bool>,
|
||||
|
||||
pub supports_starting_keyframe: Option<bool>,
|
||||
pub requires_starting_keyframe: Option<bool>,
|
||||
|
||||
pub supports_ending_keyframe: Option<bool>,
|
||||
|
||||
pub supports_image_references: Option<bool>,
|
||||
pub max_image_references: Option<u16>,
|
||||
|
||||
pub supports_video_references: Option<bool>,
|
||||
pub max_video_references: Option<u16>,
|
||||
pub max_video_reference_total_duration_seconds: Option<u16>,
|
||||
|
||||
pub supports_audio_references: Option<bool>,
|
||||
pub max_audio_references: Option<u16>,
|
||||
pub max_audio_reference_total_duration_seconds: Option<u16>,
|
||||
|
||||
pub supports_generate_with_sound_toggle: Option<bool>,
|
||||
|
||||
pub aspect_ratio_options: Option<Vec<CommonAspectRatio>>,
|
||||
pub aspect_ratio_default: Option<CommonAspectRatio>,
|
||||
|
||||
pub resolution_options: Option<Vec<CommonResolution>>,
|
||||
pub resolution_default: Option<CommonResolution>,
|
||||
|
||||
pub quality_options: Option<Vec<CommonQuality>>,
|
||||
pub default_quality: Option<CommonQuality>,
|
||||
|
||||
pub duration_seconds_min: Option<u16>,
|
||||
pub duration_seconds_max: Option<u16>,
|
||||
pub duration_seconds_options: Option<Vec<u16>>,
|
||||
pub duration_seconds_default: Option<u16>,
|
||||
}
|
||||
@@ -685,12 +685,16 @@ use crate::http_server::endpoints::media_files::list::list_batch_generated_redux
|
||||
OmniGenImageCostResponse,
|
||||
OmniGenImageGenerateResponse,
|
||||
OmniGenImageModelsProvider,
|
||||
OmniGenImageModelsQuery,
|
||||
OmniGenImageModelsResponse,
|
||||
OmniGenVideoCostAndGenerateRequest,
|
||||
OmniGenVideoCostResponse,
|
||||
OmniGenVideoGenerateResponse,
|
||||
OmniGenVideoModelDetails,
|
||||
OmniGenVideoModelsProvider,
|
||||
OmniGenVideoModelsQuery,
|
||||
OmniGenVideoModelsResponse,
|
||||
OmniGenVideoProviderModels,
|
||||
ModeratorListSubscribingUsersBySignupDateRequest,
|
||||
ModeratorListSubscribingUsersBySignupDateResponse,
|
||||
ModeratorListSubscribingUsersBySignupDateEntry,
|
||||
|
||||
Reference in new issue
Block a user