node-red-contrib-openai 1.0.3

Node-RED node for openai

npm install node-red-contrib-openai

node-red-contrib-openai

Node-RED node for openai

Install

To install the stable version use the Menu - Manage palette - Install option and search for node-red-contrib-openai, or run the following command in your Node-RED user directory, typically ~/.node-red

npm install node-red-contrib-openai

Wrapper openai API

Sample parameters

msg.api = 'chat/completions';
msg.params = {
    "model": "gpt-3.5-turbo",
    "messages": [
        {
            "role": "system",
            "content": "You are a helpful assistant."
        },
        {
            "role": "user",
            "content": "Hello!"
        }
    ],
    "max_tokens": 7,
    "temperature": 0
}
return msg;

Sample Flow

You can make this json string into a flow by using the node-red flow import function.

alt

alt

Node Info

Version: 1.0.3
Updated 11 months, 2 weeks ago
License: MIT
Rating: 4.2 10

Categories

Actions

Rate:

Downloads

132 in the last week

Nodes

  • openai
  • openaiApiKey

Keywords

  • node-red-contrib-contribgen
  • node-red
  • openai
  • chatbot
  • AI
  • search api
  • AI 검색
  • Completion
  • image generation
  • Text Embeddings
  • Fine tunes
  • Moderations
  • nodejs

Maintainers