npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

node-red-contrib-custom-chatgpt4o

v1.2.18

Published

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

Downloads

72

Readme

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, GPT-4o 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-chatgpt4o, you can install it through the built-in Node-RED Palette manager or using npm:

npm install node-red-contrib-custom-chatgpt4o

Setup

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

Usage

With node-red-contrib-custom-chatgpt4o, you have the power to select the behavior of the node by setting the Topic property value to image, edit, turbo , or gpt4 / gpt4o. 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.
  1. 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]

  2. 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.

  3. 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:[]]

  4. When msg.topic is set to gpt4 or gpt4o:

    • [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.

External Links

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.

License

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