OPENAI & PRIMECHAT
Last updated
Was this helpful?
Last updated
Was this helpful?
OpenAI is a versatile AI platform, comparable to Dialogflow, that allows users to engage through AI-driven interactions. It has capabilities that range from responding to user inquiries to generating images, making it a robust tool for an array of tasks.
When integrated with PrimeChat, OpenAI's ChatGPT can offer businesses substantial advantages in engaging with their customers across a multitude of channels. PrimeChat supports a wide array of channels, including Messenger, Instagram, WhatsApp, Google Business Messenger, Voice, SMS, Viber, Line, VK, web chat, WeChat, and others. By connecting with ChatGPT, businesses can provide AI-powered conversational capabilities that can comprehend and address customer inquiries in a way that closely resembles human interaction. This enhancement not only improves the customer experience but also drives greater engagement.
The sophisticated natural language understanding and generation abilities of ChatGPT allow our chatbot to grasp the context of conversations and deliver tailored responses that are directly relevant to customers' questions. This personalization, when paired with PrimeChat's multi-channel support, means businesses can consistently engage with customers on their preferred platforms, significantly improving the overall experience.
The integration leads to heightened customer satisfaction, more dynamic engagement, and a more efficient customer support process—all of which contribute to business growth and success.
PrimeChat provides a seamless integration with OpenAI, enabling users to effortlessly establish complex workflows with just a click. Let's take a look at how to set up a connection between OpenAI and PrimeChat.
3.1 Input:
3.2 Response:
3.3 Map the response to a custom field
3.4 Sample Response Data
3.5 Best Practices:
4.1 Input:
4.2 Response:
4.3 Sample Response Data
4.4 Best Practices:
5.1 Input:
5.2 Response:
5.3 Sample Response Data
5.4 Best Practices:
6.1 Input:
6.2 Response:
6.3 Sample Response Data
6.4 Best Practices:
2. Login using your credentials.
3. Click on the top-right corner of the “Personal” tab.
4. From here, you can generate an API key.
You will only be able to see your API key once, so you can save the copy to a safe place.
5. Paste your API key inside PrimeChat and click “Save” to establish the connection.
Your account has successfully been connected with PrimeChat.
PrimeChat gives a lot of actions with OpenAI, which users can use for their needs.
We will now discuss them in detail one by one.
Text completion offers the functionality of sending prompts to OpenAI in textual form and based on the prompt receiving an answer.
Prompt: This is your main input for which you want the AI to give you an answer or output of. This can be a question, an instruction, etc.
Model: The model you want to use inside OpenAI for the task. By default, text-DaVinci-003 has been selected.
Max Tokens: Each task inside OpenAI consumes tokens. These tokens can be replenished using credit. This field puts a limit on the maximum number of tokens you want to use for a particular task.
Temperature: This acts as an accuracy gauge where higher values give more random answers and lower values give more deterministic and focused answers. It defaults to 1
Presence Penalty: This value makes OpenAI use unique phrases and texts when completing a task. The higher the value, the less repetitive the words. It defaults to 0.
Number of Completions: The number of times you want the AI to generate a response based on your prompt. The higher value will result in more responses. It defaults to 1 to avoid the consumption of tokens.
Best of Completions: This returns the best possible response(s) for your prompt. It defaults to 1. This works with the Number of Completion field to choose the best possible answer from a group of responses.
You can select the text under the choices, and then you can see the JSON Path selected, and then you can save the response into your own user custom field and then use this response in your flow builder.
{ "id": "cmpl-6zchlUy0OiAjX91LHOPBcZjuXaDgE", "object": "text_completion", "created": 1680144809, "model": "text-davinci-003", "choices": [ { "text": " 1. Understand Your Target Audience - Before you begin any marketing campaign, it’s important to have a clear understanding of who you’re targeting with your message. Researching and understanding your target audience will help you create campaigns specifically tailored to their interests. 2. Leverage Social Media - Social media has become one of the most effective ways to communicate with your target audience. Utilizing social media channels such as Facebook, Twitter, and Instagram can help you build", "index": 0, "logprobs": null, "finish_reason": "length" } ], "usage": { "prompt_tokens": 4, "completion_tokens": 100, "total_tokens": 104 } }
Id: The id of the text completion. A unique value.
Object: The action/task you gave to OpenAI. In our case “text_completion”
Created: A date-time field that tells the instance of the creation of the response. It is in Unix timestamp format.
Finish reason: The reason for the stoppage of the said task.
Prompt tokens: The number of tokens used to complete the task.
Sometimes the completed response you get back seems to be cut off. This is due to the lack of the number of tokens required for the completion of the task. Simply adjusting the value of Max tokens inside the input fields will fix this issue.
It is also advised to adjust values like temperature, the number of completions, best of completions, etc to your use case by means of split testing. Every use case is unique and you should want the best possible utilisation of the resources available.
Image Generation is used to generate images based on the user-input prompts. This feature will generate the best possible image that matches your given prompt.
Prompt: This is your main input for which you want the AI to generate an image for you. This can be a question, an instruction, etc.
Number of Images: The number of images you want the AI to generate for you. It defaults to 1
Size: The dimensions you want the image to be. OpenAI supports three sizes which are:
512x512
256x256
1024x1024
{
"created": 1680145479,
"data": [
{
"url": "https://oaidalleapiprodscus.blob.core.windows.net/private/org-2FEbJIRL7GXfKmGw2BT9wh9b/user-nk6UUN7L9nFqzGEw67uTMonD/img-FhZpxMrCbiDBR4O62e7pPF08.png?st=2023-03-30T02%3A04%3A39Z&se=2023-03-30T04%3A04%3A39Z&sp=r&sv=2021-08-06&sr=b&rscd=inline&rsct=image/png&skoid=6aaadede-4fb3-4698-a8f6-684d7786b067&sktid=a48cca56-e6da-484e-a814-9c849652bcb3&skt=2023-03-29T17%3A40%3A49Z&ske=2023-03-30T17%3A40%3A49Z&sks=b&skv=2021-08-06&sig=4DF0dw/peG7FSVMUml4ShuQP98T0xECW1gE%2BeutdRAw%3D"
}
]
}
Created: A date-time field that tells the instance of the creation of the response. It is in Unix timestamp format.
Url: The public URL for your image(s).
Generating Images consumes more computational power, and hence, the replies can be delayed based on the prompts you give.
AI is a developing field and hence the images produced can be quite inaccurate given the complexity of the prompts provided. Hence, finding the correct prompt complexity can sometimes be a challenge.
Speech-to-text action is used when you want to convert audio input into text. This has variety of use cases, such as implementation in IVRs.
File Url: This is the URL for the audio that you want to convert to text. Make sure that the url is a publicly hosted url ending with audio formats such as mp3. mpeg etc
Language: The language you want the speech to be converted into. We use ISO-639-1 format which means you need to put languages as ‘en’, ‘es’ etc.
{ "text": "Welcome to Rensen. This is a test to see if everything works well. And if the IVR can guide you to your work." }
Text: The text that is converted from the speech.
You can convert speech to text quite accurately using this feature. It is considered a best practice to provide the audio in the same language as that of the desired output for more accurate results and latency.
Translate audio to English action is used when you want to convert audio input into text in English language. This has a variety of use cases, such as implementation in IVRs.
File Url: This is the URL for the audio that you want to convert to text. Ensure the url is a publicly hosted url ending with audio formats such as mp3. mpeg etc
{ "text": "Welcome to Rensen. This is a test to see if everything works well. And if the IVR can guide you to your work." }
Text: The text that is converted from the speech.
Experimenting with different formats of audio can provide more (or less) accurate results. This is simply due to the audio quality provided, so make sure you split test with different formats to achieve the best possible format for your use case.
1. Visit