UNPKG

@n8n/n8n-nodes-langchain

Version:
91 lines (86 loc) • 3.69 kB
/** * OpenAI Node - Version 2.2 * Discriminator: resource=image, operation=generate */ interface Credentials { openAiApi: CredentialReference; } /** Creates audio from a text prompt */ export type LcOpenAiV22ImageGenerateParams = { resource: 'image'; operation: 'generate'; /** * Model * @builderHint Keep a working or explicitly requested model unless provider evidence shows it is unavailable or unsuitable. When choosing a new model, select a current stable model supported by this node version, the configured API, and the required operation. Use the declared model-list lookup with the connected credential when available. Gateway credits can restrict that list. For a new choice without credentials, use current provider catalog information. Choose a model that fits the task and budget. Copy the exact model ID. Do not rely on node defaults, invent model IDs, or treat an unfamiliar model as invalid. * @searchListMethod imageGenerateModelSearch * @default {"mode":"list","value":"gpt-image-1-mini"} */ modelId?: { __rl: true; mode: 'list' | 'id'; value: string; cachedResultName?: string }; /** * A text description of the desired image(s). The maximum length is 1000 characters for dall-e-2 and 4000 characters for dall-e-3. */ prompt?: string | Expression<string>; /** * Options * @default {} */ options?: { /** Number of images to generate * @displayOptions.show { /modelId: ["dall-e-2"] } * @default 1 */ n?: number | Expression<number>; /** The quality of the image that will be generated, HD creates images with finer details and greater consistency across the image * @displayOptions.show { /modelId: ["dall-e-3"] } * @default standard */ dalleQuality?: 'hd' | 'standard' | Expression<string>; /** The quality of the image that will be generated, High creates images with finer details and greater consistency across the image * @displayOptions.show { /modelId: [{"_cnd":{"includes":"gpt-image"}}] } * @default medium */ quality?: 'high' | 'medium' | 'low' | Expression<string>; size?: /** Resolution * @displayOptions.show { /modelId: ["dall-e-2"] } * @default 1024x1024 */ | '256x256' | '512x512' | '1024x1024' | Expression<string> /** Resolution * @displayOptions.show { /modelId: ["dall-e-3"] } * @default 1024x1024 */ | '1024x1024' | '1792x1024' | '1024x1792' | Expression<string> /** Resolution * @displayOptions.show { /modelId: [{"_cnd":{"includes":"gpt-image"}}] } * @default 1024x1024 */ | '1024x1024' | '1024x1536' | '1536x1024' | Expression<string>; /** Style * @displayOptions.show { /modelId: ["dall-e-3"] } * @default vivid */ style?: 'natural' | 'vivid' | Expression<string>; /** Whether to return image URL(s) instead of binary file(s) * @displayOptions.hide { /modelId: [{"_cnd":{"includes":"gpt-image"}}] } * @default false */ returnImageUrls?: boolean | Expression<boolean>; /** Put Output in Field * @hint The name of the output field to put the binary file data in * @displayOptions.show { returnImageUrls: [false] } * @default data */ binaryPropertyOutput?: string | Expression<string>; }; }; export interface LcOpenAiV22ImageGenerateSubnodeConfig { tools?: ToolInstance[]; memory?: MemoryInstance; } export type LcOpenAiV22ImageGenerateNode = { type: '@n8n/n8n-nodes-langchain.openAi'; version: 2.2; isTrigger: true; config: NodeConfig<LcOpenAiV22ImageGenerateParams> & { credentials?: Credentials } & { subnodes?: LcOpenAiV22ImageGenerateSubnodeConfig }; };