UNPKG

@n8n/n8n-nodes-langchain

Version:

![Banner image](https://user-images.githubusercontent.com/10284570/173569848-c624317f-42b1-45a6-ab09-f0ea3c247648.png)

100 lines 3.01 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.description = void 0; exports.execute = execute; const n8n_workflow_1 = require("n8n-workflow"); const baseAnalyze_1 = require("../../helpers/baseAnalyze"); const descriptions_1 = require("../descriptions"); const properties = [ (0, descriptions_1.modelRLC)('modelSearch'), { displayName: 'Text Input', name: 'text', type: 'string', placeholder: "e.g. What's in this document?", default: "What's in this document?", typeOptions: { rows: 2, }, }, { displayName: 'Input Type', name: 'inputType', type: 'options', default: 'url', options: [ { name: 'Document URL(s)', value: 'url', }, { name: 'Binary File(s)', value: 'binary', }, ], }, { displayName: 'URL(s)', name: 'documentUrls', type: 'string', placeholder: 'e.g. https://example.com/document.pdf', description: 'URL(s) of the document(s) to analyze, multiple URLs can be added separated by comma', default: '', displayOptions: { show: { inputType: ['url'], }, }, }, { displayName: 'Input Data Field Name(s)', name: 'binaryPropertyName', type: 'string', default: 'data', placeholder: 'e.g. data', hint: 'The name of the input field containing the binary file data to be processed', description: 'Name of the binary field(s) which contains the document(s), seperate multiple field names with commas', displayOptions: { show: { inputType: ['binary'], }, }, }, { displayName: 'Simplify Output', name: 'simplify', type: 'boolean', default: true, description: 'Whether to simplify the response or not', }, { displayName: 'Options', name: 'options', placeholder: 'Add Option', type: 'collection', default: {}, options: [ { displayName: 'Length of Description (Max Tokens)', description: 'Fewer tokens will result in shorter, less detailed document description', name: 'maxOutputTokens', type: 'number', default: 300, typeOptions: { minValue: 1, }, }, ], }, ]; const displayOptions = { show: { operation: ['analyze'], resource: ['document'], }, }; exports.description = (0, n8n_workflow_1.updateDisplayOptions)(displayOptions, properties); async function execute(i) { return await baseAnalyze_1.baseAnalyze.call(this, i, 'documentUrls', 'application/pdf'); } //# sourceMappingURL=analyze.operation.js.map