Skip to content

OpenAI Node

The OpenAI node is used to integrate OpenAI into fabella.

When you click on a OpenAI node you will be presented with various fields. In Prompt you can type in the text you want to send to OpenAI. In the field Text Output you have to name the variable in which the entire response will be stored. Max Tokens sets the number of tokens send to OpenAI. The API Key is obtained from OpenAI.

OpenAI Node
Prompt The Prompt to OpenAI.
Text Output When OpenAI gives back an response, the entire response will be stored in the this variable.
Max Tokens Max Tokens send to OpenAI.
API Key API Key obtained from OpenAI.

openai

Using the response data

The response data is saved in the variable you indicated. The content of the variable will contain the exact response as raw text.

Obtaining API Key

To get an OpenAI API key, you'll need to create an account first.

To get your API key, follow these steps:

openai_2

  1. Navigate to platform openai
  2. Click on your avatar in the top right-hand corner of the dashboard.
  3. Select View API Keys.
  4. Click Create new secret key.

openai_3

The key will only be shown once, so make sure you copy it and save it somewhere safe.

Now you can easily copy your API Key into the OpenAI node.

Use example

example

An example that lets the user speak the prompt:

  1. Check No match and capture input in the Hear node to capture the utterance in a variable (named prompt in this case).

  2. Use the variable in the Prompt field in the “Open AI” node. Then add a variable to the Text Output field to capture the result.

  3. Use the Text Output variable in the next Say node.