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


interface Credentials {
  openAiApi: CredentialReference;
}

/** Upload a file that can be used across various endpoints */
export type LcOpenAiV21FileUploadParams = {
  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> | PlaceholderValue;
/**
 * 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 LcOpenAiV21FileUploadSubnodeConfig {
  tools?: ToolInstance[];
  memory?: MemoryInstance;
}

export type LcOpenAiV21FileUploadNode = {
  type: '@n8n/n8n-nodes-langchain.openAi';
  version: 2.1;
  credentials?: Credentials;
  config: NodeConfig<LcOpenAiV21FileUploadParams> & { subnodes?: LcOpenAiV21FileUploadSubnodeConfig };
};