Create your own ChatGPT for customer service in 15 minutes

Serhii Pospielov
12 min readMar 2, 2023

--

Generated with DALL·E

Chatbots offer businesses a great opportunity to automate customer service interactions, personalize their user experience and save time and money. Before small businesses can reap the benefits of chatbots, however, there are some challenges to overcome. It may not be feasible for small businesses to invest in the technology and infrastructure to setup and maintain a chatbot because of cost concerns. Small businesses may also lack the technical expertise to set up and maintain a chatbot. If the chatbot is not well-designed or properly integrated with the business’s existing systems, there can arise a risk of a poor user experience.

As a final point, businesses should be willing to invest in chatbot maintenance and support for their bots, which may incur an additional cost. Surprisingly, the most complex and sophisticated chatbot ChatGPT, eliminates those problems. For running it in our app, we will be using the services offered by OpenAI, creator of ChatGPT. It provides API as a service, so you don’t need to manage any hardware or software, you just enable it, and it works. You will still need to pay for requests only, but you will not have to pay for servers. You don’t need technical expertise or to hire expensive software developers to create the chatbot, all you need to do is to provide information about your business in plain words. Finally, keeping your chatbot up to date is as easy as original training. In this article, we will look at how to create your own ChatGPT customer service website or mobile application and/or integrate it into your existing website.

The approach suggested here may not be the one recommended by OpenAI, also, it’s only suitable for small businesses. However, it provides a great benefit of being able to quickly set up a custom ChatGPT app without having any special development skills. It will also be highly effective and dependable. The concept of it is to provide background information about the business before each message is sent. Let’s look through different use cases and review how they can be solved by using ChatGPT.

OpenAI platform

To get started, you will first need to create an account with the OpenAI platform. This can be done through an email address or through your existing Google or Microsoft account. Once the account is created, you will need to generate an API key. This key is required for connecting to the OpenAI API.

Create new secret key on OpenAI portal
Create new secret key on OpenAI portal

Now let’s open the OpenAI playground that allows you to test your ideas before implementing them on your website or mobile application. Its UI is quite straightforward. You put some prompts into the central area and set up customizations on the right panel.

The most important platform parameters are:

Model: The text-davinci-003 model is the strongest and most reliable and very similar to ChatGPT, though it is also the most expensive and the slowest one. Generally, the model choice will depend on the results expected and your budget. I recommend using the text-davinci-003 model, as it is much more reliable than others. However, before you make up your mind, you can test different models and see which suits you best.

Temperature: The temperature setting controls the randomness of the model’s responses. Increasing the temperature results in more creative answers, whereas decreasing it makes them more predictable. As you expect the chatbot to be very predictive, I recommend setting it to 0.

Max tokens: The maximum number of tokens (words, numbers, spaces, and punctuation)that should be returned in the response. It will make sure that the response is not too long. As you pay for each token, it makes sense to keep the response short.

You can read about other parameters in the official documentation.

Now, let’s see how GPT can solve small business problems.

Customer service

Small businesses can use their own ChatGPT to automate their customer service processes and provide instant responses to frequently asked questions thus freeing up their staff to handle more complex issues.

In simple words, often, it makes sense to get a chatbot on a website or mobile application to answer the most frequent questions, freeing you and giving you more time for the business itself.

Now, let’s get closer to how to make an OpenAI GPT chatbot that will answer questions about your business. As I already mentioned, you need to provide all important information about your business in the prompt of the chatbot. And then ask the chatbot to answer the question. Look at the example of how I created a custom ChatGPT chatbot for a veterinary clinic (Click on the screenshot to open it fullscreen):

Customer service ChatGPT chatbot Playground
Customer service ChatGPT chatbot Playground

First, I provided all the information available on the website. Of course, much more information can be added. The only limit here is 4000 tokens. This limitation includes both input and output, and don’t forget that you are expected to pay for each token, so there is always a trade-off between how much information it will be able to provide in the answers and the service cost.

Second, I asked a chatbot to give answers only using this information. If you don’t provide this instruction, it may recommend using its own database and even redirecting to another clinic.

Finally, I asked the chatbot not to answer the question if it was not confident with the answer. This is important because sometimes the bot may make up a weird answer.

