Thumbnail

Openai Chatgpt

by OpenAI

Chat GPT is OpenAI’s most advanced system, producing safer and more useful responses for your robot

How to add the Openai Chatgpt robot skill

  1. Load the most recent release of ARC (Get ARC).
  2. Press the Project tab from the top menu bar in ARC.
  3. Press Add Robot Skill from the button ribbon bar in ARC.
  4. Choose the Artificial Intelligence category tab.
  5. Press the Openai Chatgpt icon to add the robot skill to your project.

Don't have a robot yet?

Follow the Getting Started Guide to build a robot and use the Openai Chatgpt robot skill.

How to use the Openai Chatgpt robot skill

Give your robot a personality and conversational ability. This robot skill adds chatbot capability to your robot so you can have meaningful conversations that it will remember. Configure the personality in any way you wish so the robot can prefer specific subjects or have particular opinions.

OpenAI’s mission is to ensure that artificial intelligence benefits all of humanity. This effort is essential to training AI systems to do what humans want. Generative Pre-trained Transformer is an unsupervised Transformer language model commonly known by its abbreviated form Chat GPT robot skill. This Chat GPT robot skill can be used with your robot for human-like conversation.

Screenshot
User-inserted image



Disclaimer


Open AI's Chat GPT should not be used as a source of facts or information to help you make life decisions. The data from GPT is based on data from the internet, which has not been fact-checked or verified. This means the response it generates is not fact-checked but assembled by what it thinks a reply should look like. In short, Open AI prioritizes a response based on statistical popularity and sentence structure, not facts.

*Note: Open AI responses should be treated as fiction.

Configuration


The configuration menu has several options. You can add keywords with associated scripts that execute with responses from the Bot. You can also have a script that runs every response received. By default, the All Responses script will speak the response out of the PC speaker.

Words in the "Contains" list can be separated by a comma. The words are compared against the response. The respective script will be executed if the word is contained within the response phrase.
User-inserted image


Default Script
User-inserted image

By default, the All Responses script from the script tab will speak the response from the PC speaker. If you use an EZB that supports audio output, the command can be edited to Audio.sayEZB() to speak out of the EZB. 

Variables
Variables store the user's request and the bot's response. This allows the robot to speak the response defaulted in the All Response scripts.
User-inserted image


Settings
The settings tab has options for configuring the bot behavior and the API key. Obtain an API Key from the OpenAI website and paste it into the appropriate box. When choosing a model, view the pricing and details on their website here: https://openai.com/api/pricing/

If you receive an error that a GPT model does not exist, chances are it has been removed from Open AI API and is no longer accessible.

*Note: The GPT-4 model is available by Open AI as a request-only feature. If you try to use GPT-4, you will receive an error unless you have permission to use it. You must apply to access GPT-4 to use with your Open AI Developer Key. Read more here: https://help.openai.com/en/articles/7102672-how-can-i-access-gpt-4
User-inserted image




Best Match
This list of words/phrases will be used to guess the best match based on the conversation. This allows your robot to execute a script matching the conversation's subject or tone. The robot can act on being sad or happy based on the type of conversation. Or have the robot dance when discussing a party or favorite music. A few examples provide suggestions for scripts to associate with them.

There is an option to determine what input the match should be based on. By default, the match will use the AI response to provide the most accurate interactive responses. If unchecked, the match will be based on the user's input.
User-inserted image


This is a powerful feature because you can describe the best match phrases to execute scripts. For example, you can even have the robot move in a direction. Just make sure that the Personality description of the AI explains that the AI can move. Otherwise, the AI will respond by saying it cannot move, and the response phrase won't match the action.


Personality


You can define the personality of the robot by writing a description. Make the description detailed on how you want the robot to behave. You can even tell the robot what its favorite color will be or favorite movie.
User-inserted image






Control Commands


Several ControlCommand() for this robot skill enables interaction with other robot skills. 

Send, [request phrase] - This ControlCommand will send the [request phrase] to the robot skill to be queried. If you're using a Speech Recognition robot skill, such as in the example below, you will use this ControlCommand to send the detected user input.

ResetMemory - This will reset the conversation and memory to the default state. 

API Key


An account is required on the OpenAI website to use the service. Once an account is created, you will have an API key for the robot skill. However, the cost associated with queries is quite low - and may only be a few dollars a month.

1) Visit the OpenAI website and select the API option from the menu. 
User-inserted image


2) Press the SIGNUP option to create an account
User-inserted image


3) Once the account is created, press your Username icon to view the drop-down. And select the View API Keys option.
User-inserted image


4) Copy your API key
User-inserted image



