mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-10 00:31:22 +00:00
66 lines
1.6 KiB
TypeScript
66 lines
1.6 KiB
TypeScript
import type { AuthProfileStore } from "../agents/auth-profiles.js";
|
|
import type { OpenClawConfig } from "../config/config.js";
|
|
|
|
export type GeneratedVideoAsset = {
|
|
buffer: Buffer;
|
|
mimeType: string;
|
|
fileName?: string;
|
|
metadata?: Record<string, unknown>;
|
|
};
|
|
|
|
export type VideoGenerationResolution = "480P" | "720P" | "1080P";
|
|
|
|
export type VideoGenerationSourceAsset = {
|
|
url?: string;
|
|
buffer?: Buffer;
|
|
mimeType?: string;
|
|
fileName?: string;
|
|
metadata?: Record<string, unknown>;
|
|
};
|
|
|
|
export type VideoGenerationRequest = {
|
|
provider: string;
|
|
model: string;
|
|
prompt: string;
|
|
cfg: OpenClawConfig;
|
|
agentDir?: string;
|
|
authStore?: AuthProfileStore;
|
|
timeoutMs?: number;
|
|
size?: string;
|
|
aspectRatio?: string;
|
|
resolution?: VideoGenerationResolution;
|
|
durationSeconds?: number;
|
|
audio?: boolean;
|
|
watermark?: boolean;
|
|
inputImages?: VideoGenerationSourceAsset[];
|
|
inputVideos?: VideoGenerationSourceAsset[];
|
|
};
|
|
|
|
export type VideoGenerationResult = {
|
|
videos: GeneratedVideoAsset[];
|
|
model?: string;
|
|
metadata?: Record<string, unknown>;
|
|
};
|
|
|
|
export type VideoGenerationProviderCapabilities = {
|
|
maxVideos?: number;
|
|
maxInputImages?: number;
|
|
maxInputVideos?: number;
|
|
maxDurationSeconds?: number;
|
|
supportsSize?: boolean;
|
|
supportsAspectRatio?: boolean;
|
|
supportsResolution?: boolean;
|
|
supportsAudio?: boolean;
|
|
supportsWatermark?: boolean;
|
|
};
|
|
|
|
export type VideoGenerationProvider = {
|
|
id: string;
|
|
aliases?: string[];
|
|
label?: string;
|
|
defaultModel?: string;
|
|
models?: string[];
|
|
capabilities: VideoGenerationProviderCapabilities;
|
|
generateVideo: (req: VideoGenerationRequest) => Promise<VideoGenerationResult>;
|
|
};
|