/**
 * OpenAI Node - Version 2
 * Discriminator: resource=file, operation=upload
 */


interface Credentials {
  openAiApi: CredentialReference;
}

/** Upload a file that can be used across various endpoints */
export type LcOpenAiV2FileUploadParams = {
  resource: 'file';
  operation: 'upload';
/**
 * Name of the binary property which contains the file. The size of individual files can be a maximum of 512 MB or 2 million tokens for Assistants.
 * @hint The name of the input field containing the binary file data to be processed
 * @default data
 */
    binaryPropertyName?: string | Expression<string>;
/**
 * Options
 * @default {}
 */
    options?: {
    /** The intended purpose of the uploaded file, the 'Fine-tuning' only supports .jsonl files
     * @default user_data
     */
    purpose?: 'assistants' | 'fine-tune' | 'vision' | 'user_data' | Expression<string>;
  };
};

export interface LcOpenAiV2FileUploadSubnodeConfig {
  tools?: ToolInstance[];
  memory?: MemoryInstance;
}

export type LcOpenAiV2FileUploadNode = {
  type: '@n8n/n8n-nodes-langchain.openAi';
  version: 2;
  credentials?: Credentials;
  isTrigger: true;
  config: NodeConfig<LcOpenAiV2FileUploadParams> & { subnodes?: LcOpenAiV2FileUploadSubnodeConfig };
};