Connect ChatGPT with WhatsApp in Gallabox Chatbot

Take your conversational AI to the next level with the Open AI connector. Easily integrate and tailor actions such as Create Completion and Chat Completion to create a unique Open AI experience.


Embark on a journey of enhanced conversational AI with the Open AI connector. This guide navigates you through the seamless integration process, helping you choose actions like Create Completion and Chat Completion for a customized Open AI experience.

Connect Open AI

  1. Choose the connector - Open AI from the list of connectors.

  1. After clicking on Open AI Connector, you will see the actions - Create Completion and Chat Completion.

  1. After you click on one of the Actions, it will ask you to Add New Connection or Select Existing Connection. If you haven't made any connection, see if the Connection Name is fine with you and proceed with pasting the API Key. You will find the guide to find the key here.

Paste the API Key and click on Create Connection.

  1. If the Open AI connection has already created, go to Select Existing Connection and click on Connect.

Using Open AI Connector

  1. Once the connection is created, click on Connect besides the connection to start configuring the connector and it will take you to the action that you selected.

  1. After clicking on connect the selected the Action - Chat Completion opens and you will have to edit the value for Context, user prompt, Model, Max Tokens, Temperature, and the variable.

  1. For the context, you can write - If Intent is either Feedbacks, Products, Product, Register, Hi, Main menu, Match the user input to the correct intent give the intent as it is, If it does Match give as default.

You can change the Intents as per your bot, keep the rest of the text same for the card to work. The context would be - If Intent is either Intent 1, Intent 2, Intent 3, Intent 4, Intent 5, Intent 6, match the user input to the correct intent give the intent as it is, If it does Match give as default.

  1. In the User Prompt field, you have to add the variable as {{intent.text}}

  1. There is only one model for the action - Chat Completion that you have to select.

  1. The Token is pieces of words. In terms of length:

  • 1 token ~= 4 chars in English

  • 1 token ~= ΒΎ words

  • 100 tokens ~= 75 words


  • 1-2 sentence ~= 30 tokens

  • 1 paragraph ~= 100 tokens

  • 1,500 words ~= 2048 tokens

Learn more about Tokens here.

  1. Sampling temperature controls the randomness of the text generated by Open AI. A higher temperature (e.g., 0.7) results in more diverse and creative output, while a lower temperature (e.g., 0.2) makes the output more deterministic and focused.

    The default temperature setting for Open AI is 0.7, which strikes a balance between creativity and consistency. You can experiment with different temperature settings to see what works best for you.

  1. You have to create or select a variable to store the AI response.

Once you have done pasting the values for all the fields in the action either Create Completion or Chat Completion, click on Save.

The Card will look like the picture below in the Gallabox bot- builder.

In the above picture, the highlighted part has Green and Red Circle. They depict the success and failure conditions.

Maximize the potential of your Open AI connector by carefully configuring actions - Chat Completion. Tailor the context, user prompts, model selection, and temperature settings to create an enriched conversational flow. With success and failure conditions visually depicted in the Gallabox bot-builder, you're set to unlock the power of AI in your chat-flow.

Last updated