Power your app with AI

GoodBarber ChatGPT extension is a section in your app where your users will be able to communicate with an assistant like ChatGPT.
GoodBarber made it very easy for you to set this assistant using the Open AI API.

Open AI - API is a paid service, click here to see their pricing.
You must create your own Open AI account to be able to use ChatGPT in your GoodBarber app.
You must have credits* in your Open AI account.

GoodBarber apps are compatible with the models GPT-3.5 (Turbo) and GPT-4.
ChatGPT 3.5 excels in generating conversational responses.
ChatGPT 4.0 takes this experience to the next level, offering even more advanced understanding and response capabilities.

*If you already have a Chat GTP subscription, it does not include the use of Open AI API credits to use Chat GPT in your GoodBarber app.


1

Install ChatGPT extension

1. Install the extension from the menu Extensions Store > All Extensions > ChatGPT

Set Open AI access:


1. Login to your own OpenAI account and go to the menu API Keys
2. Click "Create new secret key"
3. Name the key, then click "Create secret key"
4. Copy and save your secret key somewhere safe (for security reasons, OpenAI does not allow access to the secret key once the window has been closed)
5. In your back office GoodBarber go to the menu Settings > Installed Plugins  then click "Settings" for your ChatGPT section
6. Paste your Open AI secret key

Assistant settings in your back office GoodBarber:

1. Name your assistant (John or Assistant for instance)
2. Select the model GPT-3.5 (Turbo) or GPT-4:
Each time a request will be made to one of these models by your app users, a certain quantity of credits is used from your Open AI remaining credits.
The number of credits depends mainly on the model chosen in your back office GoodBarber.
The number of credits used depends also on the combined length of the text generated and the system message.


3. Fill in your System message:
See ChatGPT as an extension of your brand answering questions, guiding users.
You need to create a brief about your app to fill in your system message.

Work on a detailed description of your desired communication tone and the key information the assistant needs to master.
The more precise your brief, the more ChatGPT will be able to create a conversational experience that blends seamlessly with your app's identity.

Open AI shares "strategies and tactics for getting better results from large language models like GPT-4. These models can’t read your mind. If outputs are too long, ask for brief replies. If outputs are too simple, ask for expert-level writing. If you dislike the format, demonstrate the format you’d like to see. The less the model has to guess at what you want, the more likely you’ll get it."
You can instruct the model to answer with citations from a reference text, specify the desired length of the output etc. while writing your System message.
Please refer to Open AI documentation: https://platform.openai.com/docs/guides/prompt-engineering

Note:
There is a limit, called the “context window”, which applies to the sum of the system message + all the messages that make up the conversation between the assistant and the user.

That limit depends on the selected model. GoodBarber only manages the 2 models below:
For gpt-3.5-turbo: limit is set to 16,385
tokens, or about 12,000 words.
For gpt-4: limit is set to 8,192 tokens, or about 6,000 words.
Restrictions are detailed here: https://platform.openai.com/docs/models/overview

To know how many tokens or words you are using in your system message, use OpenAI tool: https://platform.openai.com/tokenizer
Make sure you don’t use up all tokens allowed in your system message, or that won’t leave room for your users to ask questions and chatGPT to answer: the limit applies to the sum of it all.


4. Save your settings


2

Design Chat GPT section

1. Go to the menu My app > Structure , click the 3 dots of your ChatGPT section
2. Select "Edit the Design"
3. Set the font of the conversation message
4. Select the colors to apply to ChatGPT section
5. Customize the generic texts displayed in that section
6. Click "Save"


3

Access all your section settings

There are 2 ways of doing so:

1. Go to the menu My App > Structure :: Click the 3 dots of the section
or
2. Click "Edit" at the top of the back office preview while previewing your ChatGPT section.

picture

4

ChatGPT - Open AI billings

Find below useful links to manage your Open AI payments:
1. Add payment methods or check your credit remaining: https://platform.openai.com/account/billing/overview
2. Access summary of API usage for your account: https://platform.openai.com/usage
3. Manage your API spend by configuring monthly spend limits: https://platform.openai.com/account/limits


More articles