Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/flowfuse/node-red-function-gpt
A Node-RED node that adds "Ask ChatGPT" option to a duplicate of the built-in function node.
https://github.com/flowfuse/node-red-function-gpt
Last synced: 1 day ago
JSON representation
A Node-RED node that adds "Ask ChatGPT" option to a duplicate of the built-in function node.
- Host: GitHub
- URL: https://github.com/flowfuse/node-red-function-gpt
- Owner: FlowFuse
- License: apache-2.0
- Created: 2023-04-21T15:09:39.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-05-24T10:54:25.000Z (6 months ago)
- Last Synced: 2024-11-09T01:09:42.699Z (6 days ago)
- Language: HTML
- Homepage:
- Size: 70.3 KB
- Stars: 29
- Watchers: 4
- Forks: 2
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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.
## Installation
To add the node to your own instance of Node-RED:
1. Open the "Menu" inside Node-RED
1. Click "Manage palette"
1. Select the "Install" tab
1. Search "chatgpt"
1. Install the `node-red-function-gpt` nodeYou will need a [valid API Key from OpenAI](https://platform.openai.com/account/api-keys)
## How to Use
### Basic Example
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.:
```js
//$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.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](https://github.com/node-red/node-red/blob/master/packages/node_modules/%40node-red/nodes/core/function/10-function.js) that is copyright OpenJS Foundation and licensed under the Apache License, Version 2.0