@n8n/n8n-nodes-langchain
Version:
91 lines (86 loc) • 2.96 kB
text/typescript
/**
* Qwen Cloud Node - Version 1
* Discriminator: resource=image, operation=generate
*/
interface Credentials {
alibabaCloudApi: CredentialReference;
}
/** Creates an image from a text prompt */
export type LcAlibabaCloudV1ImageGenerateParams = {
resource: 'image';
operation: 'generate';
/**
* The model to use for image generation
* @default z-image-turbo
*/
modelId?: 'qwen-image' | 'qwen-image-max' | 'qwen-image-plus' | 'wan2.6-image' | 'wan2.6-t2i' | 'z-image-turbo' | Expression<string>;
/**
* The text prompt describing the image to generate
*/
prompt: string | Expression<string>;
/**
* 1 to 4 reference images for Wan image editing
* @displayOptions.show { /modelId: [{"_cnd":{"includes":"wan"}}] }
* @displayOptions.hide { /modelId: [{"_cnd":{"includes":"-t2i"}}] }
* @default {"values":[{"inputType":"url","imageUrl":"","binaryPropertyName":"data"}]}
*/
referenceImages?: {
/** Image
*/
values?: Array<{
/** Input Type
* @default url
*/
inputType?: 'url' | 'binary' | Expression<string>;
/** Image URL
* @displayOptions.show { inputType: ["url"] }
*/
imageUrl?: string | Expression<string>;
/** Input Data Field Name
* @hint The name of the input field containing the binary image data
* @displayOptions.show { inputType: ["binary"] }
* @default data
*/
binaryPropertyName?: string | Expression<string>;
}>;
};
/**
* Whether to download the generated image as binary data. When disabled, only the image URL is returned.
* @default true
*/
downloadImage?: boolean | Expression<boolean>;
/**
* Options
* @default {}
*/
imageOptions?: {
/** The size of the generated image
* @displayOptions.show { /modelId: ["z-image-turbo"] }
* @default 1024*1024
*/
size?: '1024*1024' | '720*1280' | '1280*720' | Expression<string>;
/** The size of the generated image
* @displayOptions.show { /modelId: ["wan2.6-t2i", "wan2.6-image"] }
* @default 1280*1280
*/
size?: '1104*1472' | '1280*1280' | '1472*1104' | '1696*960' | '960*1696' | Expression<string>;
/** The size of the generated image
* @displayOptions.show { /modelId: ["qwen-image", "qwen-image-plus", "qwen-image-max"] }
* @default 1664*928
*/
size?: '1104*1472' | '1328*1328' | '1472*1104' | '1664*928' | '928*1664' | Expression<string>;
/** Whether to automatically extend and enhance the prompt
* @default false
*/
promptExtend?: boolean | Expression<boolean>;
};
};
export interface LcAlibabaCloudV1ImageGenerateSubnodeConfig {
tools?: ToolInstance[];
}
export type LcAlibabaCloudV1ImageGenerateNode = {
type: '@n8n/n8n-nodes-langchain.alibabaCloud';
version: 1;
isTrigger: true;
config: NodeConfig<LcAlibabaCloudV1ImageGenerateParams> & { credentials?: Credentials } & { subnodes?: LcAlibabaCloudV1ImageGenerateSubnodeConfig };
};