@inductiv/node-red-openai-api 1.87.3 → 1.103.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/README.md +15 -40
- package/examples/responses/mcp.json +87 -0
- package/gulpfile.js +15 -0
- package/lib.js +16375 -539
- package/locales/en-US/node.json +9 -0
- package/node.html +3037 -3823
- package/node.js +3 -2
- package/package.json +13 -2
- package/src/assistants/help.html +353 -0
- package/src/assistants/methods.js +47 -0
- package/src/assistants/template.html +38 -0
- package/src/audio/help.html +193 -0
- package/src/audio/methods.js +38 -0
- package/src/audio/template.html +14 -0
- package/src/batch/help.html +97 -0
- package/src/batch/methods.js +39 -0
- package/src/batch/template.html +19 -0
- package/src/chat/help.html +436 -0
- package/src/chat/methods.js +82 -0
- package/src/chat/template.html +30 -0
- package/src/container-files/help.html +144 -0
- package/src/container-files/methods.js +60 -0
- package/src/container-files/template.html +7 -0
- package/src/containers/help.html +96 -0
- package/src/containers/methods.js +34 -0
- package/src/containers/template.html +6 -0
- package/src/embeddings/help.html +57 -0
- package/src/embeddings/methods.js +12 -0
- package/src/embeddings/template.html +6 -0
- package/src/files/help.html +102 -0
- package/src/files/methods.js +52 -0
- package/src/files/template.html +22 -0
- package/src/fine-tuning/help.html +187 -0
- package/src/fine-tuning/methods.js +68 -0
- package/src/fine-tuning/template.html +26 -0
- package/src/images/help.html +208 -0
- package/src/images/methods.js +38 -0
- package/src/images/template.html +14 -0
- package/src/lib.js +58 -0
- package/src/messages/help.html +174 -0
- package/src/messages/methods.js +48 -0
- package/src/messages/template.html +18 -0
- package/src/models/help.html +47 -0
- package/src/models/methods.js +30 -0
- package/src/models/template.html +14 -0
- package/src/moderations/help.html +31 -0
- package/src/moderations/methods.js +11 -0
- package/src/moderations/template.html +6 -0
- package/src/node.html +250 -0
- package/src/responses/help.html +248 -0
- package/src/responses/methods.js +55 -0
- package/src/responses/template.html +22 -0
- package/src/runs/help.html +563 -0
- package/src/runs/methods.js +157 -0
- package/src/runs/template.html +35 -0
- package/src/threads/help.html +88 -0
- package/src/threads/methods.js +39 -0
- package/src/threads/template.html +18 -0
- package/src/uploads/help.html +116 -0
- package/src/uploads/methods.js +121 -0
- package/src/uploads/template.html +21 -0
- package/src/vector-store-file-batches/help.html +156 -0
- package/src/vector-store-file-batches/methods.js +84 -0
- package/src/vector-store-file-batches/template.html +22 -0
- package/src/vector-store-files/help.html +133 -0
- package/src/vector-store-files/methods.js +59 -0
- package/src/vector-store-files/template.html +18 -0
- package/src/vector-stores/help.html +162 -0
- package/src/vector-stores/methods.js +54 -0
- package/src/vector-stores/template.html +22 -0
- package/locales/de-DE/node.json +0 -144
- package/locales/ja/node.json +0 -144
- package/locales/zh-CN/node.json +0 -144
package/README.md
CHANGED
|
@@ -9,7 +9,7 @@ This library provides convenient access to the OpenAI Node API Library from Node
|
|
|
9
9
|
</a>
|
|
10
10
|
<br>
|
|
11
11
|
|
|
12
|
-
Node-RED OpenAI API is a versatile and configurable Node-RED node designed for seamless integration with any OpenAI API compatible platform. This node empowers innovators and developers to effortlessly connect and orchestrate complex AI and
|
|
12
|
+
Node-RED OpenAI API is a versatile and configurable Node-RED node designed for seamless integration with any OpenAI API compatible platform. This node empowers innovators and developers to effortlessly connect and orchestrate complex AI and AIoT workflows, leveraging Node-RED's sophisticated ecosystem. Ideal for enhancing IoT operations with advanced AI capabilities, this node serves as your gateway to applying the latest AI technology in an IoT context, facilitating innovative applications across diverse environments.
|
|
13
13
|
|
|
14
14
|
## Installation
|
|
15
15
|
|
|
@@ -40,44 +40,19 @@ 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.
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
}
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
- 🔥 Native agentic computer use capabilities.
|
|
60
|
-
- 🔥 Reasoning model control properties:
|
|
61
|
-
|
|
62
|
-
```javascript
|
|
63
|
-
msg.payload = {
|
|
64
|
-
"model": "o3-mini",
|
|
65
|
-
"input": "How much wood would a woodchuck chuck?",
|
|
66
|
-
"reasoning": {
|
|
67
|
-
"effort": "high"
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
## What's New in Version 1.x
|
|
73
|
-
|
|
74
|
-
Version 1.0 of the **node-red-openai-api** node brings significant enhancements and new possibilities, including:
|
|
75
|
-
|
|
76
|
-
- **API Upgrade to OpenAI Assistants v2**: Transition to the new Assistants v2 API version with extended features. This upgrade leverages the updated OpenAI NodeJS package, which supports newer models and capabilities, enhancing AIoT applications.
|
|
77
|
-
- **Response Object Parity**: Updated response objects to closely align with the OpenAI documented response object structures, ensuring that your integration can seamlessly handle newer data formats.
|
|
78
|
-
- **New Functionalities**: Addition of new capabilities such as Batch requests and Vector Store features to enhance your projects.
|
|
79
|
-
- **Updated Examples**: Updated [examples](./examples/) showcasing new API features and functionality.
|
|
80
|
-
- **Bug Fixes**: Closed out a series of bugs improving overall usability and stability.
|
|
43
|
+
## Release Notes (v1.103.0)
|
|
44
|
+
|
|
45
|
+
### Ehancements
|
|
46
|
+
|
|
47
|
+
- Upgraded the OpenAI API Library dependency from [v4.89.0](https://github.com/openai/openai-node/releases/tag/v4.89.0) to [v4.103.0](https://github.com/openai/openai-node/releases/tag/v4.103.0)
|
|
48
|
+
|
|
49
|
+
### Notable Features & Changes
|
|
50
|
+
|
|
51
|
+
- Full Model Context Protocol (MCP) tool support for the `responses` API.
|
|
52
|
+
- Added support for the new `container` endpoint.
|
|
53
|
+
- Added support for the new `containerFiles` endpoint.
|
|
54
|
+
- Added a simple MCP tool use example flow to the `examples` directory. See: [MCP Example](./examples/responses/mcp.json).
|
|
55
|
+
- Refactored code to greatly improve maintainability and stability.
|
|
81
56
|
|
|
82
57
|
### Important Notice Regarding Compatibility
|
|
83
58
|
|
|
@@ -135,7 +110,7 @@ I value community contributions that help enhance this Node-RED node and expand
|
|
|
135
110
|
|
|
136
111
|
## Community and Support
|
|
137
112
|
|
|
138
|
-
Engage with the Node-RED OpenAI API community to share your experiences, get support, and discuss your ideas. Whether you're using the node or contributing to its development,
|
|
113
|
+
Engage with the Node-RED OpenAI API community to share your experiences, get support, and discuss your ideas. Whether you're using the node or contributing to its development, I'm here to help and look forward to your feedback and contributions.
|
|
139
114
|
|
|
140
115
|
- **Community Discussions**: For any questions, help with setting up, or to connect with other users and contributors, please visit our [Community Discussions](https://github.com/allanbunch/node-red-openai-api/discussions).
|
|
141
116
|
- **Feedback and Issues**: If you encounter any issues or have suggestions, please [raise an issue](https://github.com/allanbunch/node-red-openai-api/issues) directly on GitHub.
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"id": "17cb2307d706499e",
|
|
4
|
+
"type": "tab",
|
|
5
|
+
"label": "MCP Example",
|
|
6
|
+
"disabled": false,
|
|
7
|
+
"info": "",
|
|
8
|
+
"env": []
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
"id": "4fd4d16e54babf47",
|
|
12
|
+
"type": "OpenAI API",
|
|
13
|
+
"z": "17cb2307d706499e",
|
|
14
|
+
"name": "MCP Request",
|
|
15
|
+
"property": "ai",
|
|
16
|
+
"propertyType": "msg",
|
|
17
|
+
"service": "6bf3be50f1f3a262",
|
|
18
|
+
"method": "createModelResponse",
|
|
19
|
+
"x": 520,
|
|
20
|
+
"y": 240,
|
|
21
|
+
"wires": [
|
|
22
|
+
[
|
|
23
|
+
"177b298ed2530a7c"
|
|
24
|
+
]
|
|
25
|
+
]
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"id": "177b298ed2530a7c",
|
|
29
|
+
"type": "debug",
|
|
30
|
+
"z": "17cb2307d706499e",
|
|
31
|
+
"name": "MCP Response",
|
|
32
|
+
"active": true,
|
|
33
|
+
"tosidebar": true,
|
|
34
|
+
"console": false,
|
|
35
|
+
"tostatus": false,
|
|
36
|
+
"complete": "true",
|
|
37
|
+
"targetType": "full",
|
|
38
|
+
"statusVal": "",
|
|
39
|
+
"statusType": "auto",
|
|
40
|
+
"x": 720,
|
|
41
|
+
"y": 240,
|
|
42
|
+
"wires": []
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"id": "a83a50a436ac4f39",
|
|
46
|
+
"type": "inject",
|
|
47
|
+
"z": "17cb2307d706499e",
|
|
48
|
+
"name": "Request Params",
|
|
49
|
+
"props": [
|
|
50
|
+
{
|
|
51
|
+
"p": "ai.model",
|
|
52
|
+
"v": "gpt-4o-mini",
|
|
53
|
+
"vt": "str"
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"p": "ai.tools[0]",
|
|
57
|
+
"v": "{\"type\":\"mcp\",\"server_label\":\"deepwiki\",\"server_url\":\"https://mcp.deepwiki.com/mcp\",\"require_approval\":\"never\"}",
|
|
58
|
+
"vt": "json"
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"p": "ai.input",
|
|
62
|
+
"v": "What transport protocols are supported in the 2025-03-26 version of the MCP spec?",
|
|
63
|
+
"vt": "str"
|
|
64
|
+
}
|
|
65
|
+
],
|
|
66
|
+
"repeat": "",
|
|
67
|
+
"crontab": "",
|
|
68
|
+
"once": false,
|
|
69
|
+
"onceDelay": 0.1,
|
|
70
|
+
"topic": "",
|
|
71
|
+
"x": 320,
|
|
72
|
+
"y": 240,
|
|
73
|
+
"wires": [
|
|
74
|
+
[
|
|
75
|
+
"4fd4d16e54babf47"
|
|
76
|
+
]
|
|
77
|
+
]
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"id": "6bf3be50f1f3a262",
|
|
81
|
+
"type": "Service Host",
|
|
82
|
+
"apiBase": "https://api.openai.com/v1",
|
|
83
|
+
"secureApiKeyHeaderOrQueryName": "Authorization",
|
|
84
|
+
"organizationId": "",
|
|
85
|
+
"name": "OpenAI Auth"
|
|
86
|
+
}
|
|
87
|
+
]
|
package/gulpfile.js
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// gulpfile.js
|
|
2
|
+
const gulp = require("gulp");
|
|
3
|
+
const fileInclude = require("gulp-file-include");
|
|
4
|
+
|
|
5
|
+
gulp.task("build-html", () => {
|
|
6
|
+
return gulp
|
|
7
|
+
.src("src/node.html")
|
|
8
|
+
.pipe(
|
|
9
|
+
fileInclude({
|
|
10
|
+
prefix: "@@",
|
|
11
|
+
basepath: "@file",
|
|
12
|
+
})
|
|
13
|
+
)
|
|
14
|
+
.pipe(gulp.dest("./")); // Output node.html to project root
|
|
15
|
+
});
|