n8n/packages/@n8n/nodes-langchain/nodes/chains/ChainSummarization/ChainSummarization.node.ts
oleg be4f54de15
feat(editor): Node Creator AI nodes improvements (#9484)
Signed-off-by: Oleg Ivaniv <me@olegivaniv.com>
2024-05-30 16:53:33 +02:00

40 lines
1.1 KiB
TypeScript

import type { INodeTypeBaseDescription, IVersionedNodeType } from 'n8n-workflow';
import { VersionedNodeType } from 'n8n-workflow';
import { ChainSummarizationV1 } from './V1/ChainSummarizationV1.node';
import { ChainSummarizationV2 } from './V2/ChainSummarizationV2.node';
export class ChainSummarization extends VersionedNodeType {
constructor() {
const baseDescription: INodeTypeBaseDescription = {
displayName: 'Summarization Chain',
name: 'chainSummarization',
icon: 'fa:link',
group: ['transform'],
description: 'Transforms text into a concise summary',
codex: {
alias: ['LangChain'],
categories: ['AI'],
subcategories: {
AI: ['Chains', 'Root Nodes'],
},
resources: {
primaryDocumentation: [
{
url: 'https://docs.n8n.io/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.chainsummarization/',
},
],
},
},
defaultVersion: 2,
};
const nodeVersions: IVersionedNodeType['nodeVersions'] = {
1: new ChainSummarizationV1(baseDescription),
2: new ChainSummarizationV2(baseDescription),
};
super(nodeVersions, baseDescription);
}
}