As you can see, it was able to not only answer a general question but also comprehend that the problem with the eye requires some ophthalmology diagnosis.

Below are more examples of customer service interactions with this custom GPT chatbot:

Examples of custom GPT chatbot customer service interactions
Examples of custom GPT chatbot customer service interactions

Before integrating this GPT chatbot into your website or mobile app, it’s worth exploring other scenarios in which it could be efficiently used in different business settings.

Personalized product recommendations

ChatGPT-like chatbot can be integrated with e-commerce websites to provide personalized product recommendations to customers based on their personal preferences and past purchases.
For this chatbot, I took a random water filter producer company and added the description of their three products. For real cases, I would suggest using less marketing text and more technical details. But for the showcase, I simply copied the information from their website. All prices here are made up, I added them to demonstrate how the chatbot can mention prices in its recommendations.

Examples of custom GPT chatbot for personalized product recommendations
Examples of custom GPT chatbot for personalized product recommendations

The main advantage of OpenAI GPT models is that they can not only recommend the product based on the description but also support the discussion flow and ask additional questions.

Virtual Assistant

ChatGPT-like chatbot can be integrated with productivity tools such as calendars and to-do lists and serve as a virtual assistant. Such implementation will be more complex than the previous ones, as the calendars are more dynamic and change much quicker. Still, the idea behind it is the same: you provide information about events and to-do lists, and after it gets processed by a bot, you can ask questions.

Custom GPT chatbot as a Virtual Assistant
Custom GPT chatbot as a Virtual Assistant

As you can see from the example above, the OpenAI GPT model easily works with dates and times and can easily distinguish between finished and unfinished tasks.

How to make your own ChatGPT site or mobile application?

It’s time to apply the ideas we tested on the OpenAI playground to the real-world setting. ChatGPT’s chatbot feature is always a welcome addition to small businesses websites or mobile apps. Nevertheless, few of them can afford to hire experienced software developers. The simplest and most cost-effective way to do this is to use a no-code app maker. For our purpose, Appery.io is an excellent choice, as it already has a ChatGPT template that will make the integration even simpler. Besides, Appery has a trial subscription, so development won’t cost you anything.

To start using Appery.io, you need to create an account. You can use your email address or a social media account like Google or Facebook. Go to the apps page and click the “Create new app” button. Choose the ChatGPT template and confirm creating.

Appery.io create project screen
Appery.io create a project screen

You can test the template right away by clicking the TEST button. The interface and behavior are very similar to ChatGPT, but you need to set the parameters and OpenAI API key first. In our case, we don’t want to show those parameters, as we already tested them on the OpenAI playground and have decided on the best options. So, the first step will be deleting the Home page with parameter selections.

Delete the home page. We don’t need it.
Delete the home page. We don’t need it.

Next, we need to set up our GPT chatbot with the chosen parameters. For this, open the Storage tab on the Model and Storage page.

The most important setting here is the “context” storage variable, where we need to paste all the context we prepared for the chatbot. In the case of a veterinary clinic, this would be all the information from the website and the request to answer only using that information. The context should be enclosed in multiline quotes. You’ll find this symbol near number 1.

Ensure that the following parameters are set up:

  • temperature — set it to 0, so the chatbot will respond predictably.
  • model — leave it as ‘text-davinci-003’.
  • apikey — set it to your OpenAI API Key. Make sure you put it into quotes.
  • maxTokens — set the value to the maximum response size that you expect from the chatbot.
  • companionName — the name of the chat window where AI messages will appear.
Setting the GPT model parameters
Setting the GPT model parameters

If you want, you can proceed with customizing the chatbot UI but, actually, the main Chatbot functionality is ready and you can click the TEST button to review the app. As you can see, using the predefined template from Appery.io did not require any coding experience and getting ready ChatGPT-like app did not take much time.

Integrate your own ChatGPT to the website

Now, that our custom GPT chatbot is ready it’s time that we integrated it into our website.

There are two ways here. First — you can export the sources of this application with further integrating them into your website. The benefit of this approach is that you will not need to pay for the Appery.io subscription. You can just cancel it. But you will need extra technical expertise to do that and it’s out of the scope of this article.

