优化参数应用
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;
|
||||
imageBaseUrl?: string;
|
||||
imageModel?: string;
|
||||
imageSize?: string;
|
||||
imageQuality?: string;
|
||||
imageStyle?: string;
|
||||
imageN?: number;
|
||||
autoConfirm?: boolean;
|
||||
feishuWebhook?: string;
|
||||
feishuKeyword?: string;
|
||||
|
|
|
|||
|
|
@ -90,13 +90,14 @@ const handler = async (args: any, config: any): Promise<string> => {
|
|||
prompt,
|
||||
image_path,
|
||||
mask_path,
|
||||
n = 1,
|
||||
size = "1024x1024",
|
||||
quality = "standard",
|
||||
style = "vivid",
|
||||
output_dir = "."
|
||||
} = 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 model = args.model || config.imageModel || "dall-e-3";
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue