@sateeshreddy/n8n-nodes-nvidia-nim 0.1.0 → 0.1.1

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.
@@ -1 +1 @@
1
- {"version":3,"file":"NvidiaNim.node.d.ts","sourceRoot":"","sources":["../../../nodes/NvidiaNim/NvidiaNim.node.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,SAAS,EACT,oBAAoB,EACpB,oBAAoB,EACpB,UAAU,EACb,MAAM,cAAc,CAAC;AAItB,qBAAa,SAAU,YAAW,SAAS;IACvC,WAAW,EAAE,oBAAoB,CAA2C;IAEtE,UAAU,CAAC,IAAI,EAAE,oBAAoB,GAAG,OAAO,CAAC,UAAU,CAAC;CAqBpE"}
1
+ {"version":3,"file":"NvidiaNim.node.d.ts","sourceRoot":"","sources":["../../../nodes/NvidiaNim/NvidiaNim.node.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,SAAS,EACT,oBAAoB,EACpB,oBAAoB,EACpB,UAAU,EAEV,MAAM,cAAc,CAAC;AAItB,qBAAa,SAAU,YAAW,SAAS;IAC1C,WAAW,EAAE,oBAAoB,CAA2C;IAEtE,UAAU,CAAC,IAAI,EAAE,oBAAoB,GAAG,OAAO,CAAC,UAAU,CAAC;CA8BjE"}
@@ -4,6 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.NvidiaNim = void 0;
7
+ const n8n_workflow_1 = require("n8n-workflow");
7
8
  const openai_1 = require("@langchain/openai");
8
9
  const NvidiaNim_node_json_1 = __importDefault(require("./NvidiaNim.node.json"));
9
10
  class NvidiaNim {
@@ -11,23 +12,33 @@ class NvidiaNim {
11
12
  this.description = NvidiaNim_node_json_1.default;
12
13
  }
13
14
  async supplyData() {
14
- const credentials = await this.getCredentials('nvidiaNimApi');
15
- const model = this.getNodeParameter('model', 0);
16
- const temperature = this.getNodeParameter('temperature', 0);
17
- const maxTokens = this.getNodeParameter('maxTokens', 0);
18
- const apiKey = credentials.apiKey;
19
- const chatModel = new openai_1.ChatOpenAI({
20
- apiKey,
21
- modelName: model,
22
- temperature,
23
- maxTokens,
24
- configuration: {
25
- baseURL: 'https://integrate.api.nvidia.com/v1',
26
- },
27
- });
28
- return {
29
- response: chatModel,
30
- };
15
+ try {
16
+ const credentials = await this.getCredentials('nvidiaNimApi');
17
+ const model = this.getNodeParameter('model', 0);
18
+ const temperature = this.getNodeParameter('temperature', 0);
19
+ const maxTokens = this.getNodeParameter('maxTokens', 0);
20
+ const apiKey = credentials.apiKey;
21
+ const chatModel = new openai_1.ChatOpenAI({
22
+ apiKey,
23
+ modelName: model,
24
+ temperature,
25
+ maxTokens,
26
+ configuration: {
27
+ baseURL: 'https://integrate.api.nvidia.com/v1',
28
+ },
29
+ });
30
+ return {
31
+ response: chatModel,
32
+ // Required: tells n8n the node has finished supplying data,
33
+ // which triggers the routing light animation to complete correctly.
34
+ closeFunction: async () => { },
35
+ };
36
+ }
37
+ catch (error) {
38
+ // Re-throwing as NodeOperationError lets n8n properly
39
+ // update the node's visual status to "error" in the UI.
40
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), error);
41
+ }
31
42
  }
32
43
  }
33
44
  exports.NvidiaNim = NvidiaNim;
@@ -1 +1 @@
1
- {"version":3,"file":"NvidiaNim.node.js","sourceRoot":"","sources":["../../../nodes/NvidiaNim/NvidiaNim.node.ts"],"names":[],"mappings":";;;;;;AAMA,8CAA+C;AAC/C,gFAAoD;AAEpD,MAAa,SAAS;IAAtB;QACI,gBAAW,GAAyB,6BAAuC,CAAC;IAuBhF,CAAC;IArBG,KAAK,CAAC,UAAU;QACZ,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC,cAAc,CAAC,cAAc,CAAC,CAAC;QAC9D,MAAM,KAAK,GAAG,IAAI,CAAC,gBAAgB,CAAC,OAAO,EAAE,CAAC,CAAW,CAAC;QAC1D,MAAM,WAAW,GAAG,I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CAAC,CAAC;YAEH,OAAO;gBACN,QAAQ,EAAE,SAAS;gBACnB,4DAA4D;gBAC5D,oEAAoE;gBACpE,aAAa,EAAE,KAAK,IAAI,EAAE,GAAE,CAAC;aAC7B,CAAC;QACH,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YAChB,sDAAsD;YACtD,wDAAwD;YACxD,MAAM,IAAI,iCAAkB,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,KAAc,CAAC,CAAC;QAC9D,CAAC;IACF,CAAC;CACD;AAjCD,8BAiCC"}
@@ -9,8 +9,12 @@
9
9
  "name": "NVIDIA NIM"
10
10
  },
11
11
  "inputs": [],
12
+ "inputNames": [],
12
13
  "outputs": ["ai_languageModel"],
