UNPKG

n8n-nodes-winston-ai

Version:

AI detector with industry leading accuracy rates in detecting use of AI in text and images. The Winston AI tools also offers a robust plagiarism checker to help maintain integrity.

438 lines 17.7 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.WinstonAi = void 0; class WinstonAi { constructor() { this.description = { displayName: 'Winston AI', name: 'winstonAi', icon: 'file:winstonai.svg', group: ['transform'], version: 1, subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}', description: 'AI detector with industry leading accuracy rates in detecting use of AI in text and images. The Winston AI tools also offers a robust plagiarism checker to help maintain integrity.', defaults: { name: 'Winston AI', }, inputs: ["main"], outputs: ["main"], credentials: [ { name: 'WinstonAiApi', required: true, }, ], requestDefaults: { baseURL: 'https://api.gowinston.ai', headers: { Accept: 'application/json', 'Content-Type': 'application/json', }, }, properties: [ { displayName: 'Resource', name: 'resource', type: 'options', noDataExpression: true, options: [ { name: 'AI Text Detection', value: 'aiTextDetection', }, { name: 'AI Image Detection', value: 'aiImageDetection', }, { name: 'Plagiarism', value: 'plagiarism', }, { name: 'Text Compare', value: 'textCompare', }, ], default: 'aiTextDetection', }, { displayName: 'Operation', name: 'operation', type: 'options', noDataExpression: true, displayOptions: { show: { resource: ['aiTextDetection'], }, }, options: [ { name: 'Scan AI Generated Text', value: 'scan-ai-text', action: 'Scan AI generated text', description: 'Analyze text to detect AI-generated content. The Human Score we give is a metric used by Winston AI to estimate the likelihood that a given piece of content was generated by an AI tool versus being written by a human.', routing: { request: { method: 'POST', url: '/v2/ai-content-detection', }, }, }, ], default: 'scan-ai-text', }, { displayName: 'Operation', name: 'operation', type: 'options', noDataExpression: true, displayOptions: { show: { resource: ['aiImageDetection'], }, }, options: [ { name: 'Scan AI Generated Image', value: 'scan-ai-image', action: 'Scan AI generated image', description: 'Our image detection feature enables AI-generated image detection by verifying image metadata and using a machine learning system trained to differentiate between human and AI-generated images', routing: { request: { method: 'POST', url: '/v2/image-detection', }, }, }, ], default: 'scan-ai-image', }, { displayName: 'Operation', name: 'operation', type: 'options', noDataExpression: true, displayOptions: { show: { resource: ['plagiarism'], }, }, options: [ { name: 'Scan for Plagiarism', value: 'scan-plagiarism', action: 'Scan for plagiarism', description: 'Winston AI’s plagiarism API is a powerful tool designed to check text for plagiarism by scouring the internet for similar content. It queries multiple websites and compares the input text with the content found on these websites. This can be particularly useful in academic settings, content creation, legal scenarios or any other situation where originality of content is required.', routing: { request: { method: 'POST', url: '/v2/plagiarism', }, }, }, ], default: 'scan-plagiarism', }, { displayName: 'Operation', name: 'operation', type: 'options', noDataExpression: true, displayOptions: { show: { resource: ['textCompare'], }, }, options: [ { name: 'Compare Texts', value: 'compare-texts', action: 'Compare texts', description: 'Compare two texts to find similarities and differences between them. This endpoint analyzes both texts and returns detailed information about matching content, word counts, and similarity scores.', routing: { request: { method: 'POST', url: '/v2/text-compare', }, }, }, ], default: 'compare-texts', }, { displayName: 'First Text', name: 'firstText', type: 'string', required: true, typeOptions: { rows: 5 }, default: '', routing: { request: { body: { first_text: '={{$value}}', }, }, }, displayOptions: { show: { resource: ['textCompare'], operation: ['compare-texts'], }, }, }, { displayName: 'Second Text', name: 'secondText', type: 'string', required: true, typeOptions: { rows: 5 }, default: '', routing: { request: { body: { second_text: '={{$value}}', }, }, }, displayOptions: { show: { resource: ['textCompare'], operation: ['compare-texts'], }, }, }, { displayName: 'Text', name: 'plagiarismText', type: 'string', required: true, typeOptions: { rows: 5 }, default: '', routing: { request: { body: { text: '={{$value}}', }, }, }, displayOptions: { show: { resource: ['plagiarism'], operation: ['scan-plagiarism'], }, }, }, { displayName: 'Additional Fields', name: 'additionalFieldsPlagiarism', type: 'collection', placeholder: 'Add Field', default: {}, displayOptions: { show: { resource: ['plagiarism'], operation: ['scan-plagiarism'], }, }, options: [ { displayName: 'Country', name: 'country', type: 'string', default: 'us', routing: { request: { body: { country: '={{$value}}' }, }, }, }, { displayName: 'Excluded Sources (Comma-Separated URLs)', name: 'excluded_sources', type: 'string', default: '', routing: { request: { body: { excluded_sources: '={{$value.split(",").map(e => e.trim())}}' }, }, }, }, { displayName: 'File (URL)', name: 'file', type: 'string', default: '', routing: { request: { body: { file: '={{$value}}' }, }, }, }, { displayName: 'Language', name: 'language', type: 'string', default: 'en', routing: { request: { body: { language: '={{$value}}' }, }, }, }, { displayName: 'Website URL', name: 'website', type: 'string', default: '', routing: { request: { body: { website: '={{$value}}' }, }, }, }, ], }, { displayName: 'Text', name: 'text', type: 'string', required: true, typeOptions: { rows: 5, }, default: '', routing: { request: { body: { text: '={{$value}}', }, }, }, displayOptions: { show: { resource: ['aiTextDetection'], operation: ['scan-ai-text'], }, }, }, { displayName: 'Image URL', name: 'url', type: 'string', required: true, default: '', routing: { request: { body: { url: '={{$value}}', }, }, }, displayOptions: { show: { resource: ['aiImageDetection'], operation: ['scan-ai-image'], }, }, }, { displayName: 'Additional Fields', name: 'additionalFields', type: 'collection', placeholder: 'Add Field', default: {}, displayOptions: { show: { resource: ['aiTextDetection'], operation: ['scan-ai-text'], }, }, options: [ { displayName: 'File (URL)', name: 'file', type: 'string', default: '', routing: { request: { body: { file: '={{$value}}', }, }, }, }, { displayName: 'Website URL', name: 'website', type: 'string', default: '', routing: { request: { body: { website: '={{$value}}', }, }, }, }, { displayName: 'Version', name: 'version', type: 'string', default: 'latest', routing: { request: { body: { version: '={{$value}}', }, }, }, }, { displayName: 'Language', name: 'language', type: 'string', default: 'auto', routing: { request: { body: { language: '={{$value}}', }, }, }, }, ], }, { displayName: 'Additional Fields', name: 'additionalFieldsImage', type: 'collection', placeholder: 'Add Field', default: {}, displayOptions: { show: { resource: ['aiImageDetection'], operation: ['scan-ai-image'], }, }, options: [ { displayName: 'Version', name: 'version', type: 'string', default: 'latest', routing: { request: { body: { version: '={{$value}}', }, }, }, }, ], }, ], }; } } exports.WinstonAi = WinstonAi; //# sourceMappingURL=WinstonAi.node.js.map