# Open AI

Category: AI
|
Runtime: 3.4
|
Available: Free

# Overview

OpenAI node can be used to ask simple questions with the OpenAI platform.

# Setup

# Prerequisites

# Installation

  1. Go to your project workspace where you can see package.json file.
  2. Run the below npm command:
   npm i @kumologica/kumologica-contrib-openai

# Technical Details

# Properties

  • Operation - (Required). Type of operation to perform with the OpenAI Platform. Currently only supports "Simple Q&A" interaction.
  • Model - (Required). The OpenAI Platform Model to use. Following models are supported:
    • gpt-4-1106-preview
    • gpt-4-turbo
    • gpt-4-0125-preview
    • gpt-4-turbo-2024-04-09
    • gpt-3.5-turbo
    • gpt-4-turbo-preview
    • gpt-3.5-turbo-0125
    • gpt-3.5-turbo-0613
    • gpt-4o-mini
    • gpt-4o-mini-2024-07-18
    • gpt-3.5-turbo-1106
    • chatgpt-4o-latest
    • gpt-3.5-turbo-16k
    • gpt-3.5-turbo-instruct-0914
    • gpt-3.5-turbo-0301
    • gpt-4
    • gpt-4-0613
    • gpt-3.5-turbo-instruct
    • gpt-4o-2024-08-06
    • gpt-3.5-turbo-16k-0613
    • gpt-4o
    • gpt-4o-2024-05-13
  • Context - (Required). System Context to be used.
  • Question - (Required). Question to ask the OpenAI Platform.
  • API Key - (Optional). OpenAI Platform API_Key to use. If not provided, fetches from env.OPENAI_API_KEY

# Throws

  • OpenAIError - when OpenAI client setup failed. Possible cause is invalid api key or not enough tokens available.

# Returns

msg.payload is overwritten by the response from this node. The node return an answer to the question passed.