mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 12:50:42 +00:00
refactor: trim generation helper types
This commit is contained in:
@@ -16,7 +16,7 @@ import type {
|
|||||||
ImageGenerationSourceImage,
|
ImageGenerationSourceImage,
|
||||||
} from "./types.js";
|
} from "./types.js";
|
||||||
|
|
||||||
export type ResolvedImageGenerationOverrides = {
|
type ResolvedImageGenerationOverrides = {
|
||||||
size?: string;
|
size?: string;
|
||||||
aspectRatio?: string;
|
aspectRatio?: string;
|
||||||
resolution?: ImageGenerationResolution;
|
resolution?: ImageGenerationResolution;
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ export type ImageGenerationProviderOptions = {
|
|||||||
openai?: ImageGenerationOpenAIOptions;
|
openai?: ImageGenerationOpenAIOptions;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type ImageGenerationIgnoredOverrideKey =
|
type ImageGenerationIgnoredOverrideKey =
|
||||||
| "size"
|
| "size"
|
||||||
| "aspectRatio"
|
| "aspectRatio"
|
||||||
| "resolution"
|
| "resolution"
|
||||||
@@ -83,25 +83,25 @@ export type ImageGenerationResult = {
|
|||||||
metadata?: Record<string, unknown>;
|
metadata?: Record<string, unknown>;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type ImageGenerationModeCapabilities = {
|
type ImageGenerationModeCapabilities = {
|
||||||
maxCount?: number;
|
maxCount?: number;
|
||||||
supportsSize?: boolean;
|
supportsSize?: boolean;
|
||||||
supportsAspectRatio?: boolean;
|
supportsAspectRatio?: boolean;
|
||||||
supportsResolution?: boolean;
|
supportsResolution?: boolean;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type ImageGenerationEditCapabilities = ImageGenerationModeCapabilities & {
|
type ImageGenerationEditCapabilities = ImageGenerationModeCapabilities & {
|
||||||
enabled: boolean;
|
enabled: boolean;
|
||||||
maxInputImages?: number;
|
maxInputImages?: number;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type ImageGenerationGeometryCapabilities = {
|
type ImageGenerationGeometryCapabilities = {
|
||||||
sizes?: string[];
|
sizes?: string[];
|
||||||
aspectRatios?: string[];
|
aspectRatios?: string[];
|
||||||
resolutions?: ImageGenerationResolution[];
|
resolutions?: ImageGenerationResolution[];
|
||||||
};
|
};
|
||||||
|
|
||||||
export type ImageGenerationOutputCapabilities = {
|
type ImageGenerationOutputCapabilities = {
|
||||||
qualities?: ImageGenerationQuality[];
|
qualities?: ImageGenerationQuality[];
|
||||||
formats?: ImageGenerationOutputFormat[];
|
formats?: ImageGenerationOutputFormat[];
|
||||||
backgrounds?: ImageGenerationBackground[];
|
backgrounds?: ImageGenerationBackground[];
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { normalizeOptionalString } from "../shared/string-coerce.js";
|
import { normalizeOptionalString } from "../shared/string-coerce.js";
|
||||||
|
|
||||||
export type ParsedGenerationModelRef = {
|
type ParsedGenerationModelRef = {
|
||||||
provider: string;
|
provider: string;
|
||||||
model: string;
|
model: string;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import type {
|
|||||||
MusicGenerationSourceImage,
|
MusicGenerationSourceImage,
|
||||||
} from "./types.js";
|
} from "./types.js";
|
||||||
|
|
||||||
export type ResolvedMusicGenerationOverrides = {
|
type ResolvedMusicGenerationOverrides = {
|
||||||
lyrics?: string;
|
lyrics?: string;
|
||||||
instrumental?: boolean;
|
instrumental?: boolean;
|
||||||
durationSeconds?: number;
|
durationSeconds?: number;
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ export type MusicGenerationSourceImage = {
|
|||||||
metadata?: Record<string, unknown>;
|
metadata?: Record<string, unknown>;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type MusicGenerationProviderConfiguredContext = {
|
type MusicGenerationProviderConfiguredContext = {
|
||||||
cfg?: OpenClawConfig;
|
cfg?: OpenClawConfig;
|
||||||
agentDir?: string;
|
agentDir?: string;
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user