@inductiv/node-red-openai-api 1.89.0 → 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.
Files changed (73) hide show
  1. package/README.md +11 -15
  2. package/examples/responses/mcp.json +87 -0
  3. package/gulpfile.js +15 -0
  4. package/lib.js +16375 -539
  5. package/locales/en-US/node.json +9 -0
  6. package/node.html +3037 -3839
  7. package/node.js +3 -2
  8. package/package.json +13 -2
  9. package/src/assistants/help.html +353 -0
  10. package/src/assistants/methods.js +47 -0
  11. package/src/assistants/template.html +38 -0
  12. package/src/audio/help.html +193 -0
  13. package/src/audio/methods.js +38 -0
  14. package/src/audio/template.html +14 -0
  15. package/src/batch/help.html +97 -0
  16. package/src/batch/methods.js +39 -0
  17. package/src/batch/template.html +19 -0
  18. package/src/chat/help.html +436 -0
  19. package/src/chat/methods.js +82 -0
  20. package/src/chat/template.html +30 -0
  21. package/src/container-files/help.html +144 -0
  22. package/src/container-files/methods.js +60 -0
  23. package/src/container-files/template.html +7 -0
  24. package/src/containers/help.html +96 -0
  25. package/src/containers/methods.js +34 -0
  26. package/src/containers/template.html +6 -0
  27. package/src/embeddings/help.html +57 -0
  28. package/src/embeddings/methods.js +12 -0
  29. package/src/embeddings/template.html +6 -0
  30. package/src/files/help.html +102 -0
  31. package/src/files/methods.js +52 -0
  32. package/src/files/template.html +22 -0
  33. package/src/fine-tuning/help.html +187 -0
  34. package/src/fine-tuning/methods.js +68 -0
  35. package/src/fine-tuning/template.html +26 -0
  36. package/src/images/help.html +208 -0
  37. package/src/images/methods.js +38 -0
  38. package/src/images/template.html +14 -0
  39. package/src/lib.js +58 -0
  40. package/src/messages/help.html +174 -0
  41. package/src/messages/methods.js +48 -0
  42. package/src/messages/template.html +18 -0
  43. package/src/models/help.html +47 -0
  44. package/src/models/methods.js +30 -0
  45. package/src/models/template.html +14 -0
  46. package/src/moderations/help.html +31 -0
  47. package/src/moderations/methods.js +11 -0
  48. package/src/moderations/template.html +6 -0
  49. package/src/node.html +250 -0
  50. package/src/responses/help.html +248 -0
  51. package/src/responses/methods.js +55 -0
  52. package/src/responses/template.html +22 -0
  53. package/src/runs/help.html +563 -0
  54. package/src/runs/methods.js +157 -0
  55. package/src/runs/template.html +35 -0
  56. package/src/threads/help.html +88 -0
  57. package/src/threads/methods.js +39 -0
  58. package/src/threads/template.html +18 -0
  59. package/src/uploads/help.html +116 -0
  60. package/src/uploads/methods.js +121 -0
  61. package/src/uploads/template.html +21 -0
  62. package/src/vector-store-file-batches/help.html +156 -0
  63. package/src/vector-store-file-batches/methods.js +84 -0
  64. package/src/vector-store-file-batches/template.html +22 -0
  65. package/src/vector-store-files/help.html +133 -0
  66. package/src/vector-store-files/methods.js +59 -0
  67. package/src/vector-store-files/template.html +18 -0
  68. package/src/vector-stores/help.html +162 -0
  69. package/src/vector-stores/methods.js +54 -0
  70. package/src/vector-stores/template.html +22 -0
  71. package/locales/de-DE/node.json +0 -144
  72. package/locales/ja/node.json +0 -144
  73. 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 IoT 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.
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,23 +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.89.0)
43
+ ## Release Notes (v1.103.0)
44
44
 
45
- - **Ehancements:**
46
- - Upgraded the OpenAI API Library dependency from [v4.87.3](https://github.com/openai/openai-node/releases/tag/v4.87.3) to [v4.89.0](https://github.com/openai/openai-node/releases/tag/v4.89.0)
47
- - **Features:**
48
- - New audio helpers
49
- - New API models for TTS, STT, + new audio features for Realtime
45
+ ### Ehancements
50
46
 
51
- ## What's New in Version 1.x
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)
52
48
 
53
- Version 1.0 of the **node-red-openai-api** node brings significant enhancements and new possibilities, including:
49
+ ### Notable Features & Changes
54
50
 
55
- - **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.
56
- - **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.
57
- - **New Functionalities**: Addition of new capabilities such as Batch requests and Vector Store features to enhance your projects.
58
- - **Updated Examples**: Updated [examples](./examples/) showcasing new API features and functionality.
59
- - **Bug Fixes**: Closed out a series of bugs improving overall usability and stability.
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.
60
56
 
61
57
  ### Important Notice Regarding Compatibility
62
58
 
@@ -114,7 +110,7 @@ I value community contributions that help enhance this Node-RED node and expand
114
110
 
115
111
  ## Community and Support
116
112
 
117
- 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, we're here to help and look forward to your feedback and contributions.
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.
118
114
 
119
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).
120
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
+ });