Socket
Socket
Sign inDemoInstall

node-red-contrib-custom-chatgpt

Package Overview
Dependencies
9
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    node-red-contrib-custom-chatgpt

A Node-RED node that interacts with OpenAI machine learning models to generate text and image outputs like 'ChatGPT' and 'DALL·E 2'.


Version published
Weekly downloads
136
increased by2.26%
Maintainers
1
Install size
4.69 MB
Created
Weekly downloads
 

Changelog

Source

[1.2.17] - 2024-01-17

Changed

  • Properly included support for message properties msg.API_KEY and msg.ORGANIZATION

Readme

Source

node-red-contrib-custom-chatgpt

Platform npm Downloads MIT License

Supercharge your Node-RED flows with AI! Seamlessly integrate with OpenAI's powerful models like GPT-4 and DALL·E 2, and unlock a world of creative possibilities. Create imaginative chatbots, automate content generation, or build AI-driven experiences. The power of AI is just a node away!

Table of Contents

Getting Started

To start using node-red-contrib-custom-chatgpt, you can install it through the built-in Node-RED Palette manager or using npm:

npm install node-red-contrib-custom-chatgpt

Setup

With these, you're ready to configure your node-red-contrib-custom-chatgpt nodes.

Usage

With node-red-contrib-custom-chatgpt, you have the power to select the behavior of the node by setting the Topic property value to completion, image, edit, turbo , or gpt4. You can control the node with a single required message property msg.payload or dynamically set the behavior with incoming messages using read from msg.topic.

For detailed information on the usage of these modes, please refer to the OpenAI API documentation.

  1. When msg.topic is set to completion:

    • [Required] msg.payload should be a well-written prompt that provides enough information for the model to know what you want and how it should respond. Its success generally depends on the complexity of the task and quality of your prompt. A good rule of thumb is to think about how you would write a word problem for a middle schooler to solve.
  2. When msg.topic is set to image:

    • [Required] msg.payload should be a prompt of text description of the desired image.

    • [Optional] msg.size should be a string of the desired image dimensions. [Default:256x256]

    • [Optional] msg.format should be a string of either b64_json or url. [Default:b64_json]

  3. When msg.topic is set to edit:

    • [Required] msg.payload should be a prompt of text to use as a starting point for the edit.

    • [Required] msg.last should be a string of text to use as the input to be edited.

  4. When msg.topic is set to turbo:

    • [Required] msg.payload should be a well-written prompt that provides enough information for the model to know what you want and how it should respond. Its success generally depends on the complexity of the task and quality of your prompt.

    • [Optional] msg.history should be an array of objects containing the conversation history. [Default:[]]

  5. When msg.topic is set to gpt4:

    • [Required] msg.payload should be a well-written prompt that provides enough information for the model to know what you want and how it should respond. Its success generally depends on the complexity of the task and quality of your prompt.

    • [Optional] msg.history should be an array of objects containing the conversation history. [Default:[]]

Additional optional properties

The following optional inputs are supported - msg.max_tokens, msg.suffix, msg.n, msg.temperature, msg.top_p, msg.presence_penalty, msg.frequency_penalty, msg.echo, msg.API_KEY and msg.ORGANIZATION. See the nodes built-in help tab for more information on how they are used.

Examples

We've provided several examples to help you understand the potential and versatility of node-red-contrib-custom-chatgpt. From basic usages like image generation and text editing, to more advanced features like setting behaviors, using optional message properties, and automating Node-RED node creation.

[Old screenshot] Basic usage for image, completion, and edit. Screenshot showcasing basic usage of node-red-contrib-custom-chatgpt for image generation, text completion, and text editing tasks

[Old screenshot] More advanced usage with templates. Screenshot illustrating advanced usage of node-red-contrib-custom-chatgpt with templates

[Old screenshot] Usage of model gpt-3.5-turbo and conversation history. Screenshot demonstrating the usage of gpt-3.5-turbo model with conversation history in node-red-contrib-custom-chatgpt

[New screenshot] Updated example using optional message properties and setting behavior Topic in node edit dialog. Screenshot of an updated example showing the use of optional message properties and setting behavior Topic in node edit dialog with node-red-contrib-custom-chatgpt

[New screenshot] Additional example demonstrating how to generate Node-RED nodes and import them directly into the editor automatically. Screenshot of an additional example demonstrating the generation of Node-RED nodes and their automatic import into the editor using node-red-contrib-custom-chatgpt

Bugs and Feature Requests

Encountered a bug or have an idea for a new feature? We'd love to hear from you! Feel free to submit an issue on our GitHub page.

Changelog

Stay up-to-date with the latest changes by checking out our CHANGELOG.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Keywords

FAQs

Last updated on 17 Jan 2024

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc