优化参数应用
This commit is contained in:
parent
fa82fa89ab
commit
34b5c1c66a
2 changed files with 9 additions and 4 deletions
|
|
@ -39,6 +39,10 @@ interface AppConfig {
|
||||||
imageApiKey?: string;
|
imageApiKey?: string;
|
||||||
imageBaseUrl?: string;
|
imageBaseUrl?: string;
|
||||||
imageModel?: string;
|
imageModel?: string;
|
||||||
|
imageSize?: string;
|
||||||
|
imageQuality?: string;
|
||||||
|
imageStyle?: string;
|
||||||
|
imageN?: number;
|
||||||
autoConfirm?: boolean;
|
autoConfirm?: boolean;
|
||||||
feishuWebhook?: string;
|
feishuWebhook?: string;
|
||||||
feishuKeyword?: string;
|
feishuKeyword?: string;
|
||||||
|
|
|
||||||
|
|
@ -90,13 +90,14 @@ const handler = async (args: any, config: any): Promise<string> => {
|
||||||
prompt,
|
prompt,
|
||||||
image_path,
|
image_path,
|
||||||
mask_path,
|
mask_path,
|
||||||
n = 1,
|
|
||||||
size = "1024x1024",
|
|
||||||
quality = "standard",
|
|
||||||
style = "vivid",
|
|
||||||
output_dir = "."
|
output_dir = "."
|
||||||
} = args;
|
} = args;
|
||||||
|
|
||||||
|
const n = args.n || config.imageN || 1;
|
||||||
|
const size = args.size || config.imageSize || "1024x1024";
|
||||||
|
const quality = args.quality || config.imageQuality || "standard";
|
||||||
|
const style = args.style || config.imageStyle || "vivid";
|
||||||
|
|
||||||
let mode = args.mode;
|
let mode = args.mode;
|
||||||
let model = args.model || config.imageModel || "dall-e-3";
|
let model = args.model || config.imageModel || "dall-e-3";
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue