OpenAI Integration

OpenAI is an AI research and deployment company, you can use this integration to build interactive virtual assistants that can carry out conversations in a natural and engaging manner.

For the integration to become operational, you must have already set up an OpenAI account, The steps to integrate it into the platform are:

  1. Select the OpenAI card from the pane.
  2. Select Next.

You will be taken to a window that addresses the details of the OpenAI integration, as shown.

There are two configuration steps, one associated with the OpenAI account, the OpenAI Information and the other with the platform communication channels to be used in the solution, identified as Connections.

OpenAI Information

From the OpenAI Information section, type the following information obtained from your OpenAI account:

  1. Alias: Type a custom name to identify the OpenAI.

  2. ApiKey: Type your API Key, if you dont have one select + Create new secret key from the API Keys OpenAI.

    The OpenAI API uses API keys for authentication.

📘

NOTE

Remember that your API key is a secret! Do not share it with others or expose it.

  1. Model: Select the desired gpt model.

    The OpenAI is powered by a diverse set of models with different capabilities and price points.

GPT-4 is a large multimodal model (accepting text inputs and emitting text outputs today, with image inputs coming in the future) that can solve difficult problems with greater accuracy than any of our previous models

GPT-3.5 models can understand and generate natural language or code. The most capable and cost effective model in the GPT-3.5 family is gpt-3.5-turbo which has been optimized for chat but works well for traditional completions tasks as well.

ModelsDescription
GPT-4More capable than any GPT-3.5 model, able to do more complex tasks, and optimized for chat. Will be updated with our latest model iteration.
gpt-4-0314Snapshot of gpt-4 from March 14th 2023. Unlike gpt-4, this model will not receive updates, and will be deprecated 3 months after a new version is released.
gpt-4-32kSame capabilities as the base gpt-4 mode but with 4x the context length. Will be updated with our latest model iteration.
gpt-4-32k-0314Snapshot of gpt-4-32 from March 14th 2023. Unlike gpt-4-32k, this model will not receive updates, and will be deprecated 3 months after a new version is released.
gpt-3.5-turboMost capable GPT-3.5 model and optimized for chat at 1/10th the cost of text-davinci-003. Will be updated with our latest model iteration.
gpt-3.5-turbo-0301Snapshot of gpt-3.5-turbo from March 1st 2023. Unlike gpt-3.5-turbo, this model will not receive updates, and will be deprecated 3 months after a new version is released.
  1. Tone: Select the Tone type of how you want the chat to behave.
  • Balanced: best for the most common tasks, like search, maximum speed
  • Creative: whenever you need to generate new content, longer output, more expressive, slower
  • Precise: most factual, minimizing conjectures
  1. Context Limit: Total number of messages that you consider to keep the conversation going. That is, if the user writes more than 5 messages, the model will only consider the last 5 messages of the conversation.

    By default is 5 messages.

  2. Max response length: Total number of tokens permitted by your model. That is, it is the total number of tokens that OpenAPI responds to.

    Tokens can be thought of as pieces of words. Before the API processes the prompts, the input is broken down into tokens. These tokens are not cut up exactly where the words start or end - tokens can include trailing spaces and even sub-words.

  • Short -> 50 Tokens
  • Medium -> 100 Tokens
  • Long -> Unilimited Tokens
  1. Select the Save button to save the information of your OpenAI integration.

Connections

The next step is to select the platform channels that will be used for the interactions. This is done in Connections. In it, there is a pull-down menu that will offer the channels in the platform that can be used to establish the channels through which the OpenAI integration will be used. A sample screenshot is shown below.

📘

NOTE

If you want to engage (integrate) OpenAI with a Chatbot Service campaign, do not add any connections to the OpenAI.

The channels to be used in the OpenAI integration cannot be shared with the platform Keyword or Chatbot type campaigns as it would create an operational conflict.

Actually you are able to add two types of channel connections:

  • SMS texting

  • WhatsApp

In the future, we are going to add more channel connections to the OpenAI integration.

To configure the connecting channels,

  1. Select the desired connection from the Available Connections dropdown menu. The left side of the connection corresponds to the channel type and the right side corresponds to the connection code.

  1. Select the Add + button to add the connection.

Repeat this step for every channel that is part of the integration. The platform will include the selected channels in the table immediately below the menu.

Once both, the OpenAPI Information and the Connections are defined, select Save.

In case you are integrating OpenAPI to a Chatbot Service campaign, just enter the required fields to complete the OpenAI information without adding any connection and select Save.

Follow these steps, to enable the OpenAI integration according to the configuration set up (with and without connections) when you added the integration:

OpenAI Integration with Connections

The saved integration will be shown under the Integrations tab as a card, where you can view the values used in the integration for the Alias, Tone, API Key, the connection types (Details), and the options to delete, edit or activate it.

The next step is to activate the integration, done by selecting Start ▶. The integration card will be modified to show its active state, displaying the connection icons in blue.

By Selecting the Details Icon in the card, will show the channel and number/code (sender) associated with that connection.

Once the integration is active, Stop under Actions, will return it to the inactive state.

OpenAPI Integration with Chatbot Service

Once you've added the OpenAI integration without including any connections, the next step is to enable the integration between OpenAI and Chatbot Service campaign.

The saved integration will be shown under the Integrations tab as a card, where you can view the values used in the integration for the Alias, Tone, API Key, the connection types (Details), and the options to delete, edit or activate it.

The next step is to activate the integration, done by selecting Start ▶. The integration card will be modified to show its active state to enable.

Once enabled the OpenAI integration from the Integrations tab, the next step is integrate the Chatbot campaign and OpenAI. To know how to configure a chatbot campaign that will contain the Open API integration previously defined, go to the Chatbot Service section.

📘

NOTE

The OpenAI integration must be Active to be associated with a Chatbot Service campaign.

After creating the Chatbot service and enabling it in Live status, the integration card will be modified to show its active state, displaying the Detail icon.

By selecting the Campaigns icon, you will be able to see which campaigns the OpenAI integration is linked to.

It will display a dialog with the following information:

At the top of the dialog displays the integration type.

  • Campaign Id: Unique identifier of the campaign.
  • Campaign Name: Name of the campaign.
  • Integration Date: Date when creating the campaign linked to the integration and enabling it in Live status.

Considerations

If the OpenAI integration is linked to any campaigns, you will not be able to pause (stop) the integration. If you try to pause it, a dialog will be displayed mentioning that it is invalid the action required.

The steps to remove the OpenAI integration associated with campaigns are the following:

  1. To remove the OpenAI integration, you must first disable the campaigns that the integration is linked to. To do it, go to the Live campaigns associated with the OpenAI integration. Then, select the Report button and click on the Pause button. It will display a dialog to confirm the action, select the Confirm button.

  1. Finally, go back to the Integrations tab from the References section and select the Pause button.

    In case you want to delete the integration, select the Delete icon from the Actions buttons.