@n8n/n8n-nodes-langchain 1.76.0 → 1.77.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/build.tsbuildinfo +1 -1
- package/dist/credentials/DeepSeekApi.credentials.d.ts +9 -0
- package/dist/credentials/DeepSeekApi.credentials.js +42 -0
- package/dist/credentials/DeepSeekApi.credentials.js.map +1 -0
- package/dist/credentials/OpenRouterApi.credentials.d.ts +9 -0
- package/dist/credentials/OpenRouterApi.credentials.js +42 -0
- package/dist/credentials/OpenRouterApi.credentials.js.map +1 -0
- package/dist/known/credentials.json +14 -0
- package/dist/known/nodes.json +8 -0
- package/dist/nodes/agents/Agent/Agent.node.js +4 -0
- package/dist/nodes/agents/Agent/Agent.node.js.map +1 -1
- package/dist/nodes/llms/LMChatOpenAi/LmChatOpenAi.node.js +1 -1
- package/dist/nodes/llms/LmChatDeepSeek/LmChatDeepSeek.node.d.ts +5 -0
- package/dist/nodes/llms/LmChatDeepSeek/LmChatDeepSeek.node.js +222 -0
- package/dist/nodes/llms/LmChatDeepSeek/LmChatDeepSeek.node.js.map +1 -0
- package/dist/nodes/llms/LmChatDeepSeek/deepseek.svg +1 -0
- package/dist/nodes/llms/LmChatOpenRouter/LmChatOpenRouter.node.d.ts +5 -0
- package/dist/nodes/llms/LmChatOpenRouter/LmChatOpenRouter.node.js +222 -0
- package/dist/nodes/llms/LmChatOpenRouter/LmChatOpenRouter.node.js.map +1 -0
- package/dist/nodes/llms/LmChatOpenRouter/openrouter.dark.svg +1 -0
- package/dist/nodes/llms/LmChatOpenRouter/openrouter.svg +1 -0
- package/dist/nodes/tools/ToolWorkflow/v2/ToolWorkflowV2.node.d.ts +2 -4
- package/dist/nodes/tools/ToolWorkflow/v2/ToolWorkflowV2.node.js +2 -4
- package/dist/nodes/tools/ToolWorkflow/v2/ToolWorkflowV2.node.js.map +1 -1
- package/dist/nodes/tools/ToolWorkflow/v2/methods/index.d.ts +1 -0
- package/dist/nodes/tools/ToolWorkflow/v2/methods/index.js +38 -0
- package/dist/nodes/tools/ToolWorkflow/v2/methods/index.js.map +1 -0
- package/dist/nodes/tools/ToolWorkflow/v2/methods/localResourceMapping.d.ts +2 -0
- package/dist/nodes/tools/ToolWorkflow/v2/methods/localResourceMapping.js +23 -0
- package/dist/nodes/tools/ToolWorkflow/v2/methods/localResourceMapping.js.map +1 -0
- package/dist/nodes/tools/ToolWorkflow/v2/versionDescription.js +1 -1
- package/dist/nodes/tools/ToolWorkflow/v2/versionDescription.js.map +1 -1
- package/dist/nodes/vector_store/VectorStoreInMemory/VectorStoreInMemory.node.js.map +1 -1
- package/dist/nodes/vector_store/VectorStorePGVector/VectorStorePGVector.node.js +5 -1
- package/dist/nodes/vector_store/VectorStorePGVector/VectorStorePGVector.node.js.map +1 -1
- package/dist/nodes/vector_store/VectorStorePinecone/VectorStorePinecone.node.js.map +1 -1
- package/dist/nodes/vector_store/VectorStoreQdrant/VectorStoreQdrant.node.js.map +1 -1
- package/dist/nodes/vector_store/VectorStoreSupabase/VectorStoreSupabase.node.js.map +1 -1
- package/dist/nodes/vector_store/VectorStoreZep/VectorStoreZep.node.js.map +1 -1
- package/dist/nodes/vector_store/shared/createVectorStoreNode.d.ts +4 -3
- package/dist/nodes/vector_store/shared/createVectorStoreNode.js +58 -40
- package/dist/nodes/vector_store/shared/createVectorStoreNode.js.map +1 -1
- package/dist/types/credentials.json +2 -0
- package/dist/types/nodes.json +5 -3
- package/dist/types/types.d.ts +4 -0
- package/dist/types/types.js +2 -0
- package/dist/types/types.js.map +1 -0
- package/package.json +11 -7
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { IAuthenticateGeneric, ICredentialTestRequest, ICredentialType, INodeProperties } from 'n8n-workflow';
|
|
2
|
+
export declare class DeepSeekApi implements ICredentialType {
|
|
3
|
+
name: string;
|
|
4
|
+
displayName: string;
|
|
5
|
+
documentationUrl: string;
|
|
6
|
+
properties: INodeProperties[];
|
|
7
|
+
authenticate: IAuthenticateGeneric;
|
|
8
|
+
test: ICredentialTestRequest;
|
|
9
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DeepSeekApi = void 0;
|
|
4
|
+
class DeepSeekApi {
|
|
5
|
+
constructor() {
|
|
6
|
+
this.name = 'deepSeekApi';
|
|
7
|
+
this.displayName = 'DeepSeek';
|
|
8
|
+
this.documentationUrl = 'deepseek';
|
|
9
|
+
this.properties = [
|
|
10
|
+
{
|
|
11
|
+
displayName: 'API Key',
|
|
12
|
+
name: 'apiKey',
|
|
13
|
+
type: 'string',
|
|
14
|
+
typeOptions: { password: true },
|
|
15
|
+
required: true,
|
|
16
|
+
default: '',
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
displayName: 'Base URL',
|
|
20
|
+
name: 'url',
|
|
21
|
+
type: 'hidden',
|
|
22
|
+
default: 'https://api.deepseek.com',
|
|
23
|
+
},
|
|
24
|
+
];
|
|
25
|
+
this.authenticate = {
|
|
26
|
+
type: 'generic',
|
|
27
|
+
properties: {
|
|
28
|
+
headers: {
|
|
29
|
+
Authorization: '=Bearer {{$credentials.apiKey}}',
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
};
|
|
33
|
+
this.test = {
|
|
34
|
+
request: {
|
|
35
|
+
baseURL: '={{ $credentials.url }}',
|
|
36
|
+
url: '/models',
|
|
37
|
+
},
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
exports.DeepSeekApi = DeepSeekApi;
|
|
42
|
+
//# sourceMappingURL=DeepSeekApi.credentials.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DeepSeekApi.credentials.js","sourceRoot":"","sources":["../../credentials/DeepSeekApi.credentials.ts"],"names":[],"mappings":";;;AAOA,MAAa,WAAW;IAAxB;QACC,SAAI,GAAG,aAAa,CAAC;QAErB,gBAAW,GAAG,UAAU,CAAC;QAEzB,qBAAgB,GAAG,UAAU,CAAC;QAE9B,eAAU,GAAsB;YAC/B;gBACC,WAAW,EAAE,SAAS;gBACtB,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE;gBAC/B,QAAQ,EAAE,IAAI;gBACd,OAAO,EAAE,EAAE;aACX;YACD;gBACC,WAAW,EAAE,UAAU;gBACvB,IAAI,EAAE,KAAK;gBACX,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,0BAA0B;aACnC;SACD,CAAC;QAEF,iBAAY,GAAyB;YACpC,IAAI,EAAE,SAAS;YACf,UAAU,EAAE;gBACX,OAAO,EAAE;oBACR,aAAa,EAAE,iCAAiC;iBAChD;aACD;SACD,CAAC;QAEF,SAAI,GAA2B;YAC9B,OAAO,EAAE;gBACR,OAAO,EAAE,yBAAyB;gBAClC,GAAG,EAAE,SAAS;aACd;SACD,CAAC;IACH,CAAC;CAAA;AAvCD,kCAuCC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { IAuthenticateGeneric, ICredentialTestRequest, ICredentialType, INodeProperties } from 'n8n-workflow';
|
|
2
|
+
export declare class OpenRouterApi implements ICredentialType {
|
|
3
|
+
name: string;
|
|
4
|
+
displayName: string;
|
|
5
|
+
documentationUrl: string;
|
|
6
|
+
properties: INodeProperties[];
|
|
7
|
+
authenticate: IAuthenticateGeneric;
|
|
8
|
+
test: ICredentialTestRequest;
|
|
9
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.OpenRouterApi = void 0;
|
|
4
|
+
class OpenRouterApi {
|
|
5
|
+
constructor() {
|
|
6
|
+
this.name = 'openRouterApi';
|
|
7
|
+
this.displayName = 'OpenRouter';
|
|
8
|
+
this.documentationUrl = 'openrouter';
|
|
9
|
+
this.properties = [
|
|
10
|
+
{
|
|
11
|
+
displayName: 'API Key',
|
|
12
|
+
name: 'apiKey',
|
|
13
|
+
type: 'string',
|
|
14
|
+
typeOptions: { password: true },
|
|
15
|
+
required: true,
|
|
16
|
+
default: '',
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
displayName: 'Base URL',
|
|
20
|
+
name: 'url',
|
|
21
|
+
type: 'hidden',
|
|
22
|
+
default: 'https://openrouter.ai/api/v1',
|
|
23
|
+
},
|
|
24
|
+
];
|
|
25
|
+
this.authenticate = {
|
|
26
|
+
type: 'generic',
|
|
27
|
+
properties: {
|
|
28
|
+
headers: {
|
|
29
|
+
Authorization: '=Bearer {{$credentials.apiKey}}',
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
};
|
|
33
|
+
this.test = {
|
|
34
|
+
request: {
|
|
35
|
+
baseURL: '={{ $credentials.url }}',
|
|
36
|
+
url: '/models',
|
|
37
|
+
},
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
exports.OpenRouterApi = OpenRouterApi;
|
|
42
|
+
//# sourceMappingURL=OpenRouterApi.credentials.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OpenRouterApi.credentials.js","sourceRoot":"","sources":["../../credentials/OpenRouterApi.credentials.ts"],"names":[],"mappings":";;;AAOA,MAAa,aAAa;IAA1B;QACC,SAAI,GAAG,eAAe,CAAC;QAEvB,gBAAW,GAAG,YAAY,CAAC;QAE3B,qBAAgB,GAAG,YAAY,CAAC;QAEhC,eAAU,GAAsB;YAC/B;gBACC,WAAW,EAAE,SAAS;gBACtB,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE;gBAC/B,QAAQ,EAAE,IAAI;gBACd,OAAO,EAAE,EAAE;aACX;YACD;gBACC,WAAW,EAAE,UAAU;gBACvB,IAAI,EAAE,KAAK;gBACX,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,8BAA8B;aACvC;SACD,CAAC;QAEF,iBAAY,GAAyB;YACpC,IAAI,EAAE,SAAS;YACf,UAAU,EAAE;gBACX,OAAO,EAAE;oBACR,aAAa,EAAE,iCAAiC;iBAChD;aACD;SACD,CAAC;QAEF,SAAI,GAA2B;YAC9B,OAAO,EAAE;gBACR,OAAO,EAAE,yBAAyB;gBAClC,GAAG,EAAE,SAAS;aACd;SACD,CAAC;IACH,CAAC;CAAA;AAvCD,sCAuCC"}
|
|
@@ -22,6 +22,13 @@
|
|
|
22
22
|
"lmCohere"
|
|
23
23
|
]
|
|
24
24
|
},
|
|
25
|
+
"deepSeekApi": {
|
|
26
|
+
"className": "DeepSeekApi",
|
|
27
|
+
"sourcePath": "dist/credentials/DeepSeekApi.credentials.js",
|
|
28
|
+
"supportedNodes": [
|
|
29
|
+
"lmChatDeepSeek"
|
|
30
|
+
]
|
|
31
|
+
},
|
|
25
32
|
"googlePalmApi": {
|
|
26
33
|
"className": "GooglePalmApi",
|
|
27
34
|
"sourcePath": "dist/credentials/GooglePalmApi.credentials.js",
|
|
@@ -69,6 +76,13 @@
|
|
|
69
76
|
"lmOllama"
|
|
70
77
|
]
|
|
71
78
|
},
|
|
79
|
+
"openRouterApi": {
|
|
80
|
+
"className": "OpenRouterApi",
|
|
81
|
+
"sourcePath": "dist/credentials/OpenRouterApi.credentials.js",
|
|
82
|
+
"supportedNodes": [
|
|
83
|
+
"lmChatOpenRouter"
|
|
84
|
+
]
|
|
85
|
+
},
|
|
72
86
|
"pineconeApi": {
|
|
73
87
|
"className": "PineconeApi",
|
|
74
88
|
"sourcePath": "dist/credentials/PineconeApi.credentials.js",
|
package/dist/known/nodes.json
CHANGED
|
@@ -99,6 +99,10 @@
|
|
|
99
99
|
"className": "LmChatAwsBedrock",
|
|
100
100
|
"sourcePath": "dist/nodes/llms/LmChatAwsBedrock/LmChatAwsBedrock.node.js"
|
|
101
101
|
},
|
|
102
|
+
"lmChatDeepSeek": {
|
|
103
|
+
"className": "LmChatDeepSeek",
|
|
104
|
+
"sourcePath": "dist/nodes/llms/LmChatDeepSeek/LmChatDeepSeek.node.js"
|
|
105
|
+
},
|
|
102
106
|
"lmChatGoogleGemini": {
|
|
103
107
|
"className": "LmChatGoogleGemini",
|
|
104
108
|
"sourcePath": "dist/nodes/llms/LmChatGoogleGemini/LmChatGoogleGemini.node.js"
|
|
@@ -119,6 +123,10 @@
|
|
|
119
123
|
"className": "LmChatOllama",
|
|
120
124
|
"sourcePath": "dist/nodes/llms/LMChatOllama/LmChatOllama.node.js"
|
|
121
125
|
},
|
|
126
|
+
"lmChatOpenRouter": {
|
|
127
|
+
"className": "LmChatOpenRouter",
|
|
128
|
+
"sourcePath": "dist/nodes/llms/LmChatOpenRouter/LmChatOpenRouter.node.js"
|
|
129
|
+
},
|
|
122
130
|
"lmChatOpenAi": {
|
|
123
131
|
"className": "LmChatOpenAi",
|
|
124
132
|
"sourcePath": "dist/nodes/llms/LMChatOpenAi/LmChatOpenAi.node.js"
|
|
@@ -60,6 +60,8 @@ function getInputs(agent, hasOutputParser) {
|
|
|
60
60
|
'@n8n/n8n-nodes-langchain.lmChatGoogleVertex',
|
|
61
61
|
'@n8n/n8n-nodes-langchain.lmChatMistralCloud',
|
|
62
62
|
'@n8n/n8n-nodes-langchain.lmChatAzureOpenAi',
|
|
63
|
+
'@n8n/n8n-nodes-langchain.lmChatDeepSeek',
|
|
64
|
+
'@n8n/n8n-nodes-langchain.lmChatOpenRouter',
|
|
63
65
|
],
|
|
64
66
|
},
|
|
65
67
|
},
|
|
@@ -89,6 +91,8 @@ function getInputs(agent, hasOutputParser) {
|
|
|
89
91
|
'@n8n/n8n-nodes-langchain.lmChatGroq',
|
|
90
92
|
'@n8n/n8n-nodes-langchain.lmChatGoogleVertex',
|
|
91
93
|
'@n8n/n8n-nodes-langchain.lmChatGoogleGemini',
|
|
94
|
+
'@n8n/n8n-nodes-langchain.lmChatDeepSeek',
|
|
95
|
+
'@n8n/n8n-nodes-langchain.lmChatOpenRouter',
|
|
92
96
|
],
|
|
93
97
|
},
|
|
94
98
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Agent.node.js","sourceRoot":"","sources":["../../../../nodes/agents/Agent/Agent.node.ts"],"names":[],"mappings":";;;AAAA,+CAAsE;AAWtE,sDAAyF;AAEzF,0EAAyF;AACzF,kEAAkF;AAClF,2EAA2F;AAC3F,mEAAoF;AACpF,0EAAyF;AACzF,kEAAkF;AAClF,iEAA4E;AAC5E,yDAAqE;AACrE,+DAAwE;AACxE,uDAAiE;AACjE,iEAAuE;AACvE,yDAAgE;AAIhE,SAAS,SAAS,CACjB,KAAgG,EAChG,eAAyB;IAQzB,MAAM,YAAY,GAAG,CACpB,MAAsB,EACgC,EAAE;QACxD,MAAM,YAAY,GAA8B;YAC/C,oBAAoC,EAAE,OAAO;YAC7C,aAA6B,EAAE,QAAQ;YACvC,WAA2B,EAAE,MAAM;YACnC,mBAAmC,EAAE,eAAe;SACpD,CAAC;QAEF,OAAO,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE;YACtC,MAAM,WAAW,GAAG,IAAI,uBAAuC,CAAC;YAChE,IAAI,WAAW,GAAG,IAAI,IAAI,YAAY,CAAC,CAAC,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;YACxE,IACC,WAAW;gBACX,CAAC,sBAAsB,EAAE,YAAY,EAAE,qBAAqB,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,EAC5E,CAAC;gBACF,WAAW,GAAG,YAAY,CAAC;YAC5B,CAAC;YACD,MAAM,KAAK,GAA4B;gBACtC,IAAI;gBACJ,WAAW;gBACX,QAAQ,EAAE,WAAW;gBACrB,cAAc,EAAE,iCAAiE,CAAC,QAAQ,CACzF,IAA0B,CAC1B;oBACA,CAAC,CAAC,CAAC;oBACH,CAAC,C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sBAAsB,EAAE,CAAC;YACjD,OAAO,MAAM,qCAA2B,CAAC,IAAI,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC;QAClE,CAAC;aAAM,IAAI,SAAS,KAAK,YAAY,EAAE,CAAC;YACvC,OAAO,MAAM,gCAAsB,CAAC,IAAI,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC;QAC7D,CAAC;aAAM,IAAI,SAAS,KAAK,UAAU,EAAE,CAAC;YACrC,OAAO,MAAM,8BAAoB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC9C,CAAC;aAAM,IAAI,SAAS,KAAK,qBAAqB,EAAE,CAAC;YAChD,OAAO,MAAM,oCAA0B,CAAC,IAAI,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC;QACjE,CAAC;QAED,MAAM,IAAI,iCAAkB,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,mBAAmB,SAAS,oBAAoB,CAAC,CAAC;IAChG,CAAC;CACD;AA/LD,sBA+LC"}
|
|
@@ -237,7 +237,7 @@ class LmChatOpenAi {
|
|
|
237
237
|
displayName: 'Sampling Temperature',
|
|
238
238
|
name: 'temperature',
|
|
239
239
|
default: 0.7,
|
|
240
|
-
typeOptions: { maxValue:
|
|
240
|
+
typeOptions: { maxValue: 2, minValue: 0, numberPrecision: 1 },
|
|
241
241
|
description: 'Controls randomness: Lowering results in less random completions. As the temperature approaches zero, the model will become deterministic and repetitive.',
|
|
242
242
|
type: 'number',
|
|
243
243
|
},
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type INodeType, type INodeTypeDescription, type ISupplyDataFunctions, type SupplyData } from 'n8n-workflow';
|
|
2
|
+
export declare class LmChatDeepSeek implements INodeType {
|
|
3
|
+
description: INodeTypeDescription;
|
|
4
|
+
supplyData(this: ISupplyDataFunctions, itemIndex: number): Promise<SupplyData>;
|
|
5
|
+
}
|
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LmChatDeepSeek = void 0;
|
|
4
|
+
const openai_1 = require("@langchain/openai");
|
|
5
|
+
const sharedFields_1 = require("../../../utils/sharedFields");
|
|
6
|
+
const error_handling_1 = require("../../vendors/OpenAi/helpers/error-handling");
|
|
7
|
+
const n8nLlmFailedAttemptHandler_1 = require("../n8nLlmFailedAttemptHandler");
|
|
8
|
+
const N8nLlmTracing_1 = require("../N8nLlmTracing");
|
|
9
|
+
class LmChatDeepSeek {
|
|
10
|
+
constructor() {
|
|
11
|
+
this.description = {
|
|
12
|
+
displayName: 'DeepSeek Chat Model',
|
|
13
|
+
name: 'lmChatDeepSeek',
|
|
14
|
+
icon: 'file:deepseek.svg',
|
|
15
|
+
group: ['transform'],
|
|
16
|
+
version: [1],
|
|
17
|
+
description: 'For advanced usage with an AI chain',
|
|
18
|
+
defaults: {
|
|
19
|
+
name: 'DeepSeek Chat Model',
|
|
20
|
+
},
|
|
21
|
+
codex: {
|
|
22
|
+
categories: ['AI'],
|
|
23
|
+
subcategories: {
|
|
24
|
+
AI: ['Language Models', 'Root Nodes'],
|
|
25
|
+
'Language Models': ['Chat Models (Recommended)'],
|
|
26
|
+
},
|
|
27
|
+
resources: {
|
|
28
|
+
primaryDocumentation: [
|
|
29
|
+
{
|
|
30
|
+
url: 'https://docs.n8n.io/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.lmchatdeepseek/',
|
|
31
|
+
},
|
|
32
|
+
],
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
inputs: [],
|
|
36
|
+
outputs: ["ai_languageModel"],
|
|
37
|
+
outputNames: ['Model'],
|
|
38
|
+
credentials: [
|
|
39
|
+
{
|
|
40
|
+
name: 'deepSeekApi',
|
|
41
|
+
required: true,
|
|
42
|
+
},
|
|
43
|
+
],
|
|
44
|
+
requestDefaults: {
|
|
45
|
+
ignoreHttpStatusErrors: true,
|
|
46
|
+
baseURL: '={{ $credentials?.url }}',
|
|
47
|
+
},
|
|
48
|
+
properties: [
|
|
49
|
+
(0, sharedFields_1.getConnectionHintNoticeField)(["ai_chain", "ai_agent"]),
|
|
50
|
+
{
|
|
51
|
+
displayName: 'If using JSON response format, you must include word "json" in the prompt in your chain or agent. Also, make sure to select latest models released post November 2023.',
|
|
52
|
+
name: 'notice',
|
|
53
|
+
type: 'notice',
|
|
54
|
+
default: '',
|
|
55
|
+
displayOptions: {
|
|
56
|
+
show: {
|
|
57
|
+
'/options.responseFormat': ['json_object'],
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
displayName: 'Model',
|
|
63
|
+
name: 'model',
|
|
64
|
+
type: 'options',
|
|
65
|
+
description: 'The model which will generate the completion. <a href="https://api-docs.deepseek.com/quick_start/pricing">Learn more</a>.',
|
|
66
|
+
typeOptions: {
|
|
67
|
+
loadOptions: {
|
|
68
|
+
routing: {
|
|
69
|
+
request: {
|
|
70
|
+
method: 'GET',
|
|
71
|
+
url: '/models',
|
|
72
|
+
},
|
|
73
|
+
output: {
|
|
74
|
+
postReceive: [
|
|
75
|
+
{
|
|
76
|
+
type: 'rootProperty',
|
|
77
|
+
properties: {
|
|
78
|
+
property: 'data',
|
|
79
|
+
},
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
type: 'setKeyValue',
|
|
83
|
+
properties: {
|
|
84
|
+
name: '={{$responseItem.id}}',
|
|
85
|
+
value: '={{$responseItem.id}}',
|
|
86
|
+
},
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
type: 'sort',
|
|
90
|
+
properties: {
|
|
91
|
+
key: 'name',
|
|
92
|
+
},
|
|
93
|
+
},
|
|
94
|
+
],
|
|
95
|
+
},
|
|
96
|
+
},
|
|
97
|
+
},
|
|
98
|
+
},
|
|
99
|
+
routing: {
|
|
100
|
+
send: {
|
|
101
|
+
type: 'body',
|
|
102
|
+
property: 'model',
|
|
103
|
+
},
|
|
104
|
+
},
|
|
105
|
+
default: 'deepseek-chat',
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
displayName: 'Options',
|
|
109
|
+
name: 'options',
|
|
110
|
+
placeholder: 'Add Option',
|
|
111
|
+
description: 'Additional options to add',
|
|
112
|
+
type: 'collection',
|
|
113
|
+
default: {},
|
|
114
|
+
options: [
|
|
115
|
+
{
|
|
116
|
+
displayName: 'Frequency Penalty',
|
|
117
|
+
name: 'frequencyPenalty',
|
|
118
|
+
default: 0,
|
|
119
|
+
typeOptions: { maxValue: 2, minValue: -2, numberPrecision: 1 },
|
|
120
|
+
description: "Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim",
|
|
121
|
+
type: 'number',
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
displayName: 'Maximum Number of Tokens',
|
|
125
|
+
name: 'maxTokens',
|
|
126
|
+
default: -1,
|
|
127
|
+
description: 'The maximum number of tokens to generate in the completion. Most models have a context length of 2048 tokens (except for the newest models, which support 32,768).',
|
|
128
|
+
type: 'number',
|
|
129
|
+
typeOptions: {
|
|
130
|
+
maxValue: 32768,
|
|
131
|
+
},
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
displayName: 'Response Format',
|
|
135
|
+
name: 'responseFormat',
|
|
136
|
+
default: 'text',
|
|
137
|
+
type: 'options',
|
|
138
|
+
options: [
|
|
139
|
+
{
|
|
140
|
+
name: 'Text',
|
|
141
|
+
value: 'text',
|
|
142
|
+
description: 'Regular text response',
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
name: 'JSON',
|
|
146
|
+
value: 'json_object',
|
|
147
|
+
description: 'Enables JSON mode, which should guarantee the message the model generates is valid JSON',
|
|
148
|
+
},
|
|
149
|
+
],
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
displayName: 'Presence Penalty',
|
|
153
|
+
name: 'presencePenalty',
|
|
154
|
+
default: 0,
|
|
155
|
+
typeOptions: { maxValue: 2, minValue: -2, numberPrecision: 1 },
|
|
156
|
+
description: "Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics",
|
|
157
|
+
type: 'number',
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
displayName: 'Sampling Temperature',
|
|
161
|
+
name: 'temperature',
|
|
162
|
+
default: 0.7,
|
|
163
|
+
typeOptions: { maxValue: 2, minValue: 0, numberPrecision: 1 },
|
|
164
|
+
description: 'Controls randomness: Lowering results in less random completions. As the temperature approaches zero, the model will become deterministic and repetitive.',
|
|
165
|
+
type: 'number',
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
displayName: 'Timeout',
|
|
169
|
+
name: 'timeout',
|
|
170
|
+
default: 360000,
|
|
171
|
+
description: 'Maximum amount of time a request is allowed to take in milliseconds',
|
|
172
|
+
type: 'number',
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
displayName: 'Max Retries',
|
|
176
|
+
name: 'maxRetries',
|
|
177
|
+
default: 2,
|
|
178
|
+
description: 'Maximum number of retries to attempt',
|
|
179
|
+
type: 'number',
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
displayName: 'Top P',
|
|
183
|
+
name: 'topP',
|
|
184
|
+
default: 1,
|
|
185
|
+
typeOptions: { maxValue: 1, minValue: 0, numberPrecision: 1 },
|
|
186
|
+
description: 'Controls diversity via nucleus sampling: 0.5 means half of all likelihood-weighted options are considered. We generally recommend altering this or temperature but not both.',
|
|
187
|
+
type: 'number',
|
|
188
|
+
},
|
|
189
|
+
],
|
|
190
|
+
},
|
|
191
|
+
],
|
|
192
|
+
};
|
|
193
|
+
}
|
|
194
|
+
async supplyData(itemIndex) {
|
|
195
|
+
const credentials = await this.getCredentials('deepSeekApi');
|
|
196
|
+
const modelName = this.getNodeParameter('model', itemIndex);
|
|
197
|
+
const options = this.getNodeParameter('options', itemIndex, {});
|
|
198
|
+
const configuration = {
|
|
199
|
+
baseURL: credentials.url,
|
|
200
|
+
};
|
|
201
|
+
const model = new openai_1.ChatOpenAI({
|
|
202
|
+
openAIApiKey: credentials.apiKey,
|
|
203
|
+
modelName,
|
|
204
|
+
...options,
|
|
205
|
+
timeout: options.timeout ?? 60000,
|
|
206
|
+
maxRetries: options.maxRetries ?? 2,
|
|
207
|
+
configuration,
|
|
208
|
+
callbacks: [new N8nLlmTracing_1.N8nLlmTracing(this)],
|
|
209
|
+
modelKwargs: options.responseFormat
|
|
210
|
+
? {
|
|
211
|
+
response_format: { type: options.responseFormat },
|
|
212
|
+
}
|
|
213
|
+
: undefined,
|
|
214
|
+
onFailedAttempt: (0, n8nLlmFailedAttemptHandler_1.makeN8nLlmFailedAttemptHandler)(this, error_handling_1.openAiFailedAttemptHandler),
|
|
215
|
+
});
|
|
216
|
+
return {
|
|
217
|
+
response: model,
|
|
218
|
+
};
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
exports.LmChatDeepSeek = LmChatDeepSeek;
|
|
222
|
+
//# sourceMappingURL=LmChatDeepSeek.node.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LmChatDeepSeek.node.js","sourceRoot":"","sources":["../../../../nodes/llms/LmChatDeepSeek/LmChatDeepSeek.node.ts"],"names":[],"mappings":";;;AAEA,8CAAmE;AASnE,sDAAmE;AAEnE,gFAAyF;AACzF,8EAA+E;AAC/E,oDAAiD;AAEjD,MAAa,cAAc;IAA3B;QACC,gBAAW,GAAyB;YACnC,WAAW,EAAE,qBAAqB;YAElC,IAAI,EAAE,gBAAgB;YACtB,IAAI,EAAE,mBAAmB;YACzB,KAAK,EAAE,CAAC,WAAW,CAAC;YACpB,OAAO,EAAE,CAAC,CAAC,CAAC;YACZ,WAAW,EAAE,qCAAqC;YAClD,QAAQ,EAAE;gBACT,IAAI,EAAE,qBAAqB;aAC3B;YACD,KAAK,EAAE;gBACN,UAAU,EAAE,CAAC,IAAI,CAAC;gBAClB,aAAa,EAAE;oBACd,EAAE,EAAE,CAAC,iBAAiB,EAAE,YAAY,CAA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aAAa,GAAkB;YACpC,OAAO,EAAE,WAAW,CAAC,GAAG;SACxB,CAAC;QAEF,MAAM,KAAK,GAAG,IAAI,mBAAU,CAAC;YAC5B,YAAY,EAAE,WAAW,CAAC,MAAM;YAChC,SAAS;YACT,GAAG,OAAO;YACV,OAAO,EAAE,OAAO,CAAC,OAAO,IAAI,KAAK;YACjC,UAAU,EAAE,OAAO,CAAC,UAAU,IAAI,CAAC;YACnC,aAAa;YACb,SAAS,EAAE,CAAC,IAAI,6BAAa,CAAC,IAAI,CAAC,CAAC;YACpC,WAAW,EAAE,OAAO,CAAC,cAAc;gBAClC,CAAC,CAAC;oBACA,eAAe,EAAE,EAAE,IAAI,EAAE,OAAO,CAAC,cAAc,EAAE;iBACjD;gBACF,CAAC,CAAC,SAAS;YACZ,eAAe,EAAE,IAAA,2DAA8B,EAAC,IAAI,EAAE,2CAA0B,CAAC;SACjF,CAAC,CAAC;QAEH,OAAO;YACN,QAAQ,EAAE,KAAK;SACf,CAAC;IACH,CAAC;CACD;AA3OD,wCA2OC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg width="40" height="40" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>DeepSeek</title><path d="M23.748 4.482c-.254-.124-.364.113-.512.234-.051.039-.094.09-.137.136-.372.397-.806.657-1.373.626-.829-.046-1.537.214-2.163.848-.133-.782-.575-1.248-1.247-1.548-.352-.156-.708-.311-.955-.65-.172-.241-.219-.51-.305-.774-.055-.16-.11-.323-.293-.35-.2-.031-.278.136-.356.276-.313.572-.434 1.202-.422 1.84.027 1.436.633 2.58 1.838 3.393.137.093.172.187.129.323-.082.28-.18.552-.266.833-.055.179-.137.217-.329.14a5.526 5.526 0 01-1.736-1.18c-.857-.828-1.631-1.742-2.597-2.458a11.365 11.365 0 00-.689-.471c-.985-.957.13-1.743.388-1.836.27-.098.093-.432-.779-.428-.872.004-1.67.295-2.687.684a3.055 3.055 0 01-.465.137 9.597 9.597 0 00-2.883-.102c-1.885.21-3.39 1.102-4.497 2.623C.082 8.606-.231 10.684.152 12.85c.403 2.284 1.569 4.175 3.36 5.653 1.858 1.533 3.997 2.284 6.438 2.14 1.482-.085 3.133-.284 4.994-1.86.47.234.962.327 1.78.397.63.059 1.236-.03 1.705-.128.735-.156.684-.837.419-.961-2.155-1.004-1.682-.595-2.113-.926 1.096-1.296 2.746-2.642 3.392-7.003.05-.347.007-.565 0-.845-.004-.17.035-.237.23-.256a4.173 4.173 0 001.545-.475c1.396-.763 1.96-2.015 2.093-3.517.02-.23-.004-.467-.247-.588zM11.581 18c-2.089-1.642-3.102-2.183-3.52-2.16-.392.024-.321.471-.235.763.09.288.207.486.371.739.114.167.192.416-.113.603-.673.416-1.842-.14-1.897-.167-1.361-.802-2.5-1.86-3.301-3.307-.774-1.393-1.224-2.887-1.298-4.482-.02-.386.093-.522.477-.592a4.696 4.696 0 011.529-.039c2.132.312 3.946 1.265 5.468 2.774.868.86 1.525 1.887 2.202 2.891.72 1.066 1.494 2.082 2.48 2.914.348.292.625.514.891.677-.802.09-2.14.11-3.054-.614zm1-6.44a.306.306 0 01.415-.287.302.302 0 01.2.288.306.306 0 01-.31.307.303.303 0 01-.304-.308zm3.11 1.596c-.2.081-.399.151-.59.16a1.245 1.245 0 01-.798-.254c-.274-.23-.47-.358-.552-.758a1.73 1.73 0 01.016-.588c.07-.327-.008-.537-.239-.727-.187-.156-.426-.199-.688-.199a.559.559 0 01-.254-.078c-.11-.054-.2-.19-.114-.358.028-.054.16-.186.192-.21.356-.202.767-.136 1.146.016.352.144.618.408 1.001.782.391.451.462.576.685.914.176.265.336.537.445.848.067.195-.019.354-.25.452z" fill="#4D6BFE"></path></svg>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type INodeType, type INodeTypeDescription, type ISupplyDataFunctions, type SupplyData } from 'n8n-workflow';
|
|
2
|
+
export declare class LmChatOpenRouter implements INodeType {
|
|
3
|
+
description: INodeTypeDescription;
|
|
4
|
+
supplyData(this: ISupplyDataFunctions, itemIndex: number): Promise<SupplyData>;
|
|
5
|
+
}
|