mirror of
https://github.com/n8n-io/n8n.git
synced 2026-10-17 13:39:44 +02:00
Some checks failed
CI: Master (Build, Test, Lint) / Build for Github Cache (push) Waiting to run
CI: Master (Build, Test, Lint) / Unit tests (24.18.1) (push) Waiting to run
CI: Master (Build, Test, Lint) / Unit tests (26.5.1) (push) Waiting to run
CI: Master (Build, Test, Lint) / Lint (push) Waiting to run
CI: Master (Build, Test, Lint) / Performance (push) Waiting to run
CI: Master (Build, Test, Lint) / Verify single-instance deps (npm-install) (push) Waiting to run
CI: Master (Build, Test, Lint) / Notify Slack on failure (push) Blocked by required conditions
Util: Publish API Schema / Cloudflare Pages (push) Has been cancelled
Co-authored-by: Elias Meire <elias@meire.dev>
35 lines
1.0 KiB
TypeScript
35 lines
1.0 KiB
TypeScript
import type { INodeTypeBaseDescription, IVersionedNodeType } from 'n8n-workflow';
|
|
import { VersionedNodeType } from 'n8n-workflow';
|
|
|
|
import { PerplexityV2 } from './v2/PerplexityV2.node';
|
|
import { PerplexityV3 } from './v3/PerplexityV3.node';
|
|
|
|
export class Perplexity extends VersionedNodeType {
|
|
constructor() {
|
|
const baseDescription: INodeTypeBaseDescription = {
|
|
displayName: 'Perplexity',
|
|
name: 'perplexity',
|
|
icon: {
|
|
light: 'file:perplexity.svg',
|
|
dark: 'file:perplexity.dark.svg',
|
|
},
|
|
group: ['transform'],
|
|
subtitle: '={{ $parameter["operation"] + ": " + $parameter["resource"] }}',
|
|
description:
|
|
'AI-powered answer engine that provides accurate, trusted, and real-time answers to any question. Supports agent responses, web search, and embeddings.',
|
|
defaultVersion: 3,
|
|
};
|
|
|
|
const v2 = new PerplexityV2(baseDescription);
|
|
const v3 = new PerplexityV3(baseDescription);
|
|
|
|
const nodeVersions: IVersionedNodeType['nodeVersions'] = {
|
|
1: v2,
|
|
2: v2,
|
|
3: v3,
|
|
};
|
|
|
|
super(nodeVersions, baseDescription);
|
|
}
|
|
}
|