@inductiv/node-red-openai-api 0.8.0 → 1.0.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.
- package/README.md +50 -62
- package/examples/assistants.json +156 -189
- package/examples/chat.json +5 -3
- package/examples/embeddings.json +9 -2
- package/examples/fine-tuning.json +3 -1
- package/examples/messages.json +4 -2
- package/examples/models.json +3 -1
- package/examples/threads.json +3 -1
- package/lib.js +362 -333
- package/locales/de-DE/node.json +20 -2
- package/locales/en-US/node.json +18 -1
- package/locales/ja/node.json +18 -3
- package/locales/zh-CN/node.json +20 -2
- package/node.html +983 -148
- package/package.json +18 -11
package/README.md
CHANGED
|
@@ -1,69 +1,49 @@
|
|
|
1
1
|
<h1 align="center">
|
|
2
|
-
|
|
2
|
+
Node-RED OpenAI API: Unleashing AIoT Innovation
|
|
3
3
|
<br>
|
|
4
|
-
<a href="https://github.com/allanbunch/node-red-openai-api">
|
|
5
|
-
|
|
4
|
+
<a href="https://github.com/allanbunch/node-red-openai-api">
|
|
5
|
+
<img width="265" alt="node-red-openai-api-node" src="https://github.com/allanbunch/node-red-openai-api/assets/4503640/9588aba4-0a97-4cbe-a446-58e06d5dd016">
|
|
6
|
+
</a>
|
|
6
7
|
<br>
|
|
7
8
|
@inductiv/node-red-openai-api
|
|
8
9
|
</h1>
|
|
9
10
|
|
|
10
|
-
_@inductiv/node-red-openai-api_
|
|
11
|
+
Welcome to _@inductiv/node-red-openai-api_, 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.
|
|
11
12
|
|
|
12
|
-
##
|
|
13
|
+
## Core Features
|
|
13
14
|
|
|
14
|
-
- **
|
|
15
|
-
- **
|
|
15
|
+
- **Seamless Integration**: Connect directly with OpenAI API compatible services without the hassle of complex coding or setup. Ideal for rapid prototyping and deployment in IoT contexts.
|
|
16
|
+
- **Configurable and Flexible**: Adapt to a wide range of project requirements, making it easy to integrate AI into your IoT solutions.
|
|
17
|
+
- **Powerful Combinations**: Utilize Node-RED's diverse nodes to build complex, AI-driven IoT workflows with ease.
|
|
16
18
|
|
|
17
|
-
|
|
19
|
+
## What's New in Version 1.0
|
|
18
20
|
|
|
19
|
-
|
|
21
|
+
Version 1.0 of the **node-red-openai-api** node brings significant enhancements and new possibilities, including:
|
|
20
22
|
|
|
21
|
-
- **
|
|
22
|
-
- **
|
|
23
|
-
- **
|
|
23
|
+
- **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.
|
|
24
|
+
- **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.
|
|
25
|
+
- **New Functionalities**: Addition of new capabilities such as Batch requests and Vector Store features to enhance your projects.
|
|
26
|
+
- **Updated Examples**: Updated [examples](./examples/) showcasing new API features and functionality.
|
|
27
|
+
- **Bug Fixes**: Closed out a series of bugs improving overall usability and stability.
|
|
24
28
|
|
|
25
|
-
|
|
29
|
+
### Important Notice Regarding Compatibility
|
|
26
30
|
|
|
27
|
-
|
|
31
|
+
- **Backward Incompatible Changes**: Please be aware that this version includes breaking changes that may affect existing implementations due to the updated OpenAI NodeJS package:
|
|
32
|
+
- The API call structure and parameters have been refined to align with the latest OpenAI specifications.
|
|
33
|
+
- Some functions and settings from previous versions may no longer be compatible with this update.
|
|
34
|
+
- List responses now exist at the top level of the `msg.payload` object; previously `msg.payload.data`.
|
|
28
35
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
### Benefits
|
|
32
|
-
|
|
33
|
-
- **Versatility**: Seamlessly connect to a broader range of AI services, beyond the default OpenAI offerings, including local model solutions like [Text Generation Web UI](https://github.com/oobabooga/text-generation-webui).
|
|
34
|
-
- **Customization**: Tailor your Node-RED node to interact with custom or specialized AI services, offering greater control and flexibility in your AI integrations.
|
|
35
|
-
- **Expanded Scope**: Ideal for unique use cases where standard OpenAI services may not suffice, or when working within specialized AI environments.
|
|
36
|
-
|
|
37
|
-
### How to Use
|
|
38
|
-
|
|
39
|
-
To utilize this feature, simply specify the custom API service host base URL in the node configuration. This enhancement is built upon the existing framework, ensuring a smooth and intuitive user experience.
|
|
40
|
-
|
|
41
|
-
#### Service Host Configuration Examples
|
|
42
|
-
|
|
43
|
-
<img width="371" alt="service host node config" src="https://github.com/allanbunch/node-red-openai-api/assets/4503640/256362c5-6e78-44c7-af6e-12d5830cdf32">
|
|
44
|
-
|
|
45
|
-
<img width="373" alt="OpenAI service host node config" src="https://github.com/allanbunch/node-red-openai-api/assets/4503640/a6e9d4b9-836a-4d0e-8349-4eceda72cb72">
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
### Migrating from Previous Versions
|
|
49
|
-
|
|
50
|
-
This package's configuration node is now named "Service Host" to serve as a more generalized representation, considering the node's expanded capability scope. This node's previous versions used a config node named "OpenAI Auth" which is no longer referenced starting with this version (0.3.0). Be sure to update your existing node configurations accordingly.
|
|
51
|
-
|
|
52
|
-
## Table of Contents
|
|
53
|
-
|
|
54
|
-
- [Installation](#installation)
|
|
55
|
-
- [Usage](#usage)
|
|
56
|
-
- [License](#license)
|
|
36
|
+
I recommend reviewing current setups and testing them with this new version in a development environment before updating to ensure a smooth transition. This will help you take full advantage of the enhanced features while managing any necessary adjustments in your existing applications.
|
|
57
37
|
|
|
58
38
|
## Installation
|
|
59
39
|
|
|
60
|
-
Via
|
|
40
|
+
### Via Node-RED Palette Manager
|
|
61
41
|
|
|
62
42
|
```text
|
|
63
43
|
@inductiv/node-red-openai-api
|
|
64
44
|
```
|
|
65
45
|
|
|
66
|
-
Via NPM
|
|
46
|
+
### Via NPM
|
|
67
47
|
|
|
68
48
|
```bash
|
|
69
49
|
cd $HOME/.node-red
|
|
@@ -72,35 +52,43 @@ npm i @inductiv/node-red-openai-api
|
|
|
72
52
|
|
|
73
53
|
## Usage
|
|
74
54
|
|
|
75
|
-
|
|
55
|
+
After installation, find your _@inductiv/node-red-openai-api_ node in the **AI** palette category labeled "OpenAI API". Here's how you can start integrating AI into your IoT projects:
|
|
76
56
|
|
|
77
|
-
|
|
57
|
+
1. Configure the node with your AI platform's API key (if required).
|
|
58
|
+
2. Use the node to send and receive data to/from OpenAI API compatible platforms, incorporating AI responses into your IoT workflows.
|
|
59
|
+
3. Explore the [examples](./examples/) directory for sample implementations.
|
|
78
60
|
|
|
79
|
-
|
|
61
|
+
## Contribute
|
|
80
62
|
|
|
81
|
-
|
|
63
|
+
I value community contributions that help enhance this Node-RED node and expand its capabilities in AIoT applications. Whether you're fixing bugs, adding new features, or improving documentation, your help is welcome!
|
|
82
64
|
|
|
83
|
-
|
|
65
|
+
### How to Contribute
|
|
84
66
|
|
|
85
|
-
|
|
67
|
+
1. **Fork the Repository**: Start by forking the [repository](https://github.com/allanbunch/node-red-openai-api) to your GitHub account.
|
|
68
|
+
2. **Clone Your Fork**: Clone your fork to your local machine for development.
|
|
69
|
+
3. **Create a Feature Branch**: Create a branch in your forked repository where you can make your changes.
|
|
70
|
+
4. **Commit Your Changes**: Make your changes in your feature branch and commit them with clear, descriptive messages.
|
|
71
|
+
5. **Push to Your Fork**: Push your changes to your fork on GitHub.
|
|
72
|
+
6. **Submit a Pull Request**: Go to the original repository and submit a pull request from your feature branch. Please provide a clear description of the changes and reference any related issues.
|
|
86
73
|
|
|
87
|
-
|
|
74
|
+
### Guidelines
|
|
88
75
|
|
|
89
|
-
|
|
76
|
+
- Ensure your code adheres to or enhances the project's style and quality standards.
|
|
77
|
+
- Include unit tests for new features to confirm they work as expected.
|
|
78
|
+
- Update documentation to reflect any changes or additions made.
|
|
90
79
|
|
|
91
|
-
|
|
80
|
+
## Community and Support
|
|
92
81
|
|
|
93
|
-
|
|
82
|
+
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.
|
|
94
83
|
|
|
95
|
-
- **[
|
|
96
|
-
- **[
|
|
97
|
-
- **[
|
|
98
|
-
- **[Polls](https://github.com/allanbunch/node-red-openai-api/discussions/categories/polls)**: Participate in polls to influence project decisions.
|
|
99
|
-
- **[Q&A](https://github.com/allanbunch/node-red-openai-api/discussions/categories/q-a)**: Get answers to your questions and share your expertise.
|
|
100
|
-
- **[Show and Tell](https://github.com/allanbunch/node-red-openai-api/discussions/categories/show-and-tell)**: Showcase your creative implementations and inspire others.
|
|
84
|
+
- **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).
|
|
85
|
+
- **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.
|
|
86
|
+
- **Contributing**: Your contributions are invaluable to us. See the [How to Contribute](#contribute) section for more details on how to get involved.
|
|
101
87
|
|
|
102
|
-
|
|
88
|
+
Thank you for being part of our innovative community!
|
|
103
89
|
|
|
104
90
|
## License
|
|
105
91
|
|
|
106
|
-
[MIT](./LICENSE)
|
|
92
|
+
This project is licensed under the [MIT License](./LICENSE).
|
|
93
|
+
|
|
94
|
+
Thank you for being part of the Node-RED community!
|