@inductiv/node-red-openai-api 0.7.0 → 1.0.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/node.js CHANGED
@@ -11,7 +11,15 @@ module.exports = function (RED) {
11
11
  node.config = config;
12
12
 
13
13
  node.on("input", function (msg) {
14
- let client = new lib.OpenaiApi();
14
+ let clientApiKey = node.service.credentials.secureApiKeyValue || "";
15
+ let clientApiBase = node.service.apiBase;
16
+ let clientOrganization = node.service.organizationId;
17
+
18
+ let client = new lib.OpenaiApi(
19
+ clientApiKey,
20
+ clientApiBase,
21
+ clientOrganization,
22
+ );
15
23
  let payload;
16
24
 
17
25
  const propertyType = node.config.propertyType || "msg";
@@ -26,9 +34,6 @@ module.exports = function (RED) {
26
34
 
27
35
  const serviceName = node.config.method; // Set the service name to call.
28
36
  let serviceParametersObject = {
29
- organization: node.service.organizationId,
30
- apiBase: node.service.apiBase,
31
- apiKey: node.service.credentials.secureApiKeyValue || "",
32
37
  _node: node,
33
38
  msg: msg,
34
39
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@inductiv/node-red-openai-api",
3
- "version": "0.7.0",
4
- "description": "Go beyond ChatGPT and DALL·E 3: this Node-RED node seamlessly integrates a range of OpenAI services, including Assistants, Threads, Vision, and Audio, enabling feature-rich enhancement of your AI workflows with any OpenAI REST API-compatible solution.",
3
+ "version": "1.0.0",
4
+ "description": "Enhance your Node-RED flows with advanced AI capabilities. This package offers seamless integration with OpenAI's latest Assistants v2 API, including support for batch requests and vector store features, ensuring robust AIoT solutions with improved usability and stability.",
5
5
  "main": "node.js",
6
6
  "engines": {
7
7
  "node": ">=12.0.0"
@@ -13,21 +13,28 @@
13
13
  }
14
14
  },
15
15
  "keywords": [
16
- "openai",
17
- "api",
18
- "automation",
19
- "chatgpt",
20
- "llm",
21
- "slm",
22
- "agent",
23
- "automation",
24
- "node-red",
25
- "nodered",
26
- "low-code",
27
- "ai"
16
+ "Node-RED",
17
+ "AIoT",
18
+ "OpenAI",
19
+ "AI",
20
+ "OpenAI API",
21
+ "Assistants v2",
22
+ "batch requests",
23
+ "vector store",
24
+ "IoT",
25
+ "node-red-contrib",
26
+ "Automation",
27
+ "smart devices",
28
+ "node-red-node",
29
+ "artificial intelligence",
30
+ "API integration",
31
+ "LLM",
32
+ "SLM",
33
+ "AI Agent",
34
+ "Low-code"
28
35
  ],
29
36
  "dependencies": {
30
- "openai": "^4.26.1"
37
+ "openai": "^4.38.5"
31
38
  },
32
39
  "devDependencies": {
33
40
  "eslint": "^8.54.0",