@n8n/n8n-nodes-langchain
Version:

43 lines (38 loc) • 1.23 kB
text/typescript
/**
* OpenAI Node - Version 1.3
* Discriminator: resource=file, operation=upload
*/
interface Credentials {
openAiApi: CredentialReference;
}
/** Upload a file that can be used across various endpoints */
export type LcOpenAiV13FileUploadParams = {
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 assistants
*/
purpose?: 'assistants' | 'fine-tune' | Expression<string>;
};
};
export interface LcOpenAiV13FileUploadSubnodeConfig {
tools?: ToolInstance[];
memory?: MemoryInstance;
}
export type LcOpenAiV13FileUploadNode = {
type: '@n8n/n8n-nodes-langchain.openAi';
version: 1.3;
credentials?: Credentials;
config: NodeConfig<LcOpenAiV13FileUploadParams> & { subnodes?: LcOpenAiV13FileUploadSubnodeConfig };
};