n8n-nodes-base 1.94.1 → 1.95.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/credentials/GithubOAuth2Api.credentials.js +2 -2
- package/dist/credentials/GithubOAuth2Api.credentials.js.map +1 -1
- package/dist/credentials/PerplexityApi.credentials.js +70 -0
- package/dist/credentials/PerplexityApi.credentials.js.map +1 -0
- package/dist/known/credentials.json +7 -0
- package/dist/known/nodes.json +4 -0
- package/dist/nodes/Evaluation/EvaluationTrigger/EvaluationTrigger.node.ee.js +12 -22
- package/dist/nodes/Evaluation/EvaluationTrigger/EvaluationTrigger.node.ee.js.map +1 -1
- package/dist/nodes/JinaAI/JinaAi.node.js +1 -1
- package/dist/nodes/JinaAI/JinaAi.node.js.map +1 -1
- package/dist/nodes/Perplexity/GenericFunctions.js +49 -0
- package/dist/nodes/Perplexity/GenericFunctions.js.map +1 -0
- package/dist/nodes/Perplexity/Perplexity.node.js +78 -0
- package/dist/nodes/Perplexity/Perplexity.node.js.map +1 -0
- package/dist/nodes/Perplexity/Perplexity.node.json +18 -0
- package/dist/nodes/Perplexity/descriptions/chat/Chat.resource.js +72 -0
- package/dist/nodes/Perplexity/descriptions/chat/Chat.resource.js.map +1 -0
- package/dist/nodes/Perplexity/descriptions/chat/complete.operation.js +328 -0
- package/dist/nodes/Perplexity/descriptions/chat/complete.operation.js.map +1 -0
- package/dist/nodes/Perplexity/descriptions/index.js +39 -0
- package/dist/nodes/Perplexity/descriptions/index.js.map +1 -0
- package/dist/nodes/Perplexity/perplexity.svg +35 -0
- package/dist/nodes/RespondToWebhook/RespondToWebhook.node.js +14 -3
- package/dist/nodes/RespondToWebhook/RespondToWebhook.node.js.map +1 -1
- package/dist/nodes/RespondToWebhook/utils.js +3 -2
- package/dist/nodes/RespondToWebhook/utils.js.map +1 -1
- package/dist/nodes/Telegram/Telegram.node.js +1 -1
- package/dist/nodes/Telegram/Telegram.node.js.map +1 -1
- package/dist/nodes/Transform/Sort/Sort.node.js +2 -2
- package/dist/nodes/Transform/Sort/Sort.node.js.map +1 -1
- package/dist/types/credentials.json +2 -1
- package/dist/types/nodes.json +7 -6
- package/package.json +10 -7
|
@@ -45,14 +45,14 @@ class GithubOAuth2Api {
|
|
|
45
45
|
displayName: "Authorization URL",
|
|
46
46
|
name: "authUrl",
|
|
47
47
|
type: "hidden",
|
|
48
|
-
default: '={{$self["server"] === "https://api.github.com" ? "https://github.com" : $self["server"]}}/login/oauth/authorize',
|
|
48
|
+
default: '={{$self["server"] === "https://api.github.com" ? "https://github.com" : $self["server"].split("://")[0] + "://" + $self["server"].split("://")[1].split("/")[0]}}/login/oauth/authorize',
|
|
49
49
|
required: true
|
|
50
50
|
},
|
|
51
51
|
{
|
|
52
52
|
displayName: "Access Token URL",
|
|
53
53
|
name: "accessTokenUrl",
|
|
54
54
|
type: "hidden",
|
|
55
|
-
default: '={{$self["server"] === "https://api.github.com" ? "https://github.com" : $self["server"]}}/login/oauth/access_token',
|
|
55
|
+
default: '={{$self["server"] === "https://api.github.com" ? "https://github.com" : $self["server"].split("://")[0] + "://" + $self["server"].split("://")[1].split("/")[0]}}/login/oauth/access_token',
|
|
56
56
|
required: true
|
|
57
57
|
},
|
|
58
58
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../credentials/GithubOAuth2Api.credentials.ts"],"sourcesContent":["import type { ICredentialType, INodeProperties } from 'n8n-workflow';\n\nexport class GithubOAuth2Api implements ICredentialType {\n\tname = 'githubOAuth2Api';\n\n\textends = ['oAuth2Api'];\n\n\tdisplayName = 'GitHub OAuth2 API';\n\n\tdocumentationUrl = 'github';\n\n\tproperties: INodeProperties[] = [\n\t\t{\n\t\t\tdisplayName: 'Grant Type',\n\t\t\tname: 'grantType',\n\t\t\ttype: 'hidden',\n\t\t\tdefault: 'authorizationCode',\n\t\t},\n\t\t{\n\t\t\tdisplayName: 'Github Server',\n\t\t\tname: 'server',\n\t\t\ttype: 'string',\n\t\t\tdefault: 'https://api.github.com',\n\t\t\tdescription: 'The server to connect to. Only has to be set if Github Enterprise is used.',\n\t\t},\n\t\t{\n\t\t\tdisplayName: 'Authorization URL',\n\t\t\tname: 'authUrl',\n\t\t\ttype: 'hidden',\n\t\t\tdefault:\n\t\t\t\t'={{$self[\"server\"] === \"https://api.github.com\" ? \"https://github.com\" : $self[\"server\"]}}/login/oauth/authorize',\n\t\t\trequired: true,\n\t\t},\n\t\t{\n\t\t\tdisplayName: 'Access Token URL',\n\t\t\tname: 'accessTokenUrl',\n\t\t\ttype: 'hidden',\n\t\t\tdefault:\n\t\t\t\t'={{$self[\"server\"] === \"https://api.github.com\" ? \"https://github.com\" : $self[\"server\"]}}/login/oauth/access_token',\n\t\t\trequired: true,\n\t\t},\n\t\t{\n\t\t\tdisplayName: 'Scope',\n\t\t\tname: 'scope',\n\t\t\ttype: 'hidden',\n\t\t\tdefault:\n\t\t\t\t'repo,admin:repo_hook,admin:org,admin:org_hook,gist,notifications,user,write:packages,read:packages,delete:packages,workflow',\n\t\t},\n\t\t{\n\t\t\tdisplayName: 'Auth URI Query Parameters',\n\t\t\tname: 'authQueryParameters',\n\t\t\ttype: 'hidden',\n\t\t\tdefault: '',\n\t\t},\n\t\t{\n\t\t\tdisplayName: 'Authentication',\n\t\t\tname: 'authentication',\n\t\t\ttype: 'hidden',\n\t\t\tdefault: 'header',\n\t\t},\n\t];\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAEO,MAAM,gBAA2C;AAAA,EAAjD;AACN,gBAAO;AAEP,mBAAU,CAAC,WAAW;AAEtB,uBAAc;AAEd,4BAAmB;AAEnB,sBAAgC;AAAA,MAC/B;AAAA,QACC,aAAa;AAAA,QACb,MAAM;AAAA,QACN,MAAM;AAAA,QACN,SAAS;AAAA,MACV;AAAA,MACA;AAAA,QACC,aAAa;AAAA,QACb,MAAM;AAAA,QACN,MAAM;AAAA,QACN,SAAS;AAAA,QACT,aAAa;AAAA,MACd;AAAA,MACA;AAAA,QACC,aAAa;AAAA,QACb,MAAM;AAAA,QACN,MAAM;AAAA,QACN,SACC;AAAA,QACD,UAAU;AAAA,MACX;AAAA,MACA;AAAA,QACC,aAAa;AAAA,QACb,MAAM;AAAA,QACN,MAAM;AAAA,QACN,SACC;AAAA,QACD,UAAU;AAAA,MACX;AAAA,MACA;AAAA,QACC,aAAa;AAAA,QACb,MAAM;AAAA,QACN,MAAM;AAAA,QACN,SACC;AAAA,MACF;AAAA,MACA;AAAA,QACC,aAAa;AAAA,QACb,MAAM;AAAA,QACN,MAAM;AAAA,QACN,SAAS;AAAA,MACV;AAAA,MACA;AAAA,QACC,aAAa;AAAA,QACb,MAAM;AAAA,QACN,MAAM;AAAA,QACN,SAAS;AAAA,MACV;AAAA,IACD;AAAA;AACD;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../credentials/GithubOAuth2Api.credentials.ts"],"sourcesContent":["import type { ICredentialType, INodeProperties } from 'n8n-workflow';\n\nexport class GithubOAuth2Api implements ICredentialType {\n\tname = 'githubOAuth2Api';\n\n\textends = ['oAuth2Api'];\n\n\tdisplayName = 'GitHub OAuth2 API';\n\n\tdocumentationUrl = 'github';\n\n\tproperties: INodeProperties[] = [\n\t\t{\n\t\t\tdisplayName: 'Grant Type',\n\t\t\tname: 'grantType',\n\t\t\ttype: 'hidden',\n\t\t\tdefault: 'authorizationCode',\n\t\t},\n\t\t{\n\t\t\tdisplayName: 'Github Server',\n\t\t\tname: 'server',\n\t\t\ttype: 'string',\n\t\t\tdefault: 'https://api.github.com',\n\t\t\tdescription: 'The server to connect to. Only has to be set if Github Enterprise is used.',\n\t\t},\n\t\t{\n\t\t\tdisplayName: 'Authorization URL',\n\t\t\tname: 'authUrl',\n\t\t\ttype: 'hidden',\n\t\t\tdefault:\n\t\t\t\t'={{$self[\"server\"] === \"https://api.github.com\" ? \"https://github.com\" : $self[\"server\"].split(\"://\")[0] + \"://\" + $self[\"server\"].split(\"://\")[1].split(\"/\")[0]}}/login/oauth/authorize',\n\t\t\trequired: true,\n\t\t},\n\t\t{\n\t\t\tdisplayName: 'Access Token URL',\n\t\t\tname: 'accessTokenUrl',\n\t\t\ttype: 'hidden',\n\t\t\tdefault:\n\t\t\t\t'={{$self[\"server\"] === \"https://api.github.com\" ? \"https://github.com\" : $self[\"server\"].split(\"://\")[0] + \"://\" + $self[\"server\"].split(\"://\")[1].split(\"/\")[0]}}/login/oauth/access_token',\n\t\t\trequired: true,\n\t\t},\n\t\t{\n\t\t\tdisplayName: 'Scope',\n\t\t\tname: 'scope',\n\t\t\ttype: 'hidden',\n\t\t\tdefault:\n\t\t\t\t'repo,admin:repo_hook,admin:org,admin:org_hook,gist,notifications,user,write:packages,read:packages,delete:packages,workflow',\n\t\t},\n\t\t{\n\t\t\tdisplayName: 'Auth URI Query Parameters',\n\t\t\tname: 'authQueryParameters',\n\t\t\ttype: 'hidden',\n\t\t\tdefault: '',\n\t\t},\n\t\t{\n\t\t\tdisplayName: 'Authentication',\n\t\t\tname: 'authentication',\n\t\t\ttype: 'hidden',\n\t\t\tdefault: 'header',\n\t\t},\n\t];\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAEO,MAAM,gBAA2C;AAAA,EAAjD;AACN,gBAAO;AAEP,mBAAU,CAAC,WAAW;AAEtB,uBAAc;AAEd,4BAAmB;AAEnB,sBAAgC;AAAA,MAC/B;AAAA,QACC,aAAa;AAAA,QACb,MAAM;AAAA,QACN,MAAM;AAAA,QACN,SAAS;AAAA,MACV;AAAA,MACA;AAAA,QACC,aAAa;AAAA,QACb,MAAM;AAAA,QACN,MAAM;AAAA,QACN,SAAS;AAAA,QACT,aAAa;AAAA,MACd;AAAA,MACA;AAAA,QACC,aAAa;AAAA,QACb,MAAM;AAAA,QACN,MAAM;AAAA,QACN,SACC;AAAA,QACD,UAAU;AAAA,MACX;AAAA,MACA;AAAA,QACC,aAAa;AAAA,QACb,MAAM;AAAA,QACN,MAAM;AAAA,QACN,SACC;AAAA,QACD,UAAU;AAAA,MACX;AAAA,MACA;AAAA,QACC,aAAa;AAAA,QACb,MAAM;AAAA,QACN,MAAM;AAAA,QACN,SACC;AAAA,MACF;AAAA,MACA;AAAA,QACC,aAAa;AAAA,QACb,MAAM;AAAA,QACN,MAAM;AAAA,QACN,SAAS;AAAA,MACV;AAAA,MACA;AAAA,QACC,aAAa;AAAA,QACb,MAAM;AAAA,QACN,MAAM;AAAA,QACN,SAAS;AAAA,MACV;AAAA,IACD;AAAA;AACD;","names":[]}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var PerplexityApi_credentials_exports = {};
|
|
20
|
+
__export(PerplexityApi_credentials_exports, {
|
|
21
|
+
PerplexityApi: () => PerplexityApi
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(PerplexityApi_credentials_exports);
|
|
24
|
+
class PerplexityApi {
|
|
25
|
+
constructor() {
|
|
26
|
+
this.name = "perplexityApi";
|
|
27
|
+
this.displayName = "Perplexity API";
|
|
28
|
+
this.documentationUrl = "https://docs.perplexity.ai";
|
|
29
|
+
this.properties = [
|
|
30
|
+
{
|
|
31
|
+
displayName: "API Key",
|
|
32
|
+
name: "apiKey",
|
|
33
|
+
type: "string",
|
|
34
|
+
typeOptions: { password: true },
|
|
35
|
+
required: true,
|
|
36
|
+
default: "",
|
|
37
|
+
description: "Your Perplexity API key. Get it from your Perplexity account."
|
|
38
|
+
}
|
|
39
|
+
];
|
|
40
|
+
this.authenticate = {
|
|
41
|
+
type: "generic",
|
|
42
|
+
properties: {
|
|
43
|
+
headers: {
|
|
44
|
+
Authorization: "=Bearer {{$credentials.apiKey}}"
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
this.test = {
|
|
49
|
+
request: {
|
|
50
|
+
baseURL: "https://api.perplexity.ai",
|
|
51
|
+
url: "/chat/completions",
|
|
52
|
+
method: "POST",
|
|
53
|
+
body: {
|
|
54
|
+
model: "r1-1776",
|
|
55
|
+
messages: [{ role: "user", content: "test" }]
|
|
56
|
+
},
|
|
57
|
+
headers: {
|
|
58
|
+
Authorization: "=Bearer {{$credentials.apiKey}}",
|
|
59
|
+
"Content-Type": "application/json"
|
|
60
|
+
},
|
|
61
|
+
json: true
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
67
|
+
0 && (module.exports = {
|
|
68
|
+
PerplexityApi
|
|
69
|
+
});
|
|
70
|
+
//# sourceMappingURL=PerplexityApi.credentials.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../credentials/PerplexityApi.credentials.ts"],"sourcesContent":["import type {\n\tIAuthenticateGeneric,\n\tICredentialTestRequest,\n\tICredentialType,\n\tINodeProperties,\n} from 'n8n-workflow';\n\nexport class PerplexityApi implements ICredentialType {\n\tname = 'perplexityApi';\n\n\tdisplayName = 'Perplexity API';\n\n\tdocumentationUrl = 'https://docs.perplexity.ai';\n\n\tproperties: INodeProperties[] = [\n\t\t{\n\t\t\tdisplayName: 'API Key',\n\t\t\tname: 'apiKey',\n\t\t\ttype: 'string',\n\t\t\ttypeOptions: { password: true },\n\t\t\trequired: true,\n\t\t\tdefault: '',\n\t\t\tdescription: 'Your Perplexity API key. Get it from your Perplexity account.',\n\t\t},\n\t];\n\n\tauthenticate: IAuthenticateGeneric = {\n\t\ttype: 'generic',\n\t\tproperties: {\n\t\t\theaders: {\n\t\t\t\tAuthorization: '=Bearer {{$credentials.apiKey}}',\n\t\t\t},\n\t\t},\n\t};\n\n\ttest: ICredentialTestRequest = {\n\t\trequest: {\n\t\t\tbaseURL: 'https://api.perplexity.ai',\n\t\t\turl: '/chat/completions',\n\t\t\tmethod: 'POST',\n\t\t\tbody: {\n\t\t\t\tmodel: 'r1-1776',\n\t\t\t\tmessages: [{ role: 'user', content: 'test' }],\n\t\t\t},\n\t\t\theaders: {\n\t\t\t\tAuthorization: '=Bearer {{$credentials.apiKey}}',\n\t\t\t\t'Content-Type': 'application/json',\n\t\t\t},\n\t\t\tjson: true,\n\t\t},\n\t};\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAOO,MAAM,cAAyC;AAAA,EAA/C;AACN,gBAAO;AAEP,uBAAc;AAEd,4BAAmB;AAEnB,sBAAgC;AAAA,MAC/B;AAAA,QACC,aAAa;AAAA,QACb,MAAM;AAAA,QACN,MAAM;AAAA,QACN,aAAa,EAAE,UAAU,KAAK;AAAA,QAC9B,UAAU;AAAA,QACV,SAAS;AAAA,QACT,aAAa;AAAA,MACd;AAAA,IACD;AAEA,wBAAqC;AAAA,MACpC,MAAM;AAAA,MACN,YAAY;AAAA,QACX,SAAS;AAAA,UACR,eAAe;AAAA,QAChB;AAAA,MACD;AAAA,IACD;AAEA,gBAA+B;AAAA,MAC9B,SAAS;AAAA,QACR,SAAS;AAAA,QACT,KAAK;AAAA,QACL,QAAQ;AAAA,QACR,MAAM;AAAA,UACL,OAAO;AAAA,UACP,UAAU,CAAC,EAAE,MAAM,QAAQ,SAAS,OAAO,CAAC;AAAA,QAC7C;AAAA,QACA,SAAS;AAAA,UACR,eAAe;AAAA,UACf,gBAAgB;AAAA,QACjB;AAAA,QACA,MAAM;AAAA,MACP;AAAA,IACD;AAAA;AACD;","names":[]}
|
|
@@ -2041,6 +2041,13 @@
|
|
|
2041
2041
|
"peekalink"
|
|
2042
2042
|
]
|
|
2043
2043
|
},
|
|
2044
|
+
"perplexityApi": {
|
|
2045
|
+
"className": "PerplexityApi",
|
|
2046
|
+
"sourcePath": "dist/credentials/PerplexityApi.credentials.js",
|
|
2047
|
+
"supportedNodes": [
|
|
2048
|
+
"perplexity"
|
|
2049
|
+
]
|
|
2050
|
+
},
|
|
2044
2051
|
"phantombusterApi": {
|
|
2045
2052
|
"className": "PhantombusterApi",
|
|
2046
2053
|
"sourcePath": "dist/credentials/PhantombusterApi.credentials.js",
|
package/dist/known/nodes.json
CHANGED
|
@@ -1179,6 +1179,10 @@
|
|
|
1179
1179
|
"className": "Peekalink",
|
|
1180
1180
|
"sourcePath": "dist/nodes/Peekalink/Peekalink.node.js"
|
|
1181
1181
|
},
|
|
1182
|
+
"perplexity": {
|
|
1183
|
+
"className": "Perplexity",
|
|
1184
|
+
"sourcePath": "dist/nodes/Perplexity/Perplexity.node.js"
|
|
1185
|
+
},
|
|
1182
1186
|
"phantombuster": {
|
|
1183
1187
|
"className": "Phantombuster",
|
|
1184
1188
|
"sourcePath": "dist/nodes/Phantombuster/Phantombuster.node.js"
|
|
@@ -18,8 +18,8 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
19
|
var EvaluationTrigger_node_ee_exports = {};
|
|
20
20
|
__export(EvaluationTrigger_node_ee_exports, {
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
DEFAULT_STARTING_ROW: () => DEFAULT_STARTING_ROW,
|
|
22
|
+
EvaluationTrigger: () => EvaluationTrigger
|
|
23
23
|
});
|
|
24
24
|
module.exports = __toCommonJS(EvaluationTrigger_node_ee_exports);
|
|
25
25
|
var import_n8n_workflow = require("n8n-workflow");
|
|
@@ -28,7 +28,7 @@ var import_read = require("../../Google/Sheet/v2/actions/sheet/read.operation");
|
|
|
28
28
|
var import_versionDescription = require("../../Google/Sheet/v2/actions/versionDescription");
|
|
29
29
|
var import_methods = require("../methods");
|
|
30
30
|
var import_evaluationTriggerUtils = require("../utils/evaluationTriggerUtils");
|
|
31
|
-
|
|
31
|
+
const DEFAULT_STARTING_ROW = 2;
|
|
32
32
|
class EvaluationTrigger {
|
|
33
33
|
constructor() {
|
|
34
34
|
this.description = {
|
|
@@ -111,17 +111,17 @@ class EvaluationTrigger {
|
|
|
111
111
|
};
|
|
112
112
|
this.methods = { loadOptions: import_methods.loadOptions, listSearch: import_methods.listSearch };
|
|
113
113
|
}
|
|
114
|
-
async execute(
|
|
115
|
-
if (startRow) {
|
|
116
|
-
startingRow = startRow;
|
|
117
|
-
}
|
|
114
|
+
async execute() {
|
|
118
115
|
const inputData = this.getInputData();
|
|
119
116
|
const MAX_ROWS = 1e3;
|
|
120
117
|
const maxRows = this.getNodeParameter("limitRows", 0) ? this.getNodeParameter("maxRows", 0) + 1 : MAX_ROWS;
|
|
118
|
+
const previousRunRowNumber = inputData?.[0]?.json?.row_number;
|
|
119
|
+
const previousRunRowsLeft = inputData?.[0]?.json?._rowsLeft;
|
|
120
|
+
const firstDataRow = typeof previousRunRowNumber === "number" && previousRunRowsLeft !== 0 ? previousRunRowNumber + 1 : DEFAULT_STARTING_ROW;
|
|
121
121
|
const rangeOptions = {
|
|
122
122
|
rangeDefinition: "specifyRange",
|
|
123
123
|
headerRow: 1,
|
|
124
|
-
firstDataRow
|
|
124
|
+
firstDataRow
|
|
125
125
|
};
|
|
126
126
|
const googleSheetInstance = import_evaluationTriggerUtils.getGoogleSheet.call(this);
|
|
127
127
|
const googleSheet = await import_evaluationTriggerUtils.getSheet.call(this, googleSheetInstance);
|
|
@@ -142,7 +142,6 @@ class EvaluationTrigger {
|
|
|
142
142
|
const currentRow = allRows[0];
|
|
143
143
|
const currentRowNumber = currentRow.json?.row_number;
|
|
144
144
|
if (currentRow === void 0) {
|
|
145
|
-
startingRow = 2;
|
|
146
145
|
throw new import_n8n_workflow.NodeOperationError(this.getNode(), "No row found");
|
|
147
146
|
}
|
|
148
147
|
const rowsLeft = await import_evaluationTriggerUtils.getNumberOfRowsLeftFiltered.call(
|
|
@@ -153,35 +152,26 @@ class EvaluationTrigger {
|
|
|
153
152
|
maxRows
|
|
154
153
|
);
|
|
155
154
|
currentRow.json._rowsLeft = rowsLeft;
|
|
156
|
-
startingRow = currentRowNumber + 1;
|
|
157
|
-
if (rowsLeft === 0) {
|
|
158
|
-
startingRow = 2;
|
|
159
|
-
}
|
|
160
155
|
return [[currentRow]];
|
|
161
156
|
} else {
|
|
162
|
-
const currentRow = allRows.find((row) => row?.json?.row_number ===
|
|
157
|
+
const currentRow = allRows.find((row) => row?.json?.row_number === firstDataRow);
|
|
163
158
|
const rowsLeft = await import_evaluationTriggerUtils.getRowsLeft.call(
|
|
164
159
|
this,
|
|
165
160
|
googleSheetInstance,
|
|
166
161
|
googleSheet.title,
|
|
167
|
-
`${googleSheet.title}!${
|
|
162
|
+
`${googleSheet.title}!${firstDataRow}:${maxRows}`
|
|
168
163
|
);
|
|
169
164
|
if (currentRow === void 0) {
|
|
170
|
-
startingRow = 2;
|
|
171
165
|
throw new import_n8n_workflow.NodeOperationError(this.getNode(), "No row found");
|
|
172
166
|
}
|
|
173
167
|
currentRow.json._rowsLeft = rowsLeft;
|
|
174
|
-
startingRow += 1;
|
|
175
|
-
if (rowsLeft === 0) {
|
|
176
|
-
startingRow = 2;
|
|
177
|
-
}
|
|
178
168
|
return [[currentRow]];
|
|
179
169
|
}
|
|
180
170
|
}
|
|
181
171
|
}
|
|
182
172
|
// Annotate the CommonJS export names for ESM import in node:
|
|
183
173
|
0 && (module.exports = {
|
|
184
|
-
|
|
185
|
-
|
|
174
|
+
DEFAULT_STARTING_ROW,
|
|
175
|
+
EvaluationTrigger
|
|
186
176
|
});
|
|
187
177
|
//# sourceMappingURL=EvaluationTrigger.node.ee.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../nodes/Evaluation/EvaluationTrigger/EvaluationTrigger.node.ee.ts"],"sourcesContent":["/* eslint-disable n8n-nodes-base/node-filename-against-convention */\nimport type {\n\tINodeType,\n\tINodeTypeDescription,\n\tIExecuteFunctions,\n\tINodeExecutionData,\n} from 'n8n-workflow';\nimport { NodeConnectionTypes, NodeOperationError } from 'n8n-workflow';\n\nimport { document, sheet } from '../../Google/Sheet/GoogleSheetsTrigger.node';\nimport { readFilter } from '../../Google/Sheet/v2/actions/sheet/read.operation';\nimport { authentication } from '../../Google/Sheet/v2/actions/versionDescription';\nimport type { ILookupValues } from '../../Google/Sheet/v2/helpers/GoogleSheets.types';\nimport { listSearch, loadOptions } from '../methods';\nimport {\n\tgetGoogleSheet,\n\tgetResults,\n\tgetRowsLeft,\n\tgetNumberOfRowsLeftFiltered,\n\tgetSheet,\n} from '../utils/evaluationTriggerUtils';\n\nexport
|
|
1
|
+
{"version":3,"sources":["../../../../nodes/Evaluation/EvaluationTrigger/EvaluationTrigger.node.ee.ts"],"sourcesContent":["/* eslint-disable n8n-nodes-base/node-filename-against-convention */\nimport type {\n\tINodeType,\n\tINodeTypeDescription,\n\tIExecuteFunctions,\n\tINodeExecutionData,\n} from 'n8n-workflow';\nimport { NodeConnectionTypes, NodeOperationError } from 'n8n-workflow';\n\nimport { document, sheet } from '../../Google/Sheet/GoogleSheetsTrigger.node';\nimport { readFilter } from '../../Google/Sheet/v2/actions/sheet/read.operation';\nimport { authentication } from '../../Google/Sheet/v2/actions/versionDescription';\nimport type { ILookupValues } from '../../Google/Sheet/v2/helpers/GoogleSheets.types';\nimport { listSearch, loadOptions } from '../methods';\nimport {\n\tgetGoogleSheet,\n\tgetResults,\n\tgetRowsLeft,\n\tgetNumberOfRowsLeftFiltered,\n\tgetSheet,\n} from '../utils/evaluationTriggerUtils';\n\nexport const DEFAULT_STARTING_ROW = 2;\n\nexport class EvaluationTrigger implements INodeType {\n\tdescription: INodeTypeDescription = {\n\t\tdisplayName: 'Evaluation Trigger',\n\t\ticon: 'fa:check-double',\n\t\tname: 'evaluationTrigger',\n\t\tgroup: ['trigger'],\n\t\tversion: 4.6,\n\t\tdescription: 'Run a test dataset through your workflow to check performance',\n\t\teventTriggerDescription: '',\n\t\tdefaults: {\n\t\t\tname: 'When fetching a dataset row',\n\t\t\tcolor: '#c3c9d5',\n\t\t},\n\t\tinputs: [],\n\t\toutputs: [NodeConnectionTypes.Main],\n\t\tproperties: [\n\t\t\t{\n\t\t\t\tdisplayName:\n\t\t\t\t\t'Pulls a test dataset from a Google Sheet. The workflow will run once for each row, in sequence. Tips for wiring this node up <a href=\"https://docs.n8n.io/advanced-ai/evaluations/tips-and-common-issues/#combining-multiple-triggers\">here</a>.',\n\t\t\t\tname: 'notice',\n\t\t\t\ttype: 'notice',\n\t\t\t\tdefault: '',\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Credentials',\n\t\t\t\tname: 'credentials',\n\t\t\t\ttype: 'credentials',\n\t\t\t\tdefault: '',\n\t\t\t},\n\t\t\tauthentication,\n\t\t\t{\n\t\t\t\t...document,\n\t\t\t\tdisplayName: 'Document Containing Dataset',\n\t\t\t\thint: 'Example dataset format <a href=\"https://docs.google.com/spreadsheets/d/1vD_IdeFUg7sHsK9okL6Doy1rGOkWTnPJV3Dro4FBUsY/edit?gid=0#gid=0\">here</a>',\n\t\t\t},\n\t\t\t{ ...sheet, displayName: 'Sheet Containing Dataset' },\n\t\t\t{\n\t\t\t\tdisplayName: 'Limit Rows',\n\t\t\t\tname: 'limitRows',\n\t\t\t\ttype: 'boolean',\n\t\t\t\tdefault: false,\n\t\t\t\tnoDataExpression: true,\n\t\t\t\tdescription: 'Whether to limit number of rows to process',\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Max Rows to Process',\n\t\t\t\tname: 'maxRows',\n\t\t\t\ttype: 'number',\n\t\t\t\tdefault: 10,\n\t\t\t\tdescription: 'Maximum number of rows to process',\n\t\t\t\tnoDataExpression: false,\n\t\t\t\tdisplayOptions: { show: { limitRows: [true] } },\n\t\t\t},\n\t\t\treadFilter,\n\t\t],\n\t\tcodex: {\n\t\t\talias: ['Test', 'Metrics', 'Evals', 'Set Output', 'Set Metrics'],\n\t\t},\n\t\tcredentials: [\n\t\t\t{\n\t\t\t\tname: 'googleApi',\n\t\t\t\trequired: true,\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\tshow: {\n\t\t\t\t\t\tauthentication: ['serviceAccount'],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\ttestedBy: 'googleApiCredentialTest',\n\t\t\t},\n\t\t\t{\n\t\t\t\tname: 'googleSheetsOAuth2Api',\n\t\t\t\trequired: true,\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\tshow: {\n\t\t\t\t\t\tauthentication: ['oAuth2'],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t],\n\t};\n\n\tmethods = { loadOptions, listSearch };\n\n\tasync execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]> {\n\t\tconst inputData = this.getInputData();\n\n\t\tconst MAX_ROWS = 1000;\n\n\t\tconst maxRows = this.getNodeParameter('limitRows', 0)\n\t\t\t? (this.getNodeParameter('maxRows', 0) as number) + 1\n\t\t\t: MAX_ROWS;\n\n\t\tconst previousRunRowNumber = inputData?.[0]?.json?.row_number;\n\t\tconst previousRunRowsLeft = inputData?.[0]?.json?._rowsLeft;\n\n\t\tconst firstDataRow =\n\t\t\ttypeof previousRunRowNumber === 'number' && previousRunRowsLeft !== 0\n\t\t\t\t? previousRunRowNumber + 1\n\t\t\t\t: DEFAULT_STARTING_ROW;\n\t\tconst rangeOptions = {\n\t\t\trangeDefinition: 'specifyRange',\n\t\t\theaderRow: 1,\n\t\t\tfirstDataRow,\n\t\t};\n\n\t\tconst googleSheetInstance = getGoogleSheet.call(this);\n\n\t\tconst googleSheet = await getSheet.call(this, googleSheetInstance);\n\n\t\tconst allRows = await getResults.call(this, [], googleSheetInstance, googleSheet, rangeOptions);\n\n\t\t// This is for test runner which requires a different return format\n\t\tif (inputData[0].json.requestDataset) {\n\t\t\tconst testRunnerResult = await getResults.call(\n\t\t\t\tthis,\n\t\t\t\t[],\n\t\t\t\tgoogleSheetInstance,\n\t\t\t\tgoogleSheet,\n\t\t\t\t{},\n\t\t\t);\n\n\t\t\tconst result = testRunnerResult.filter((row) => (row?.json?.row_number as number) <= maxRows);\n\n\t\t\treturn [result];\n\t\t}\n\n\t\tconst hasFilter = this.getNodeParameter('filtersUI.values', 0, []) as ILookupValues[];\n\n\t\tif (hasFilter.length > 0) {\n\t\t\tconst currentRow = allRows[0];\n\t\t\tconst currentRowNumber = currentRow.json?.row_number as number;\n\n\t\t\tif (currentRow === undefined) {\n\t\t\t\tthrow new NodeOperationError(this.getNode(), 'No row found');\n\t\t\t}\n\n\t\t\tconst rowsLeft = await getNumberOfRowsLeftFiltered.call(\n\t\t\t\tthis,\n\t\t\t\tgoogleSheetInstance,\n\t\t\t\tgoogleSheet.title,\n\t\t\t\tcurrentRowNumber + 1,\n\t\t\t\tmaxRows,\n\t\t\t);\n\n\t\t\tcurrentRow.json._rowsLeft = rowsLeft;\n\n\t\t\treturn [[currentRow]];\n\t\t} else {\n\t\t\tconst currentRow = allRows.find((row) => (row?.json?.row_number as number) === firstDataRow);\n\n\t\t\tconst rowsLeft = await getRowsLeft.call(\n\t\t\t\tthis,\n\t\t\t\tgoogleSheetInstance,\n\t\t\t\tgoogleSheet.title,\n\t\t\t\t`${googleSheet.title}!${firstDataRow}:${maxRows}`,\n\t\t\t);\n\n\t\t\tif (currentRow === undefined) {\n\t\t\t\tthrow new NodeOperationError(this.getNode(), 'No row found');\n\t\t\t}\n\n\t\t\tcurrentRow.json._rowsLeft = rowsLeft;\n\n\t\t\treturn [[currentRow]];\n\t\t}\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAOA,0BAAwD;AAExD,iCAAgC;AAChC,kBAA2B;AAC3B,gCAA+B;AAE/B,qBAAwC;AACxC,oCAMO;AAEA,MAAM,uBAAuB;AAE7B,MAAM,kBAAuC;AAAA,EAA7C;AACN,uBAAoC;AAAA,MACnC,aAAa;AAAA,MACb,MAAM;AAAA,MACN,MAAM;AAAA,MACN,OAAO,CAAC,SAAS;AAAA,MACjB,SAAS;AAAA,MACT,aAAa;AAAA,MACb,yBAAyB;AAAA,MACzB,UAAU;AAAA,QACT,MAAM;AAAA,QACN,OAAO;AAAA,MACR;AAAA,MACA,QAAQ,CAAC;AAAA,MACT,SAAS,CAAC,wCAAoB,IAAI;AAAA,MAClC,YAAY;AAAA,QACX;AAAA,UACC,aACC;AAAA,UACD,MAAM;AAAA,UACN,MAAM;AAAA,UACN,SAAS;AAAA,QACV;AAAA,QACA;AAAA,UACC,aAAa;AAAA,UACb,MAAM;AAAA,UACN,MAAM;AAAA,UACN,SAAS;AAAA,QACV;AAAA,QACA;AAAA,QACA;AAAA,UACC,GAAG;AAAA,UACH,aAAa;AAAA,UACb,MAAM;AAAA,QACP;AAAA,QACA,EAAE,GAAG,kCAAO,aAAa,2BAA2B;AAAA,QACpD;AAAA,UACC,aAAa;AAAA,UACb,MAAM;AAAA,UACN,MAAM;AAAA,UACN,SAAS;AAAA,UACT,kBAAkB;AAAA,UAClB,aAAa;AAAA,QACd;AAAA,QACA;AAAA,UACC,aAAa;AAAA,UACb,MAAM;AAAA,UACN,MAAM;AAAA,UACN,SAAS;AAAA,UACT,aAAa;AAAA,UACb,kBAAkB;AAAA,UAClB,gBAAg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CAAC;AAAA,QACD;AAAA,QACA;AAAA,QACA,CAAC;AAAA,MACF;AAEA,YAAM,SAAS,iBAAiB,OAAO,CAAC,QAAS,KAAK,MAAM,cAAyB,OAAO;AAE5F,aAAO,CAAC,MAAM;AAAA,IACf;AAEA,UAAM,YAAY,KAAK,iBAAiB,oBAAoB,GAAG,CAAC,CAAC;AAEjE,QAAI,UAAU,SAAS,GAAG;AACzB,YAAM,aAAa,QAAQ,CAAC;AAC5B,YAAM,mBAAmB,WAAW,MAAM;AAE1C,UAAI,eAAe,QAAW;AAC7B,cAAM,IAAI,uCAAmB,KAAK,QAAQ,GAAG,cAAc;AAAA,MAC5D;AAEA,YAAM,WAAW,MAAM,0DAA4B;AAAA,QAClD;AAAA,QACA;AAAA,QACA,YAAY;AAAA,QACZ,mBAAmB;AAAA,QACnB;AAAA,MACD;AAEA,iBAAW,KAAK,YAAY;AAE5B,aAAO,CAAC,CAAC,UAAU,CAAC;AAAA,IACrB,OAAO;AACN,YAAM,aAAa,QAAQ,KAAK,CAAC,QAAS,KAAK,MAAM,eAA0B,YAAY;AAE3F,YAAM,WAAW,MAAM,0CAAY;AAAA,QAClC;AAAA,QACA;AAAA,QACA,YAAY;AAAA,QACZ,GAAG,YAAY,KAAK,IAAI,YAAY,IAAI,OAAO;AAAA,MAChD;AAEA,UAAI,eAAe,QAAW;AAC7B,cAAM,IAAI,uCAAmB,KAAK,QAAQ,GAAG,cAAc;AAAA,MAC5D;AAEA,iBAAW,KAAK,YAAY;AAE5B,aAAO,CAAC,CAAC,UAAU,CAAC;AAAA,IACrB;AAAA,EACD;AACD;","names":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../nodes/JinaAI/JinaAi.node.ts"],"sourcesContent":["import { NodeConnectionTypes, type INodeType, type INodeTypeDescription } from 'n8n-workflow';\n\nexport class JinaAi implements INodeType {\n\tdescription: INodeTypeDescription = {\n\t\tdisplayName: 'Jina AI',\n\t\tname: 'jinaAi',\n\t\ticon: {\n\t\t\tlight: 'file:jinaAi.svg',\n\t\t\tdark: 'file:jinaAi.dark.svg',\n\t\t},\n\t\tgroup: ['transform'],\n\t\tversion: 1,\n\t\tsubtitle: '={{ $parameter[\"operation\"] + \": \" + $parameter[\"resource\"] }}',\n\t\tdescription: 'Interact with Jina AI API',\n\t\tdefaults: {\n\t\t\tname: 'Jina AI',\n\t\t},\n\t\tinputs: [NodeConnectionTypes.Main],\n\t\toutputs: [NodeConnectionTypes.Main],\n\t\tusableAsTool: true,\n\t\tcredentials: [\n\t\t\t{\n\t\t\t\tname: 'jinaAiApi',\n\t\t\t\trequired: true,\n\t\t\t},\n\t\t],\n\t\trequestDefaults: {\n\t\t\theaders: {\n\t\t\t\tAccept: 'application/json',\n\t\t\t},\n\t\t},\n\t\tproperties: [\n\t\t\t{\n\t\t\t\tdisplayName: 'Resource',\n\t\t\t\tname: 'resource',\n\t\t\t\ttype: 'options',\n\t\t\t\tnoDataExpression: true,\n\t\t\t\toptions: [\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'Reader',\n\t\t\t\t\t\tvalue: 'reader',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'Research',\n\t\t\t\t\t\tvalue: 'research',\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t\tdefault: 'reader',\n\t\t\t},\n\t\t\t// Operations\n\t\t\t{\n\t\t\t\tdisplayName: 'Operation',\n\t\t\t\tname: 'operation',\n\t\t\t\ttype: 'options',\n\t\t\t\tnoDataExpression: true,\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\tshow: {\n\t\t\t\t\t\tresource: ['reader'],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\toptions: [\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'Read',\n\t\t\t\t\t\tvalue: 'read',\n\t\t\t\t\t\taction: 'Read URL content',\n\t\t\t\t\t\tdescription:\n\t\t\t\t\t\t\t'Fetches content from a URL and converts it to clean, LLM-friendly formats',\n\t\t\t\t\t\trouting: {\n\t\t\t\t\t\t\trequest: {\n\t\t\t\t\t\t\t\tmethod: 'GET',\n\t\t\t\t\t\t\t\turl: '=https://r.jina.ai/{{ $parameter[\"url\"] }}',\n\t\t\t\t\t\t\t\theaders: {\n\t\t\t\t\t\t\t\t\t'X-Return-Format': '={{ $parameter[\"options\"][\"outputFormat\"] }}',\n\t\t\t\t\t\t\t\t\t'X-Target-Selector': '={{ $parameter[\"options\"][\"targetSelector\"] }}',\n\t\t\t\t\t\t\t\t\t'X-Remove-Selector': '={{ $parameter[\"options\"][\"excludeSelector\"] }}',\n\t\t\t\t\t\t\t\t\t'X-With-Generated-Alt': '={{ $parameter[\"options\"][\"enableImageCaptioning\"] }}',\n\t\t\t\t\t\t\t\t\t'X-Wait-For-Selector': '={{ $parameter[\"options\"][\"waitForSelector\"] }}',\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\toutput: {\n\t\t\t\t\t\t\t\tpostReceive: [\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\ttype: 'rootProperty',\n\t\t\t\t\t\t\t\t\t\tenabled: '={{ $parameter[\"simplify\"] }}',\n\t\t\t\t\t\t\t\t\t\tproperties: {\n\t\t\t\t\t\t\t\t\t\t\tproperty: 'data',\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'Search',\n\t\t\t\t\t\tvalue: 'search',\n\t\t\t\t\t\taction: 'Search web',\n\t\t\t\t\t\tdescription:\n\t\t\t\t\t\t\t'Performs a web search via Jina AI and returns top results as clean, LLM-friendly formats',\n\t\t\t\t\t\trouting: {\n\t\t\t\t\t\t\trequest: {\n\t\t\t\t\t\t\t\tmethod: 'GET',\n\t\t\t\t\t\t\t\turl: 'https://s.jina.ai/',\n\t\t\t\t\t\t\t\theaders: {\n\t\t\t\t\t\t\t\t\t'X-Return-Format': '={{ $parameter[\"options\"][\"outputFormat\"] }}',\n\t\t\t\t\t\t\t\t\t'X-Site': '={{ $parameter[\"options\"][\"siteFilter\"] }}',\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tqs: {\n\t\t\t\t\t\t\t\t\tq: '={{ $parameter[\"searchQuery\"] }}',\n\t\t\t\t\t\t\t\t\tpage: '={{ $parameter[\"options\"][\"pageNumber\"] }}',\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\toutput: {\n\t\t\t\t\t\t\t\tpostReceive: [\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\ttype: 'rootProperty',\n\t\t\t\t\t\t\t\t\t\tenabled: '={{ $parameter[\"simplify\"] }}',\n\t\t\t\t\t\t\t\t\t\tproperties: {\n\t\t\t\t\t\t\t\t\t\t\tproperty: 'data',\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t\tdefault: 'read',\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Operation',\n\t\t\t\tname: 'operation',\n\t\t\t\ttype: 'options',\n\t\t\t\tnoDataExpression: true,\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\tshow: {\n\t\t\t\t\t\tresource: ['research'],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\toptions: [\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'Deep Research',\n\t\t\t\t\t\tvalue: 'deepResearch',\n\t\t\t\t\t\taction: 'Perform deep research',\n\t\t\t\t\t\tdescription: 'Research a topic and generate a structured research report',\n\t\t\t\t\t\trouting: {\n\t\t\t\t\t\t\trequest: {\n\t\t\t\t\t\t\t\tmethod: 'POST',\n\t\t\t\t\t\t\t\turl: 'https://deepsearch.jina.ai/v1/chat/completions',\n\t\t\t\t\t\t\t\tbody: {\n\t\t\t\t\t\t\t\t\tmessages: [\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\trole: 'user',\n\t\t\t\t\t\t\t\t\t\t\tcontent: '={{ $parameter[\"researchQuery\"] }}',\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\t\tmax_returned_urls: '={{ $parameter[\"options\"][\"maxReturnedSources\"] }}',\n\t\t\t\t\t\t\t\t\tboost_hostnames:\n\t\t\t\t\t\t\t\t\t\t'={{ $parameter[\"options\"][\"prioritizeSources\"].split(/,\\\\s*/) }}',\n\t\t\t\t\t\t\t\t\tbad_hostnames: '={{ $parameter[\"options\"][\"excludeSources\"].split(/,\\\\s*/) }}',\n\t\t\t\t\t\t\t\t\tonly_hostnames: '={{ $parameter[\"options\"][\"siteFilter\"].split(/,\\\\s*/) }}',\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\toutput: {\n\t\t\t\t\t\t\t\tpostReceive: [\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\ttype: 'setKeyValue',\n\t\t\t\t\t\t\t\t\t\tenabled: '={{ $parameter[\"simplify\"] }}',\n\t\t\t\t\t\t\t\t\t\tproperties: {\n\t\t\t\t\t\t\t\t\t\t\tcontent: '={{ $responseItem[\"choices\"][0][\"message\"][\"content\"] }}',\n\t\t\t\t\t\t\t\t\t\t\tannotations: '={{ $responseItem[\"choices\"][0][\"message\"][\"annotations\"] }}',\n\t\t\t\t\t\t\t\t\t\t\tusage: '={{ $responseItem[\"usage\"] }}',\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t\tdefault: 'deepResearch',\n\t\t\t},\n\t\t\t// Options for Reader\n\t\t\t{\n\t\t\t\tdisplayName: 'URL',\n\t\t\t\tname: 'url',\n\t\t\t\ttype: 'string',\n\t\t\t\trequired: true,\n\t\t\t\tdefault: '',\n\t\t\t\tplaceholder: 'https://jina.ai/',\n\t\t\t\tdescription: 'The URL to fetch content from',\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\tshow: {\n\t\t\t\t\t\tresource: ['reader'],\n\t\t\t\t\t\toperation: ['read'],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Simplify',\n\t\t\t\tname: 'simplify',\n\t\t\t\ttype: 'boolean',\n\t\t\t\tdefault: true,\n\t\t\t\tdescription:\n\t\t\t\t\t'Whether to return a simplified version of the response instead of the raw data',\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\tshow: {\n\t\t\t\t\t\tresource: ['reader'],\n\t\t\t\t\t\toperation: ['read'],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Options',\n\t\t\t\tname: 'options',\n\t\t\t\ttype: 'collection',\n\t\t\t\tplaceholder: 'Add Option',\n\t\t\t\tdefault: {},\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\tshow: {\n\t\t\t\t\t\tresource: ['reader'],\n\t\t\t\t\t\toperation: ['read'],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\toptions: [\n\t\t\t\t\t{\n\t\t\t\t\t\tdisplayName: 'Output Format',\n\t\t\t\t\t\tname: 'outputFormat',\n\t\t\t\t\t\tdescription: 'Specify desired output format',\n\t\t\t\t\t\ttype: 'options',\n\t\t\t\t\t\toptions: [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tname: 'HTML',\n\t\t\t\t\t\t\t\tvalue: 'html',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tname: 'JSON',\n\t\t\t\t\t\t\t\tvalue: '',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tname: 'Markdown',\n\t\t\t\t\t\t\t\tvalue: 'markdown',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tname: 'Screenshot',\n\t\t\t\t\t\t\t\tvalue: 'screenshot',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tname: 'Text',\n\t\t\t\t\t\t\t\tvalue: 'text',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t],\n\t\t\t\t\t\tdefault: '',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tdisplayName: 'Target CSS Selector',\n\t\t\t\t\t\tname: 'targetSelector',\n\t\t\t\t\t\ttype: 'string',\n\t\t\t\t\t\tdescription: 'CSS selector to focus on specific page elements',\n\t\t\t\t\t\tdefault: '',\n\t\t\t\t\t\tplaceholder: 'e.g. #main-content .article',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tdisplayName: 'Exclude CSS Selector',\n\t\t\t\t\t\tname: 'excludeSelector',\n\t\t\t\t\t\ttype: 'string',\n\t\t\t\t\t\tdescription: 'CSS selector for elements to exclude',\n\t\t\t\t\t\tdefault: '',\n\t\t\t\t\t\tplaceholder: 'e.g. header, footer, .ads',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tdisplayName: 'Enable Image Captioning',\n\t\t\t\t\t\tname: 'enableImageCaptioning',\n\t\t\t\t\t\ttype: 'boolean',\n\t\t\t\t\t\tdefault: false,\n\t\t\t\t\t\tdescription: 'Whether to generate captions for images within the content',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tdisplayName: 'Wait for CSS Selector',\n\t\t\t\t\t\tname: 'waitForSelector',\n\t\t\t\t\t\ttype: 'string',\n\t\t\t\t\t\tdescription:\n\t\t\t\t\t\t\t'Wait for a specific element to appear before extracting content (for dynamic pages)',\n\t\t\t\t\t\tdefault: '',\n\t\t\t\t\t\tplaceholder: 'e.g. #results-loaded',\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Search Query',\n\t\t\t\tname: 'searchQuery',\n\t\t\t\ttype: 'string',\n\t\t\t\trequired: true,\n\t\t\t\tdefault: '',\n\t\t\t\tplaceholder: 'e.g. Jina AI',\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\tshow: {\n\t\t\t\t\t\tresource: ['reader'],\n\t\t\t\t\t\toperation: ['search'],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Simplify',\n\t\t\t\tname: 'simplify',\n\t\t\t\ttype: 'boolean',\n\t\t\t\tdefault: true,\n\t\t\t\tdescription:\n\t\t\t\t\t'Whether to return a simplified version of the response instead of the raw data',\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\tshow: {\n\t\t\t\t\t\tresource: ['reader'],\n\t\t\t\t\t\toperation: ['search'],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Options',\n\t\t\t\tname: 'options',\n\t\t\t\ttype: 'collection',\n\t\t\t\tplaceholder: 'Add Option',\n\t\t\t\tdefault: {},\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\tshow: {\n\t\t\t\t\t\tresource: ['reader'],\n\t\t\t\t\t\toperation: ['search'],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\toptions: [\n\t\t\t\t\t{\n\t\t\t\t\t\tdisplayName: 'Output Format',\n\t\t\t\t\t\tname: 'outputFormat',\n\t\t\t\t\t\tdescription: 'Specify desired output format',\n\t\t\t\t\t\ttype: 'options',\n\t\t\t\t\t\toptions: [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tname: 'HTML',\n\t\t\t\t\t\t\t\tvalue: 'html',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tname: 'JSON',\n\t\t\t\t\t\t\t\tvalue: '',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tname: 'Markdown',\n\t\t\t\t\t\t\t\tvalue: 'markdown',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tname: 'Screenshot',\n\t\t\t\t\t\t\t\tvalue: 'screenshot',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tname: 'Text',\n\t\t\t\t\t\t\t\tvalue: 'text',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t],\n\t\t\t\t\t\tdefault: 'json',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tdisplayName: 'Site Filter',\n\t\t\t\t\t\tname: 'siteFilter',\n\t\t\t\t\t\ttype: 'string',\n\t\t\t\t\t\tdescription: 'Restrict search to specific websites',\n\t\t\t\t\t\tdefault: '',\n\t\t\t\t\t\tplaceholder: 'e.g. jina.ai, github.com',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tdisplayName: 'Page Number',\n\t\t\t\t\t\tname: 'pageNumber',\n\t\t\t\t\t\ttype: 'number',\n\t\t\t\t\t\ttypeOptions: {\n\t\t\t\t\t\t\tminValue: 1,\n\t\t\t\t\t\t\tnumberPrecision: 0,\n\t\t\t\t\t\t},\n\t\t\t\t\t\tdescription: 'The page number of the search results to retrieve',\n\t\t\t\t\t\tdefault: '',\n\t\t\t\t\t\tplaceholder: '1',\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t},\n\t\t\t// Options for Research\n\t\t\t{\n\t\t\t\tdisplayName: 'Research Query',\n\t\t\t\tname: 'researchQuery',\n\t\t\t\ttype: 'string',\n\t\t\t\trequired: true,\n\t\t\t\tdefault: '',\n\t\t\t\tdescription: 'The topic or question for the AI to research',\n\t\t\t\tplaceholder:\n\t\t\t\t\t'e.g. Analyze the impact of renewable energy sources on climate change mitigation',\n\t\t\t\ttypeOptions: {\n\t\t\t\t\trows: 2,\n\t\t\t\t},\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\tshow: {\n\t\t\t\t\t\tresource: ['research'],\n\t\t\t\t\t\toperation: ['deepResearch'],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Simplify',\n\t\t\t\tname: 'simplify',\n\t\t\t\ttype: 'boolean',\n\t\t\t\tdefault: true,\n\t\t\t\tdescription:\n\t\t\t\t\t'Whether to return a simplified version of the response instead of the raw data',\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\tshow: {\n\t\t\t\t\t\tresource: ['research'],\n\t\t\t\t\t\toperation: ['deepResearch'],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Options',\n\t\t\t\tname: 'options',\n\t\t\t\ttype: 'collection',\n\t\t\t\tplaceholder: 'Add Option',\n\t\t\t\tdefault: {},\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\tshow: {\n\t\t\t\t\t\tresource: ['research'],\n\t\t\t\t\t\toperation: ['deepResearch'],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\toptions: [\n\t\t\t\t\t{\n\t\t\t\t\t\tdisplayName: 'Max Returned Sources',\n\t\t\t\t\t\tname: 'maxReturnedSources',\n\t\t\t\t\t\tdescription: 'The maximum number of URLs to include in the final answer',\n\t\t\t\t\t\ttype: 'number',\n\t\t\t\t\t\ttypeOptions: {\n\t\t\t\t\t\t\tminValue: 1,\n\t\t\t\t\t\t\tnumberPrecision: 0,\n\t\t\t\t\t\t},\n\t\t\t\t\t\tdefault: '',\n\t\t\t\t\t\tplaceholder: 'e.g. 5',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tdisplayName: 'Prioritize Sources',\n\t\t\t\t\t\tname: 'prioritizeSources',\n\t\t\t\t\t\ttype: 'string',\n\t\t\t\t\t\tdescription: 'A list of domains that are given a higher priority for content retrieval',\n\t\t\t\t\t\tdefault: '',\n\t\t\t\t\t\tplaceholder: 'e.g. jina.ai, github.com',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tdisplayName: 'Exclude Sources',\n\t\t\t\t\t\tname: 'excludeSources',\n\t\t\t\t\t\ttype: 'string',\n\t\t\t\t\t\tdescription: 'A list of domains to be strictly excluded from content retrieval',\n\t\t\t\t\t\tdefault: '',\n\t\t\t\t\t\tplaceholder: 'e.g. jina.ai, github.com',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tdisplayName: 'Site Filter',\n\t\t\t\t\t\tname: 'siteFilter',\n\t\t\t\t\t\ttype: 'string',\n\t\t\t\t\t\tdescription: 'Restrict search to specific websites',\n\t\t\t\t\t\tdefault: '',\n\t\t\t\t\t\tplaceholder: 'e.g. jina.ai, github.com',\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t},\n\t\t],\n\t};\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,0BAA+E;AAExE,MAAM,OAA4B;AAAA,EAAlC;AACN,uBAAoC;AAAA,MACnC,aAAa;AAAA,MACb,MAAM;AAAA,MACN,MAAM;AAAA,QACL,OAAO;AAAA,QACP,MAAM;AAAA,MACP;AAAA,MACA,OAAO,CAAC,WAAW;AAAA,MACnB,SAAS;AAAA,MACT,UAAU;AAAA,MACV,aAAa;AAAA,MACb,UAAU;AAAA,QACT,MAAM;AAAA,MACP;AAAA,MACA,QAAQ,CAAC,wCAAoB,IAAI;AAAA,MACjC,SAAS,CAAC,wCAAoB,IAAI;AAAA,MAClC,cAAc;AAAA,MACd,aAAa;AAAA,QACZ;AAAA,UACC,MAAM;AAAA,UACN,UAAU;AAAA,QACX;AAAA,MACD;AAAA,MACA,i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,MAAM;AAAA,cACL,UAAU,CAAC,UAAU;AAAA,cACrB,WAAW,CAAC,cAAc;AAAA,YAC3B;AAAA,UACD;AAAA,UACA,SAAS;AAAA,YACR;AAAA,cACC,aAAa;AAAA,cACb,MAAM;AAAA,cACN,aAAa;AAAA,cACb,MAAM;AAAA,cACN,aAAa;AAAA,gBACZ,UAAU;AAAA,gBACV,iBAAiB;AAAA,cAClB;AAAA,cACA,SAAS;AAAA,cACT,aAAa;AAAA,YACd;AAAA,YACA;AAAA,cACC,aAAa;AAAA,cACb,MAAM;AAAA,cACN,MAAM;AAAA,cACN,aAAa;AAAA,cACb,SAAS;AAAA,cACT,aAAa;AAAA,YACd;AAAA,YACA;AAAA,cACC,aAAa;AAAA,cACb,MAAM;AAAA,cACN,MAAM;AAAA,cACN,aAAa;AAAA,cACb,SAAS;AAAA,cACT,aAAa;AAAA,YACd;AAAA,YACA;AAAA,cACC,aAAa;AAAA,cACb,MAAM;AAAA,cACN,MAAM;AAAA,cACN,aAAa;AAAA,cACb,SAAS;AAAA,cACT,aAAa;AAAA,YACd;AAAA,UACD;AAAA,QACD;AAAA,MACD;AAAA,IACD;AAAA;AACD;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../../nodes/JinaAI/JinaAi.node.ts"],"sourcesContent":["import { NodeConnectionTypes, type INodeType, type INodeTypeDescription } from 'n8n-workflow';\n\nexport class JinaAi implements INodeType {\n\tdescription: INodeTypeDescription = {\n\t\tdisplayName: 'Jina AI',\n\t\tname: 'jinaAi',\n\t\ticon: {\n\t\t\tlight: 'file:jinaAi.svg',\n\t\t\tdark: 'file:jinaAi.dark.svg',\n\t\t},\n\t\tgroup: ['transform'],\n\t\tversion: 1,\n\t\tsubtitle: '={{ $parameter[\"operation\"] + \": \" + $parameter[\"resource\"] }}',\n\t\tdescription: 'Interact with Jina AI API',\n\t\tdefaults: {\n\t\t\tname: 'Jina AI',\n\t\t},\n\t\tinputs: [NodeConnectionTypes.Main],\n\t\toutputs: [NodeConnectionTypes.Main],\n\t\tusableAsTool: true,\n\t\tcredentials: [\n\t\t\t{\n\t\t\t\tname: 'jinaAiApi',\n\t\t\t\trequired: true,\n\t\t\t},\n\t\t],\n\t\trequestDefaults: {\n\t\t\theaders: {\n\t\t\t\tAccept: 'application/json',\n\t\t\t},\n\t\t},\n\t\tproperties: [\n\t\t\t{\n\t\t\t\tdisplayName: 'Resource',\n\t\t\t\tname: 'resource',\n\t\t\t\ttype: 'options',\n\t\t\t\tnoDataExpression: true,\n\t\t\t\toptions: [\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'Reader',\n\t\t\t\t\t\tvalue: 'reader',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'Research',\n\t\t\t\t\t\tvalue: 'research',\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t\tdefault: 'reader',\n\t\t\t},\n\t\t\t// Operations\n\t\t\t{\n\t\t\t\tdisplayName: 'Operation',\n\t\t\t\tname: 'operation',\n\t\t\t\ttype: 'options',\n\t\t\t\tnoDataExpression: true,\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\tshow: {\n\t\t\t\t\t\tresource: ['reader'],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\toptions: [\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'Read',\n\t\t\t\t\t\tvalue: 'read',\n\t\t\t\t\t\taction: 'Read URL content',\n\t\t\t\t\t\tdescription:\n\t\t\t\t\t\t\t'Fetches content from a URL and converts it to clean, LLM-friendly formats',\n\t\t\t\t\t\trouting: {\n\t\t\t\t\t\t\trequest: {\n\t\t\t\t\t\t\t\tmethod: 'GET',\n\t\t\t\t\t\t\t\turl: '=https://r.jina.ai/{{ $parameter[\"url\"] }}',\n\t\t\t\t\t\t\t\theaders: {\n\t\t\t\t\t\t\t\t\t'X-Return-Format': '={{ $parameter[\"options\"][\"outputFormat\"] }}',\n\t\t\t\t\t\t\t\t\t'X-Target-Selector': '={{ $parameter[\"options\"][\"targetSelector\"] }}',\n\t\t\t\t\t\t\t\t\t'X-Remove-Selector': '={{ $parameter[\"options\"][\"excludeSelector\"] }}',\n\t\t\t\t\t\t\t\t\t'X-With-Generated-Alt': '={{ $parameter[\"options\"][\"enableImageCaptioning\"] }}',\n\t\t\t\t\t\t\t\t\t'X-Wait-For-Selector': '={{ $parameter[\"options\"][\"waitForSelector\"] }}',\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\toutput: {\n\t\t\t\t\t\t\t\tpostReceive: [\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\ttype: 'rootProperty',\n\t\t\t\t\t\t\t\t\t\tenabled: '={{ $parameter[\"simplify\"] }}',\n\t\t\t\t\t\t\t\t\t\tproperties: {\n\t\t\t\t\t\t\t\t\t\t\tproperty: 'data',\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'Search',\n\t\t\t\t\t\tvalue: 'search',\n\t\t\t\t\t\taction: 'Search web',\n\t\t\t\t\t\tdescription:\n\t\t\t\t\t\t\t'Performs a web search via Jina AI and returns top results as clean, LLM-friendly formats',\n\t\t\t\t\t\trouting: {\n\t\t\t\t\t\t\trequest: {\n\t\t\t\t\t\t\t\tmethod: 'GET',\n\t\t\t\t\t\t\t\turl: 'https://s.jina.ai/',\n\t\t\t\t\t\t\t\theaders: {\n\t\t\t\t\t\t\t\t\t'X-Return-Format': '={{ $parameter[\"options\"][\"outputFormat\"] }}',\n\t\t\t\t\t\t\t\t\t'X-Site': '={{ $parameter[\"options\"][\"siteFilter\"] }}',\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tqs: {\n\t\t\t\t\t\t\t\t\tq: '={{ $parameter[\"searchQuery\"] }}',\n\t\t\t\t\t\t\t\t\tpage: '={{ $parameter[\"options\"][\"pageNumber\"] }}',\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\toutput: {\n\t\t\t\t\t\t\t\tpostReceive: [\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\ttype: 'rootProperty',\n\t\t\t\t\t\t\t\t\t\tenabled: '={{ $parameter[\"simplify\"] }}',\n\t\t\t\t\t\t\t\t\t\tproperties: {\n\t\t\t\t\t\t\t\t\t\t\tproperty: 'data',\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t\tdefault: 'read',\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Operation',\n\t\t\t\tname: 'operation',\n\t\t\t\ttype: 'options',\n\t\t\t\tnoDataExpression: true,\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\tshow: {\n\t\t\t\t\t\tresource: ['research'],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\toptions: [\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'Deep Research',\n\t\t\t\t\t\tvalue: 'deepResearch',\n\t\t\t\t\t\taction: 'Perform deep research',\n\t\t\t\t\t\tdescription: 'Research a topic and generate a structured research report',\n\t\t\t\t\t\trouting: {\n\t\t\t\t\t\t\trequest: {\n\t\t\t\t\t\t\t\tmethod: 'POST',\n\t\t\t\t\t\t\t\turl: 'https://deepsearch.jina.ai/v1/chat/completions',\n\t\t\t\t\t\t\t\tbody: {\n\t\t\t\t\t\t\t\t\tmessages: [\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\trole: 'user',\n\t\t\t\t\t\t\t\t\t\t\tcontent: '={{ $parameter[\"researchQuery\"] }}',\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\t\tmax_returned_urls: '={{ $parameter[\"options\"][\"maxReturnedSources\"] }}',\n\t\t\t\t\t\t\t\t\tboost_hostnames:\n\t\t\t\t\t\t\t\t\t\t'={{ $parameter[\"options\"][\"prioritizeSources\"].split(/,\\\\s*/) }}',\n\t\t\t\t\t\t\t\t\tbad_hostnames: '={{ $parameter[\"options\"][\"excludeSources\"].split(/,\\\\s*/) }}',\n\t\t\t\t\t\t\t\t\tonly_hostnames: '={{ $parameter[\"options\"][\"siteFilter\"].split(/,\\\\s*/) }}',\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\toutput: {\n\t\t\t\t\t\t\t\tpostReceive: [\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\ttype: 'setKeyValue',\n\t\t\t\t\t\t\t\t\t\tenabled: '={{ $parameter[\"simplify\"] }}',\n\t\t\t\t\t\t\t\t\t\tproperties: {\n\t\t\t\t\t\t\t\t\t\t\tcontent: '={{ $responseItem[\"choices\"][0][\"message\"][\"content\"] }}',\n\t\t\t\t\t\t\t\t\t\t\tannotations: '={{ $responseItem[\"choices\"][0][\"message\"][\"annotations\"] }}',\n\t\t\t\t\t\t\t\t\t\t\tusage: '={{ $responseItem[\"usage\"] }}',\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t\tdefault: 'deepResearch',\n\t\t\t},\n\t\t\t// Options for Reader\n\t\t\t{\n\t\t\t\tdisplayName: 'URL',\n\t\t\t\tname: 'url',\n\t\t\t\ttype: 'string',\n\t\t\t\trequired: true,\n\t\t\t\tdefault: '',\n\t\t\t\tplaceholder: 'https://jina.ai/',\n\t\t\t\tdescription: 'The URL to fetch content from',\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\tshow: {\n\t\t\t\t\t\tresource: ['reader'],\n\t\t\t\t\t\toperation: ['read'],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Simplify',\n\t\t\t\tname: 'simplify',\n\t\t\t\ttype: 'boolean',\n\t\t\t\tdefault: true,\n\t\t\t\tdescription:\n\t\t\t\t\t'Whether to return a simplified version of the response instead of the raw data',\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\tshow: {\n\t\t\t\t\t\tresource: ['reader'],\n\t\t\t\t\t\toperation: ['read'],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Options',\n\t\t\t\tname: 'options',\n\t\t\t\ttype: 'collection',\n\t\t\t\tplaceholder: 'Add Option',\n\t\t\t\tdefault: {},\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\tshow: {\n\t\t\t\t\t\tresource: ['reader'],\n\t\t\t\t\t\toperation: ['read'],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\toptions: [\n\t\t\t\t\t{\n\t\t\t\t\t\tdisplayName: 'Output Format',\n\t\t\t\t\t\tname: 'outputFormat',\n\t\t\t\t\t\tdescription: 'Specify desired output format',\n\t\t\t\t\t\ttype: 'options',\n\t\t\t\t\t\toptions: [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tname: 'HTML',\n\t\t\t\t\t\t\t\tvalue: 'html',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tname: 'JSON',\n\t\t\t\t\t\t\t\tvalue: '',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tname: 'Markdown',\n\t\t\t\t\t\t\t\tvalue: 'markdown',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tname: 'Screenshot',\n\t\t\t\t\t\t\t\tvalue: 'screenshot',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tname: 'Text',\n\t\t\t\t\t\t\t\tvalue: 'text',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t],\n\t\t\t\t\t\tdefault: '',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tdisplayName: 'Target CSS Selector',\n\t\t\t\t\t\tname: 'targetSelector',\n\t\t\t\t\t\ttype: 'string',\n\t\t\t\t\t\tdescription: 'CSS selector to focus on specific page elements',\n\t\t\t\t\t\tdefault: '',\n\t\t\t\t\t\tplaceholder: 'e.g. #main-content .article',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tdisplayName: 'Exclude CSS Selector',\n\t\t\t\t\t\tname: 'excludeSelector',\n\t\t\t\t\t\ttype: 'string',\n\t\t\t\t\t\tdescription: 'CSS selector for elements to exclude',\n\t\t\t\t\t\tdefault: '',\n\t\t\t\t\t\tplaceholder: 'e.g. header, footer, .ads',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tdisplayName: 'Enable Image Captioning',\n\t\t\t\t\t\tname: 'enableImageCaptioning',\n\t\t\t\t\t\ttype: 'boolean',\n\t\t\t\t\t\tdefault: false,\n\t\t\t\t\t\tdescription: 'Whether to generate captions for images within the content',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tdisplayName: 'Wait for CSS Selector',\n\t\t\t\t\t\tname: 'waitForSelector',\n\t\t\t\t\t\ttype: 'string',\n\t\t\t\t\t\tdescription:\n\t\t\t\t\t\t\t'Wait for a specific element to appear before extracting content (for dynamic pages)',\n\t\t\t\t\t\tdefault: '',\n\t\t\t\t\t\tplaceholder: 'e.g. #results-loaded',\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Search Query',\n\t\t\t\tname: 'searchQuery',\n\t\t\t\ttype: 'string',\n\t\t\t\trequired: true,\n\t\t\t\tdefault: '',\n\t\t\t\tplaceholder: 'e.g. Jina AI',\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\tshow: {\n\t\t\t\t\t\tresource: ['reader'],\n\t\t\t\t\t\toperation: ['search'],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Simplify',\n\t\t\t\tname: 'simplify',\n\t\t\t\ttype: 'boolean',\n\t\t\t\tdefault: true,\n\t\t\t\tdescription:\n\t\t\t\t\t'Whether to return a simplified version of the response instead of the raw data',\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\tshow: {\n\t\t\t\t\t\tresource: ['reader'],\n\t\t\t\t\t\toperation: ['search'],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Options',\n\t\t\t\tname: 'options',\n\t\t\t\ttype: 'collection',\n\t\t\t\tplaceholder: 'Add Option',\n\t\t\t\tdefault: {},\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\tshow: {\n\t\t\t\t\t\tresource: ['reader'],\n\t\t\t\t\t\toperation: ['search'],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\toptions: [\n\t\t\t\t\t{\n\t\t\t\t\t\tdisplayName: 'Output Format',\n\t\t\t\t\t\tname: 'outputFormat',\n\t\t\t\t\t\tdescription: 'Specify desired output format',\n\t\t\t\t\t\ttype: 'options',\n\t\t\t\t\t\toptions: [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tname: 'HTML',\n\t\t\t\t\t\t\t\tvalue: 'html',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tname: 'JSON',\n\t\t\t\t\t\t\t\tvalue: '',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tname: 'Markdown',\n\t\t\t\t\t\t\t\tvalue: 'markdown',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tname: 'Screenshot',\n\t\t\t\t\t\t\t\tvalue: 'screenshot',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tname: 'Text',\n\t\t\t\t\t\t\t\tvalue: 'text',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t],\n\t\t\t\t\t\tdefault: '',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tdisplayName: 'Site Filter',\n\t\t\t\t\t\tname: 'siteFilter',\n\t\t\t\t\t\ttype: 'string',\n\t\t\t\t\t\tdescription: 'Restrict search to specific websites',\n\t\t\t\t\t\tdefault: '',\n\t\t\t\t\t\tplaceholder: 'e.g. jina.ai, github.com',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tdisplayName: 'Page Number',\n\t\t\t\t\t\tname: 'pageNumber',\n\t\t\t\t\t\ttype: 'number',\n\t\t\t\t\t\ttypeOptions: {\n\t\t\t\t\t\t\tminValue: 1,\n\t\t\t\t\t\t\tnumberPrecision: 0,\n\t\t\t\t\t\t},\n\t\t\t\t\t\tdescription: 'The page number of the search results to retrieve',\n\t\t\t\t\t\tdefault: '',\n\t\t\t\t\t\tplaceholder: '1',\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t},\n\t\t\t// Options for Research\n\t\t\t{\n\t\t\t\tdisplayName: 'Research Query',\n\t\t\t\tname: 'researchQuery',\n\t\t\t\ttype: 'string',\n\t\t\t\trequired: true,\n\t\t\t\tdefault: '',\n\t\t\t\tdescription: 'The topic or question for the AI to research',\n\t\t\t\tplaceholder:\n\t\t\t\t\t'e.g. Analyze the impact of renewable energy sources on climate change mitigation',\n\t\t\t\ttypeOptions: {\n\t\t\t\t\trows: 2,\n\t\t\t\t},\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\tshow: {\n\t\t\t\t\t\tresource: ['research'],\n\t\t\t\t\t\toperation: ['deepResearch'],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Simplify',\n\t\t\t\tname: 'simplify',\n\t\t\t\ttype: 'boolean',\n\t\t\t\tdefault: true,\n\t\t\t\tdescription:\n\t\t\t\t\t'Whether to return a simplified version of the response instead of the raw data',\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\tshow: {\n\t\t\t\t\t\tresource: ['research'],\n\t\t\t\t\t\toperation: ['deepResearch'],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Options',\n\t\t\t\tname: 'options',\n\t\t\t\ttype: 'collection',\n\t\t\t\tplaceholder: 'Add Option',\n\t\t\t\tdefault: {},\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\tshow: {\n\t\t\t\t\t\tresource: ['research'],\n\t\t\t\t\t\toperation: ['deepResearch'],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\toptions: [\n\t\t\t\t\t{\n\t\t\t\t\t\tdisplayName: 'Max Returned Sources',\n\t\t\t\t\t\tname: 'maxReturnedSources',\n\t\t\t\t\t\tdescription: 'The maximum number of URLs to include in the final answer',\n\t\t\t\t\t\ttype: 'number',\n\t\t\t\t\t\ttypeOptions: {\n\t\t\t\t\t\t\tminValue: 1,\n\t\t\t\t\t\t\tnumberPrecision: 0,\n\t\t\t\t\t\t},\n\t\t\t\t\t\tdefault: '',\n\t\t\t\t\t\tplaceholder: 'e.g. 5',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tdisplayName: 'Prioritize Sources',\n\t\t\t\t\t\tname: 'prioritizeSources',\n\t\t\t\t\t\ttype: 'string',\n\t\t\t\t\t\tdescription: 'A list of domains that are given a higher priority for content retrieval',\n\t\t\t\t\t\tdefault: '',\n\t\t\t\t\t\tplaceholder: 'e.g. jina.ai, github.com',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tdisplayName: 'Exclude Sources',\n\t\t\t\t\t\tname: 'excludeSources',\n\t\t\t\t\t\ttype: 'string',\n\t\t\t\t\t\tdescription: 'A list of domains to be strictly excluded from content retrieval',\n\t\t\t\t\t\tdefault: '',\n\t\t\t\t\t\tplaceholder: 'e.g. jina.ai, github.com',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tdisplayName: 'Site Filter',\n\t\t\t\t\t\tname: 'siteFilter',\n\t\t\t\t\t\ttype: 'string',\n\t\t\t\t\t\tdescription: 'Restrict search to specific websites',\n\t\t\t\t\t\tdefault: '',\n\t\t\t\t\t\tplaceholder: 'e.g. jina.ai, github.com',\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t},\n\t\t],\n\t};\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,0BAA+E;AAExE,MAAM,OAA4B;AAAA,EAAlC;AACN,uBAAoC;AAAA,MACnC,aAAa;AAAA,MACb,MAAM;AAAA,MACN,MAAM;AAAA,QACL,OAAO;AAAA,QACP,MAAM;AAAA,MACP;AAAA,MACA,OAAO,CAAC,WAAW;AAAA,MACnB,SAAS;AAAA,MACT,UAAU;AAAA,MACV,aAAa;AAAA,MACb,UAAU;AAAA,QACT,MAAM;AAAA,MACP;AAAA,MACA,QAAQ,CAAC,wCAAoB,IAAI;AAAA,MACjC,SAAS,CAAC,wCAAoB,IAAI;AAAA,MAClC,cAAc;AAAA,MACd,aAAa;AAAA,QACZ;AAAA,UACC,MAAM;AAAA,UACN,UAAU;AAAA,QACX;AAAA,MACD;AAAA,MACA,iBAAiB;AAAA,QAChB,SAAS;AAAA,UACR,QAAQ;AAAA,QACT;AAAA,MACD;AAAA,MACA,YAAY;AAAA,QACX;AAAA,UACC,aAAa;AAAA,UACb,MAAM;AAAA,UACN,MAAM;AAAA,UACN,kBAAkB;AAAA,UAClB,SAAS;AAAA,YACR;AAAA,cACC,MAAM;AAAA,cACN,OAAO;AAAA,YACR;AAAA,YACA;AAAA,cACC,MAAM;AAAA,cACN,OAAO;AAAA,YACR;AA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YACd;AAAA,YACA;AAAA,cACC,aAAa;AAAA,cACb,MAAM;AAAA,cACN,MAAM;AAAA,cACN,aAAa;AAAA,cACb,SAAS;AAAA,cACT,aAAa;AAAA,YACd;AAAA,YACA;AAAA,cACC,aAAa;AAAA,cACb,MAAM;AAAA,cACN,MAAM;AAAA,cACN,aAAa;AAAA,cACb,SAAS;AAAA,cACT,aAAa;AAAA,YACd;AAAA,YACA;AAAA,cACC,aAAa;AAAA,cACb,MAAM;AAAA,cACN,MAAM;AAAA,cACN,aAAa;AAAA,cACb,SAAS;AAAA,cACT,aAAa;AAAA,YACd;AAAA,UACD;AAAA,QACD;AAAA,MACD;AAAA,IACD;AAAA;AACD;","names":[]}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var GenericFunctions_exports = {};
|
|
20
|
+
__export(GenericFunctions_exports, {
|
|
21
|
+
sendErrorPostReceive: () => sendErrorPostReceive
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(GenericFunctions_exports);
|
|
24
|
+
var import_n8n_workflow = require("n8n-workflow");
|
|
25
|
+
async function sendErrorPostReceive(data, response) {
|
|
26
|
+
if (String(response.statusCode).startsWith("4") || String(response.statusCode).startsWith("5")) {
|
|
27
|
+
const errorBody = response.body;
|
|
28
|
+
const error = errorBody?.error ?? {};
|
|
29
|
+
const errorMessage = typeof error.message === "string" ? error.message : response.statusMessage ?? "An unexpected issue occurred";
|
|
30
|
+
const errorType = typeof error.type === "string" ? error.type : "UnknownError";
|
|
31
|
+
const itemIndex = typeof error.itemIndex === "number" ? `[Item ${error.itemIndex}]` : "";
|
|
32
|
+
if (errorType === "invalid_model") {
|
|
33
|
+
throw new import_n8n_workflow.NodeApiError(this.getNode(), errorBody, {
|
|
34
|
+
message: "Invalid model",
|
|
35
|
+
description: "The model is not valid. Permitted models can be found in the documentation at https://docs.perplexity.ai/guides/model-cards."
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
throw new import_n8n_workflow.NodeApiError(this.getNode(), response, {
|
|
39
|
+
message: `${errorMessage}${itemIndex ? " " + itemIndex : ""}.`,
|
|
40
|
+
description: "Any optional system messages must be sent first, followed by alternating user and assistant messages. For more details, refer to the API documentation: https://docs.perplexity.ai/api-reference/chat-completions"
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
return data;
|
|
44
|
+
}
|
|
45
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
46
|
+
0 && (module.exports = {
|
|
47
|
+
sendErrorPostReceive
|
|
48
|
+
});
|
|
49
|
+
//# sourceMappingURL=GenericFunctions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../nodes/Perplexity/GenericFunctions.ts"],"sourcesContent":["import type {\n\tIExecuteSingleFunctions,\n\tIN8nHttpFullResponse,\n\tINodeExecutionData,\n\tJsonObject,\n} from 'n8n-workflow';\nimport { NodeApiError } from 'n8n-workflow';\n\nexport async function sendErrorPostReceive(\n\tthis: IExecuteSingleFunctions,\n\tdata: INodeExecutionData[],\n\tresponse: IN8nHttpFullResponse,\n): Promise<INodeExecutionData[]> {\n\tif (String(response.statusCode).startsWith('4') || String(response.statusCode).startsWith('5')) {\n\t\tconst errorBody = response.body as JsonObject;\n\t\tconst error = (errorBody?.error ?? {}) as JsonObject;\n\n\t\tconst errorMessage =\n\t\t\ttypeof error.message === 'string'\n\t\t\t\t? error.message\n\t\t\t\t: (response.statusMessage ?? 'An unexpected issue occurred');\n\t\tconst errorType = typeof error.type === 'string' ? error.type : 'UnknownError';\n\t\tconst itemIndex = typeof error.itemIndex === 'number' ? `[Item ${error.itemIndex}]` : '';\n\n\t\tif (errorType === 'invalid_model') {\n\t\t\tthrow new NodeApiError(this.getNode(), errorBody, {\n\t\t\t\tmessage: 'Invalid model',\n\t\t\t\tdescription:\n\t\t\t\t\t'The model is not valid. Permitted models can be found in the documentation at https://docs.perplexity.ai/guides/model-cards.',\n\t\t\t});\n\t\t}\n\n\t\t// Fallback for other errors\n\t\tthrow new NodeApiError(this.getNode(), response as unknown as JsonObject, {\n\t\t\tmessage: `${errorMessage}${itemIndex ? ' ' + itemIndex : ''}.`,\n\t\t\tdescription:\n\t\t\t\t'Any optional system messages must be sent first, followed by alternating user and assistant messages. For more details, refer to the API documentation: https://docs.perplexity.ai/api-reference/chat-completions',\n\t\t});\n\t}\n\treturn data;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAMA,0BAA6B;AAE7B,eAAsB,qBAErB,MACA,UACgC;AAChC,MAAI,OAAO,SAAS,UAAU,EAAE,WAAW,GAAG,KAAK,OAAO,SAAS,UAAU,EAAE,WAAW,GAAG,GAAG;AAC/F,UAAM,YAAY,SAAS;AAC3B,UAAM,QAAS,WAAW,SAAS,CAAC;AAEpC,UAAM,eACL,OAAO,MAAM,YAAY,WACtB,MAAM,UACL,SAAS,iBAAiB;AAC/B,UAAM,YAAY,OAAO,MAAM,SAAS,WAAW,MAAM,OAAO;AAChE,UAAM,YAAY,OAAO,MAAM,cAAc,WAAW,SAAS,MAAM,SAAS,MAAM;AAEtF,QAAI,cAAc,iBAAiB;AAClC,YAAM,IAAI,iCAAa,KAAK,QAAQ,GAAG,WAAW;AAAA,QACjD,SAAS;AAAA,QACT,aACC;AAAA,MACF,CAAC;AAAA,IACF;AAGA,UAAM,IAAI,iCAAa,KAAK,QAAQ,GAAG,UAAmC;AAAA,MACzE,SAAS,GAAG,YAAY,GAAG,YAAY,MAAM,YAAY,EAAE;AAAA,MAC3D,aACC;AAAA,IACF,CAAC;AAAA,EACF;AACA,SAAO;AACR;","names":[]}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var Perplexity_node_exports = {};
|
|
20
|
+
__export(Perplexity_node_exports, {
|
|
21
|
+
Perplexity: () => Perplexity
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(Perplexity_node_exports);
|
|
24
|
+
var import_n8n_workflow = require("n8n-workflow");
|
|
25
|
+
var import_descriptions = require("./descriptions");
|
|
26
|
+
class Perplexity {
|
|
27
|
+
constructor() {
|
|
28
|
+
this.description = {
|
|
29
|
+
displayName: "Perplexity",
|
|
30
|
+
name: "perplexity",
|
|
31
|
+
icon: {
|
|
32
|
+
light: "file:perplexity.svg",
|
|
33
|
+
dark: "file:perplexity.dark.svg"
|
|
34
|
+
},
|
|
35
|
+
group: ["transform"],
|
|
36
|
+
version: 1,
|
|
37
|
+
subtitle: '={{ $parameter["operation"] + ": " + $parameter["resource"] }}',
|
|
38
|
+
description: "Interact with the Perplexity API to generate AI responses with citations",
|
|
39
|
+
defaults: {
|
|
40
|
+
name: "Perplexity"
|
|
41
|
+
},
|
|
42
|
+
inputs: [import_n8n_workflow.NodeConnectionTypes.Main],
|
|
43
|
+
outputs: [import_n8n_workflow.NodeConnectionTypes.Main],
|
|
44
|
+
usableAsTool: true,
|
|
45
|
+
credentials: [
|
|
46
|
+
{
|
|
47
|
+
name: "perplexityApi",
|
|
48
|
+
required: true
|
|
49
|
+
}
|
|
50
|
+
],
|
|
51
|
+
requestDefaults: {
|
|
52
|
+
baseURL: "https://api.perplexity.ai",
|
|
53
|
+
ignoreHttpStatusErrors: true
|
|
54
|
+
},
|
|
55
|
+
properties: [
|
|
56
|
+
{
|
|
57
|
+
displayName: "Resource",
|
|
58
|
+
name: "resource",
|
|
59
|
+
type: "hidden",
|
|
60
|
+
noDataExpression: true,
|
|
61
|
+
options: [
|
|
62
|
+
{
|
|
63
|
+
name: "Chat",
|
|
64
|
+
value: "chat"
|
|
65
|
+
}
|
|
66
|
+
],
|
|
67
|
+
default: "chat"
|
|
68
|
+
},
|
|
69
|
+
...import_descriptions.chat.description
|
|
70
|
+
]
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
75
|
+
0 && (module.exports = {
|
|
76
|
+
Perplexity
|
|
77
|
+
});
|
|
78
|
+
//# sourceMappingURL=Perplexity.node.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../nodes/Perplexity/Perplexity.node.ts"],"sourcesContent":["import type { INodeType, INodeTypeDescription } from 'n8n-workflow';\nimport { NodeConnectionTypes } from 'n8n-workflow';\n\nimport { chat } from './descriptions';\n\nexport class Perplexity implements INodeType {\n\tdescription: INodeTypeDescription = {\n\t\tdisplayName: 'Perplexity',\n\t\tname: 'perplexity',\n\t\ticon: {\n\t\t\tlight: 'file:perplexity.svg',\n\t\t\tdark: 'file:perplexity.dark.svg',\n\t\t},\n\t\tgroup: ['transform'],\n\t\tversion: 1,\n\t\tsubtitle: '={{ $parameter[\"operation\"] + \": \" + $parameter[\"resource\"] }}',\n\t\tdescription: 'Interact with the Perplexity API to generate AI responses with citations',\n\t\tdefaults: {\n\t\t\tname: 'Perplexity',\n\t\t},\n\t\tinputs: [NodeConnectionTypes.Main],\n\t\toutputs: [NodeConnectionTypes.Main],\n\t\tusableAsTool: true,\n\t\tcredentials: [\n\t\t\t{\n\t\t\t\tname: 'perplexityApi',\n\t\t\t\trequired: true,\n\t\t\t},\n\t\t],\n\t\trequestDefaults: {\n\t\t\tbaseURL: 'https://api.perplexity.ai',\n\t\t\tignoreHttpStatusErrors: true,\n\t\t},\n\t\tproperties: [\n\t\t\t{\n\t\t\t\tdisplayName: 'Resource',\n\t\t\t\tname: 'resource',\n\t\t\t\ttype: 'hidden',\n\t\t\t\tnoDataExpression: true,\n\t\t\t\toptions: [\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'Chat',\n\t\t\t\t\t\tvalue: 'chat',\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t\tdefault: 'chat',\n\t\t\t},\n\t\t\t...chat.description,\n\t\t],\n\t};\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,0BAAoC;AAEpC,0BAAqB;AAEd,MAAM,WAAgC;AAAA,EAAtC;AACN,uBAAoC;AAAA,MACnC,aAAa;AAAA,MACb,MAAM;AAAA,MACN,MAAM;AAAA,QACL,OAAO;AAAA,QACP,MAAM;AAAA,MACP;AAAA,MACA,OAAO,CAAC,WAAW;AAAA,MACnB,SAAS;AAAA,MACT,UAAU;AAAA,MACV,aAAa;AAAA,MACb,UAAU;AAAA,QACT,MAAM;AAAA,MACP;AAAA,MACA,QAAQ,CAAC,wCAAoB,IAAI;AAAA,MACjC,SAAS,CAAC,wCAAoB,IAAI;AAAA,MAClC,cAAc;AAAA,MACd,aAAa;AAAA,QACZ;AAAA,UACC,MAAM;AAAA,UACN,UAAU;AAAA,QACX;AAAA,MACD;AAAA,MACA,iBAAiB;AAAA,QAChB,SAAS;AAAA,QACT,wBAAwB;AAAA,MACzB;AAAA,MACA,YAAY;AAAA,QACX;AAAA,UACC,aAAa;AAAA,UACb,MAAM;AAAA,UACN,MAAM;AAAA,UACN,kBAAkB;AAAA,UAClB,SAAS;AAAA,YACR;AAAA,cACC,MAAM;AAAA,cACN,OAAO;AAAA,YACR;AAAA,UACD;AAAA,UACA,SAAS;AAAA,QACV;AAAA,QACA,GAAG,yBAAK;AAAA,MACT;AAAA,IACD;AAAA;AACD;","names":[]}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"node": "n8n-nodes-base.perplexity",
|
|
3
|
+
"nodeVersion": "1.0",
|
|
4
|
+
"codexVersion": "1.0",
|
|
5
|
+
"categories": ["Utility"],
|
|
6
|
+
"resources": {
|
|
7
|
+
"credentialDocumentation": [
|
|
8
|
+
{
|
|
9
|
+
"url": "https://docs.n8n.io/integrations/builtin/credentials/perplexity/"
|
|
10
|
+
}
|
|
11
|
+
],
|
|
12
|
+
"primaryDocumentation": [
|
|
13
|
+
{
|
|
14
|
+
"url": "https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-langchain.perplexity/"
|
|
15
|
+
}
|
|
16
|
+
]
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var Chat_resource_exports = {};
|
|
30
|
+
__export(Chat_resource_exports, {
|
|
31
|
+
description: () => description
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(Chat_resource_exports);
|
|
34
|
+
var complete = __toESM(require("./complete.operation"));
|
|
35
|
+
var import_GenericFunctions = require("../../GenericFunctions");
|
|
36
|
+
const description = [
|
|
37
|
+
{
|
|
38
|
+
displayName: "Operation",
|
|
39
|
+
name: "operation",
|
|
40
|
+
type: "options",
|
|
41
|
+
noDataExpression: true,
|
|
42
|
+
displayOptions: {
|
|
43
|
+
show: {
|
|
44
|
+
resource: ["chat"]
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
options: [
|
|
48
|
+
{
|
|
49
|
+
name: "Message a Model",
|
|
50
|
+
value: "complete",
|
|
51
|
+
action: "Message a model",
|
|
52
|
+
description: "Create one or more completions for a given text",
|
|
53
|
+
routing: {
|
|
54
|
+
request: {
|
|
55
|
+
method: "POST",
|
|
56
|
+
url: "/chat/completions"
|
|
57
|
+
},
|
|
58
|
+
output: {
|
|
59
|
+
postReceive: [import_GenericFunctions.sendErrorPostReceive]
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
],
|
|
64
|
+
default: "complete"
|
|
65
|
+
},
|
|
66
|
+
...complete.description
|
|
67
|
+
];
|
|
68
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
69
|
+
0 && (module.exports = {
|
|
70
|
+
description
|
|
71
|
+
});
|
|
72
|
+
//# sourceMappingURL=Chat.resource.js.map
|