Giter Site home page Giter Site logo

vitaly-z / node-red-function-gpt Goto Github PK

View Code? Open in Web Editor NEW

This project forked from flowforge/node-red-function-gpt

0.0 0.0 0.0 77 KB

A Node-RED node that adds "Ask ChatGPT" option to a duplicate of the built-in function node.

License: Apache License 2.0

JavaScript 32.99% HTML 67.01%

node-red-function-gpt's Introduction

Node-RED Function Node with integrated ChatGPT

A Node-RED node that adds an "Ask ChatGPT" input and button to a duplicate of the built-in function node.

Screenshot 2023-04-21 at 16 08 47

Installation

To add the node to your own instance of Node-RED:

  1. Open the "Menu" inside Node-RED
  2. Click "Manage palette"
  3. Select the "Install" tab
  4. Search "chatgpt"
  5. Install the node-red-function-gpt node

You will need a valid API Key from OpenAI

How to Use

Basic Example

Screenshot 2023-05-17 at 12 45 08
  1. Add the Function GPT nodes to your editor
  2. Configure your ChatGPT credentials
  3. Deploy your nodes
  4. Open the function-gpt node
  5. Type your prompt into the text input at the bottom of the editor panel and click "Ask ChatGPT".

Inline Prompts

If you want to inject code into already written content, you can write an inline prompt. These prompts are written as comments, e.g.:

//$PROMPT: Double the input

If you've configured Node-RED to use the "Monaco" editor, this will then show an "Ask ChatGPT" hyperlink above the inserted comment, that you can click to ask this to ChatGPT.

Screenshot 2023-05-17 at 12 43 51

You can have as many of these within the function node as you like.

Troubleshooting

After adding the node to the palette, you do currently need to "Deploy", before you can use the integrated ChatGPT prompt.

Copyright

This code is derived from the core Node-RED Function node that is copyright OpenJS Foundation and licensed under the Apache License, Version 2.0

node-red-function-gpt's People

Contributors

joepavitt avatar knolleary avatar pezmc avatar steve-mcl avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.