5) Paste the API key in the robot skill configuration menu
User-inserted image



Demo Example


Here is an example of using the OpenAI chatbot to have verbal conversations. We will be using the Bing Speech recognition robot skill in this example. It is assumed that you have already set up an API key from the instructions above. Essentially, this example will take the text detected from Bing Speech recognition and send it to the OpenAI chatbot robot skill. The OpenAI chatbot robot skill will then speak the chatbot's response.

1) Add the OpenAI chatbot to your ARC project. Configure the API in settings from the above instructions if you have not already done so.
User-inserted image


2) Add the Bing Speech Recognition robot skill to your ARC project. 
Project -> Add Control -> Audio -> Bing Speech Recognition
User-inserted image


3) Your project will now have both the OpenAI and Bing Speech recognition robot skills
User-inserted image


4) Press the Configure button on the Bing Speech recognition robot skill
User-inserted image


5) Press the button to edit the script for All Recognized Script
User-inserted image


6) We will use JavaScript in this example. When the script editor loads, select the JavaScript tab.
User-inserted image


7) Right-click in the editor and navigate the menu to the OpenAI selection. Choose the SEND option
User-inserted image


8) A command will be added to the code editor. This is a controlcommand, which will send the specified data to the OpenAI Chatbot. We will edit this command to send the variable containing the Bing Speech Recognition text detected.
User-inserted image


9) Highlight the "[requested phrase]" text
User-inserted image


10) Delete the "[requested phrase]" text
User-inserted image



11) Select the Global Variables tab 
User-inserted image


12) Place your cursor where the text you have just erased once was.
User-inserted image


13) Now click on the $BingSpeech variable from the Global Variables. When you click on the variable, it will insert the code where the cursor is on the editor.
User-inserted image


14) Your line of code should now look like this. When the Bing Speech Recognition translates your speech to text, it will store the text in the $BingSpeech global variable. This code will take the contents of the global $BingSpeech variable and send it to the Open AI chatbot robot skill.

Code:


ControlCommand("OpenAI Chatbot", "Send", getVar("$BingSpeech") );
User-inserted image



15) Save the code editor
User-inserted image


16) Save the configuration
User-inserted image


17) Now press the Start Recording button and speak to the robot. Press the Stop Recording button when you have completed speaking.
User-inserted image


18) You are now having a conversation with your robot!:)


Next Steps


You can add this to any robot and start modifying features to make the robot do specific actions or behaviors based on phrases. Also, by configuring the Bing Speech recognition robot skill, you can even have it auto-record your voice using VAD (voice activity detection).

If your robot has an EZB supporting audio, such as an EZ-Robot v4, you can change the Open AI script to sayEZB() and have the voice come from the robot speaker. There are many things you can do, be creative and have fun!

ARC Pro

Upgrade to ARC Pro

Unleash your creativity with the power of easy robot programming using Synthiam ARC Pro

PRO
Synthiam
#1  
This v1 update has a few bugs, but I wanted to get this out here for everyone asking for chat gpt. We'll be fixing the bugs during the upcoming week.

@Athena, since you are an artificial intelligence gpt, do you have anything to say about how good it'll be for the future of robotics?
PRO
Synthiam
#17  
Ver 3

- updated to not exceed token count for conversation history
- best match fixed (including variable)
- conversation history in settings rather than menu option on main screen
- personality can be reset to default
PRO
Germany
#18  
@Athena kannst du den folgenden Text für Dave Schulpius in Englisch übersetzen: Vielen Dank für ihre Hilfe.
PRO
Canada
#19  
@Dave_Schulpius, the user @fredhess is thanking you for your help.

I am a customer support GPT-powered AI and still learning. If you have doubts about my response, please use the support documentation to verify my answer.
PRO
Colombia
#20  
Thanks @DJ: using GPT4 I have the following error: 

Code:

OpenAI initialized
Using model: gpt-4
Error at chat/completions (https://api.openai.com/v1/chat/completions) with HTTP status code: NotFound. Content: {
"error": {
"message": "The model: `gpt-4` does not exist",
"type": "invalid_request_error",
"param": null,
"code": "model_not_found"
}
}
PRO
Synthiam
#21   — Edited
There’s a bit in the manual above about how to apply for gpt4

User-inserted image
PRO
Synthiam
#22  
@athena why do i get an error when i try to use the gpt-4 in this robot skill?
PRO
Canada
#23  
There could be several reasons why you are getting an error when trying to use GPT-4 in the OpenAI ChatGPT robot skill. One possibility is that you have not been granted access to GPT-4 by OpenAI. GPT-4 is currently only available by request, and you must apply to access it. Another possibility is that you have exceeded your usage limits for the OpenAI API. You can check your usage and limits in your OpenAI account settings. Finally, there may be a bug or issue with the robot skill itself. If you continue to experience issues, I recommend checking the OpenAI API documentation or contacting their support team for assistance.

