@inductiv/node-red-openai-api 1.7.0 → 1.7.2

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/README.md CHANGED
@@ -40,11 +40,10 @@ After installation, find your node in the **AI** palette category labeled "OpenA
40
40
  - **Configurable and Flexible**: Adapt to a wide range of project requirements, making it easy to integrate AI into your IoT solutions.
41
41
  - **Powerful Combinations**: Utilize Node-RED's diverse nodes to build complex, AI-driven IoT workflows with ease.
42
42
 
43
- ## Release Notes (v1.7.0)
43
+ ## Release Notes (v1.7.2)
44
44
 
45
- - Upgraded to OpenAI Node API Library package dependency [v4.77.0](https://www.npmjs.com/package/openai/v/4.77.0)
46
- - OpenAI [o1 and new tools](https://openai.com/index/o1-and-new-tools-for-developers/) for developers
47
- - [Preference Fine-tuning](https://platform.openai.com/docs/guides/fine-tuning#preference)
45
+ - **Ehancement**: Returning request `msg` object with error responses.
46
+ - **Chores**: Linting.
48
47
 
49
48
  ## What's New in Version 1.x
50
49
 
package/lib.js CHANGED
@@ -1,6 +1,3 @@
1
- const { response } = require("express");
2
- const { json } = require("stream/consumers");
3
-
4
1
  let OpenaiApi = (function () {
5
2
  "use strict";
6
3
 
package/node.js CHANGED
@@ -18,7 +18,7 @@ module.exports = function (RED) {
18
18
  let client = new lib.OpenaiApi(
19
19
  clientApiKey,
20
20
  clientApiBase,
21
- clientOrganization,
21
+ clientOrganization
22
22
  );
23
23
  let payload;
24
24
 
@@ -64,7 +64,7 @@ module.exports = function (RED) {
64
64
  text: "node-red:common.status.error",
65
65
  });
66
66
  let errorMessage = error.message;
67
- node.error(errorMessage, { payload: {} });
67
+ node.error(errorMessage, msg);
68
68
  });
69
69
  } else {
70
70
  console.error(`Function ${serviceName} does not exist on client.`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inductiv/node-red-openai-api",
3
- "version": "1.7.0",
3
+ "version": "1.7.2",
4
4
  "description": "Enhance your Node-RED projects with advanced AI capabilities.",
5
5
  "main": "node.js",
6
6
  "engines": {