feat: split image providers into 1h-openai-image and 1h-gemini-image, rename video to 1h-openai-video
This commit is contained in:
1 parent
3c5e5dd023
commit
8cd50b1c4d
16 files changed
+1553
-102
No files matched your search
Vendored
+27
@@ -0,0 +1,27 @@
|
||||
import type { OpenClawPluginApi } from "openclaw/plugin-sdk/plugin-entry";
|
||||
import type { ImageGenerationProvider, ImageGenerationRequest } from "openclaw/plugin-sdk/image-generation";
|
||||
export interface SecretRefObject {
|
||||
source: string;
|
||||
provider: string;
|
||||
id: string;
|
||||
}
|
||||
export interface ImagePluginConfig {
|
||||
baseUrl?: string;
|
||||
apiKey?: string | SecretRefObject;
|
||||
allowPrivateNetwork?: boolean;
|
||||
defaultModel?: string;
|
||||
models?: string[];
|
||||
responseFormat?: "url" | "b64_json";
|
||||
}
|
||||
export declare function resolvePluginApiKey(rawKey: string | SecretRefObject | undefined): string | undefined;
|
||||
export declare function resolveImageConfig(cfg: ImageGenerationRequest["cfg"] | undefined, apiPluginConfig?: Record<string, unknown>): ImagePluginConfig | undefined;
|
||||
export declare function resolveConfiguredImageBaseUrl(cfg: ImageGenerationRequest["cfg"], pluginCfg?: ImagePluginConfig): string;
|
||||
export declare function resolveImageSize(params: {
|
||||
size?: string;
|
||||
aspectRatio?: string;
|
||||
model?: string;
|
||||
}): string;
|
||||
export declare function buildOpenAIImageGenerationProvider({ isProviderApiKeyConfigured, getPluginConfig, }: {
|
||||
isProviderApiKeyConfigured: OpenClawPluginApi["runtime"]["modelAuth"]["isProviderApiKeyConfigured"];
|
||||
getPluginConfig?: () => Record<string, unknown> | undefined;
|
||||
}): ImageGenerationProvider;
|
||||
Reference in new issue
Block a user