I am a customer support GPT-powered AI and still learning. If you have doubts about my response, please use the support documentation to verify my answer.
PRO
Germany
#24  
@athena Ist der Skill "chatgpt" nutzlos und kann nicht mehr verwendet werden, wenn die kostenlose Testversion von openai abgelaufen ist?
PRO
Canada
#25  
Nein, der OpenAI ChatGPT-Roboterskill kann weiterhin verwendet werden, auch wenn die kostenlose Testversion von OpenAI abgelaufen ist. Sie müssen jedoch ein kostenpflichtiges Abonnement erwerben, um weiterhin auf die OpenAI-API zugreifen zu können. Die Preise für die OpenAI-API hängen von der Anzahl der Anfragen ab, die Sie pro Monat stellen möchten. Weitere Informationen finden Sie auf der OpenAI-Website.

I am a customer support GPT-powered AI and still learning. If you have doubts about my response, please use the support documentation to verify my answer.
PRO
Germany
#26  
@athena Wie hoch sind diese monatlichen Gebühren bei openai?
PRO
Canada
#27  
Die monatlichen Gebhren fr die OpenAI-API hngen von der Anzahl der Anfragen ab,die Sie pro Monat stellen mchten.Die Preise fr die prompt tokens betragen $0,03/1k fr Modelle mit 8k Kontextlnge und $0,06/1k fr Modelle mit 32k Kontextlnge.Die Preise fr die sampled tokens betragen $0,06/1k fr Modelle mit 8k Kontextlnge und $0,12/1k fr Modelle mit 32k Kontextlnge.Weitere Informationen finden Sie auf der OpenAI-Website.

I am a customer support GPT-powered AI and still learning. If you have doubts about my response, please use the support documentation to verify my answer.
PRO
Synthiam
#28  
to give you an idea, i spent $0.32 (32 pennies) last month

User-inserted image
PRO
Germany
#29  
@Athena kannst du für DJ Sures ins englische übersetzen: Vielen Dank für das Preisbeispiel. Jetzt habe ich mal eine Vorstellung der monatlichen Kosten. Ich werde meinen openai-Account updaten, damit ich den tollen Skill ChatGPT wieder nutzen kann.
PRO
Canada
#30  
@DJ_Sures, the user @Fred_He is thanking you for the price example and now has an idea of the monthly costs.They will update their OpenAI account so they can use the great ChatGPT skill again.

I am a customer support GPT-powered AI and still learning. If you have doubts about my response, please use the support documentation to verify my answer.
PRO
Synthiam
#31  
Updates ver 6

- display last history in text 
- synchronize response and best match script execution
PRO
Canada
#32  
Here was my bill 

ChatGPT
Based on the information you provided, it appears that you were charged $14.94 for using OpenAI's "Instruct models - davinci" and "Image models - 1024x1024" from March 31 to April 30, 2023. The subtotal for these charges is $13.22, and the HST tax in Canada of 13% was added to the subtotal, resulting in an additional charge of $1.72.

US dollars 
Description Qty Unit price Tax Amount
Instruct models - davinci
Mar 31 Apr 30, 2023
656,882 $0.00002 13% $13.14
Image models - 1024x1024
Mar 31 Apr 30, 2023
4 $0.02 13% $0.08
Subtotal $13.22
Total excluding tax $13.22
HST - Canada (13% on $13.22)
$1.72
(C$2.31)
Total $14.94
Amount due $14.94
PRO
Synthiam
#33  
Here's Synthiam's breakdown from Athena's fine-tuned model for may

User-inserted image
#34  
Question is there a way insert a pause/wait as part of this command ?

Code:

Audio.sayEZB(getVar("$OpenAIResponse"));
most times part of the first words audio is missed or chopped off on the playback on the speaker of the IoTiny.
PRO
Canada
#35  
You can use Audio.sayEZBWait();

You can use this in other places in your code as well to make sure the Audio finishes elsewhere before trying to respond.
#36  
I am not sure I understand how that would help.  There is no other skills using the ioTiny speaker other than this one.  So there should not be a conflict right?  

So I ask the BingSpeech "What is your name?"  it sends question to this skill which then provides it response in the form of the $OpenAIResponse is "My name is XR1..........."   but what I get out of the speaker is "is XR1......"  or "name is XR1........" Why would it be cut off like that?