13
14
  "outputNames": ["Model"],
15
+ "outputConnectionTypes": {
16
+ "ai_languageModel": [{ "type": "ai_languageModel" }]
17
+ },
14
18
  "codex": {
15
19
  "categories": ["AI"],
16
20
  "subcategories": {
@@ -31,8 +35,6 @@
31
35
  "name": "model",
32
36
  "type": "options",
33
37
  "options": [
34
- { "name": "GLM-4.7 (Tool Calling)", "value": "thudm/glm-4.7" },
35
- { "name": "MiniMax M2.7", "value": "minimax/minimax-m2.7" },
36
38
  { "name": "Step 3.5 Flash (Agentic)", "value": "stepfun-ai/step-3.5-flash" },
37
39
  { "name": "Mistral Large 3 675B Instruct", "value": "mistralai/mistral-large-3-675b-instruct-2512" },
38
40
  { "name": "Seed OSS 36B Instruct (Agentic)", "value": "bytedance/seed-oss-36b-instruct" },
@@ -9,8 +9,12 @@
9
9
  "name": "NVIDIA NIM"
10
10
  },
11
11
  "inputs": [],
12
+ "inputNames": [],
12
13
  "outputs": ["ai_languageModel"],
13
14
  "outputNames": ["Model"],
15
+ "outputConnectionTypes": {
16
+ "ai_languageModel": [{ "type": "ai_languageModel" }]
17
+ },
14
18
  "codex": {
15
19
  "categories": ["AI"],
16
20
  "subcategories": {
@@ -31,8 +35,6 @@
31
35
  "name": "model",
32
36
  "type": "options",
33
37
  "options": [
34
- { "name": "GLM-4.7 (Tool Calling)", "value": "thudm/glm-4.7" },
35
- { "name": "MiniMax M2.7", "value": "minimax/minimax-m2.7" },
36
38
  { "name": "Step 3.5 Flash (Agentic)", "value": "stepfun-ai/step-3.5-flash" },
37
39
  { "name": "Mistral Large 3 675B Instruct", "value": "mistralai/mistral-large-3-675b-instruct-2512" },
38
40
  { "name": "Seed OSS 36B Instruct (Agentic)", "value": "bytedance/seed-oss-36b-instruct" },
@@ -1,34 +1,44 @@
1
1
  import {
2
- INodeType,
3
- INodeTypeDescription,
4
- ISupplyDataFunctions,
5
- SupplyData,
2
+ INodeType,
3
+ INodeTypeDescription,
4
+ ISupplyDataFunctions,
5
+ SupplyData,
6
+ NodeOperationError,
6
7
  } from 'n8n-workflow';
7
8
  import { ChatOpenAI } from '@langchain/openai';
8
9
  import nodeDescription from './NvidiaNim.node.json';
9
10
 
10
11
  export class NvidiaNim implements INodeType {
11
- description: INodeTypeDescription = nodeDescription as INodeTypeDescription;
12
+ description: INodeTypeDescription = nodeDescription as INodeTypeDescription;
12
13
 
13
- async supplyData(this: ISupplyDataFunctions): Promise<SupplyData> {
14
- const credentials = await this.getCredentials('nvidiaNimApi');
15
- const model = this.getNodeParameter('model', 0) as string;
16
- const temperature = this.getNodeParameter('temperature', 0) as number;
17
- const maxTokens = this.getNodeParameter('maxTokens', 0) as number;
18
- const apiKey = credentials.apiKey as string;
14
+ async supplyData(this: ISupplyDataFunctions): Promise<SupplyData> {
15
+ try {
16
+ const credentials = await this.getCredentials('nvidiaNimApi');
17
+ const model = this.getNodeParameter('model', 0) as string;
18
+ const temperature = this.getNodeParameter('temperature', 0) as number;
19
+ const maxTokens = this.getNodeParameter('maxTokens', 0) as number;
20
+ const apiKey = credentials.apiKey as string;
19
21
 
20
- const chatModel = new ChatOpenAI({
21
- apiKey,
22
- modelName: model,
23
- temperature,
24
- maxTokens,
25
- configuration: {
26
- baseURL: 'https://integrate.api.nvidia.com/v1',
27
- },
28
- });
22
+ const chatModel = new ChatOpenAI({
23
+ apiKey,
24
+ modelName: model,
25
+ temperature,
26
+ maxTokens,
27
+ configuration: {
28
+ baseURL: 'https://integrate.api.nvidia.com/v1',
29
+ },
30
+ });
29
31
 
30
- return {
31
- response: chatModel,
32
- };
33
- }
32
+ return {
33
+ response: chatModel,
34
+ // Required: tells n8n the node has finished supplying data,
35
+ // which triggers the routing light animation to complete correctly.
36
+ closeFunction: async () => {},
37
+ };
38
+ } catch (error) {
39
+ // Re-throwing as NodeOperationError lets n8n properly
40
+ // update the node's visual status to "error" in the UI.
41
+ throw new NodeOperationError(this.getNode(), error as Error);
42
+ }
43
+ }
34
44
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sateeshreddy/n8n-nodes-nvidia-nim",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "n8n community node for NVIDIA NIM",
5
5
  "main": "dist/nodes/NvidiaNim/NvidiaNim.node.js",
6
6
  "scripts": {