So, let’s take a look at the simpler approach. In this case, we host the chatbot on Appery.io and then integrate it into the website using just one script.

The first step is to publish the chatbot to the web. Appery.io provides two publishing options: your own domain or the Appery.io domain. It doesn’t matter what option you choose as end users won’t see this domain. I recommend publishing on the Appery.io domain as this is a much simpler one-click option. All you need to do is to choose the unique name and click Publish.

Next, you need to add the bellow script snippet to your website:

<script>
var script = document.createElement('script');
script.type = 'text/javascript';
script.src = 'https://app.appery.io/aio_chat_widget.js';
script.onload = function() {
window.aioChatWidget.init({
frameUrl: "https://unique_name.app.appery.io/",
preload: true
});
}
document.head.appendChild(script);
</script>

This is it! Now you have your own ChatGPT chatbot for customer service on your website. Here is an example of what it will look like:

Custom ChatGPT integrated into website

You might want to customize this widget, so here are additional parameres you can pass to the aioChatWidget.init method:

  • buttonColor — color of the close button
  • buttonTextColor — color of the close button X symbol
  • buttonImgUrl — the URL for a custom chatbot icon
  • preload — whether the chatbot should be preloaded when a user opens the website page or loaded only after a user opens the chatbot itself. I recommend setting it to true.
  • autoOpen — delay in milliseconds until opening the chatbot. If it’s not set, the chatbot will be closed by default.
  • position — chat position on the page. Possible options: bottom_right, bottom_left, top_right, top_left. By default, it will be placed in the bottom right corner of the page.

Create your own ChatGPT mobile application

Appery.io is a no-code mobile application development platform where as a bonus, you can use the same project to create custom ChatGPT iOS and Android applications and thus save your development time.
Building for Android is very easy. Open the project, click Export on the top and choose Android binary. In several minutes, you will have an APK file that can be installed on your phone or uploaded to Google Play.
Building for iOS is more complicated as it is required that you get an Apple developer account. Although the process is somewhat longer than generating the project Android binary but not very complicated, and you can check this video for detailed instructions. In short, you will need to upload your Apple developer certificate (or generate a new one ) on the Resources tab, then update a couple of fields in the iOS binary tab in App settings, click on Export on the top, and then you can choose building the iOS binary.
But if you just want to review how your ChatGPT-like chatbot performs on the device, install the free Appery.io tester application: it’s available for both Android and iOS and very simple to use.

Review custom ChatGPT conversation history

This functionality comes as a bonus to the Appery.io template. As a business, you will definitely need to make sure the chatbot answers as you expected. So, you may want to review your customers’ questions. Appery.io automatically saves all conversations to a secure database linked to your account. The database is private by default, so only you have access to it. To open it, click on the Databases tab at the top and locate the database that starts with “ChatGPT”. In its Collections tab, there is the Conversations collection, where you can quickly review all the chatbot-customer dialogs.

Saved conversations in Appery.io UI

However, reviewing them like this can be inconvenient. Luckily, there is a simpler way: to export them and open them in a Google Sheets document for review. Let’s do it: open the Setting page and click Export to CSV. You will receive a backup of this database sent to your email address. Download this backup and unzip it somewhere. Then upload it to Google Drive. Before you can open it, Google will ask what application you want to use, so choose Google Sheets.

Open the CSV file in Google Sheets

Now, you can find all the dialogs in the conversation column, but all conversations are still shown in one line. To fix it, we will create a new column. Add this formula to the column on the right and extend it to all raws:

=SUBSTITUTE(E2,"\n","
")
Review chatbot customer questions in Google Sheets

In summary, developing your own chatbot using the powerful and sophisticated OpenAI GPT models is an excellent way for small businesses to automate their customer service interactions and save time and money. OpenAI allows you to create your own chatbot with no technical knowledge or expensive software developers. A ChatGPT-like chatbot can quickly be created by providing essential business information and setting up a few basic parameters, allowing your staff to handle more complex matters. By applying more creativity, ChatGPT can be customized to suit a variety of business requirements. By utilizing no-code platforms, such as Appery.io, you can integrate ChatGPT into existing websites and mobile applications.

--

--