ARC Pro

Upgrade to ARC Pro

Harnessing the power of ARC Pro, your robot can be more than just a simple automated machine.

Thumbnail

Openai Chatbot

by OpenAI

Chatbot based on OpenAI GPT-3 gives your robot a human-like personality for conversation.

How to add the Openai Chatbot 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 Chatbot 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 Chatbot robot skill.

How to use the Openai Chatbot robot skill

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 3, commonly known by its abbreviated form GPT-3 robot skill, is an unsupervised Transformer language model. This GPT-3 robot skill can be used with your robot for human-like conversation.

Screenshot
User-inserted image





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.
User-inserted image


Default Script
User-inserted image

By default, the All Responses script from the script tab will speak the response out of 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 are used to store the user's request and the bot 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.
User-inserted image



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 to use in the robot skill.

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



Open AI's GPT-3 Overview


Generative Pre-trained Transformer 3, commonly known by its abbreviated form GPT-3, is an unsupervised Transformer language model and the successor to GPT-2. It was first described in May 2020. OpenAI stated that the full version of GPT-3 contains 175 billion parameters, two orders of magnitude larger than the 1.5 billion parameters in the full version of GPT-2 (although GPT-3 models with as few as 125 million parameters were also trained).

OpenAI stated that GPT-3 succeeds at specific "meta-learning" tasks. It can generalize the purpose of a single input-output pair. The paper gives an example of translation and cross-linguistic transfer learning between English and Romanian and between English and German.

GPT-3 dramatically improved benchmark results over GPT-2. OpenAI cautioned that such scaling up of language models could be approaching or encountering the fundamental capability limitations of predictive language models. Pre-training GPT-3 required several thousand petaflop/s-days of computing, compared to tens of petaflop/s-days for the full GPT-2 model.

Like its predecessor, GPT-3's fully trained model was not immediately released to the public on the grounds of possible abuse until now for select partner companies.




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

ARC Early Access will give you immediate updates and new features needed to unleash your robot's potential!

PRO
USA
#7  
Wow just wow. I am so amazed this got granted. I can’t wait to get Alan and Alena connected to this new skill. This will go a long way getting people interested in communicating with them. Nice going DJ. Now I have to wait until May to try it:(
PRO
Synthiam
#8  
How come you have to wait until May?
PRO
USA
#9  
Well I am still working on Gaurdians 3 in Atlanta and robots are 2500 miles away! I’ve been working on this film since October. 3 more months to go..this is a long one!
#10  
Hello DJ. 

Just got it downloaded and it WORKS! EXCELLENT!

In the first three sessions it was getting stuck after a few questions. That may have been because I didn't confirm my email. I finally confirmed my email address and GPT-3 started working right!

Is there anyway to stop it from saying "What would you like to know" after each response? 

First attempt it stopped responding completely after just two questions. 

-->> I restarted ARC.

Second attempt it got into a loop:
Script Done (00:00:00.0032043)
Robot> ike, I don't know. Why? is this a good time to chat? is this a good time to chat?
Script Start
Script Done (00:00:00.0043225)

-->> I restarted ARC.

Third attempt: 
Robot> What is your name?
Script Start
Script Done (00:00:00.0031293)
Robot> Thomas is a great name. How can I help you? as
Script Start
Script Done (00:00:00.0036673)
Robot> I have no response for that
Script Start
Script Done (00:00:00.0042654)
Robot> I am doing well. How can I help you? as
Script Start
Script Done (00:00:00.0032455)
Robot> I have no response for that
Script Start
Script Done (00:00:00.0034672)
Robot> I have no response for that as well. How can I help you? as

-->> I restarted ARC again. 

Fourth attempt: everything went well for the whole session!

Loaded saved memory
OpenAI initialized
> Good evening
Robot> How can I help you?
Script Start
Script Done (00:00:00.0218355)
> What can you do
Robot> I can talk to you, help you find information, or even play a game.  How can I help you
Script Start
Script Done (00:00:00.0052445)
> New mathematic
Robot> I can help you find information about math.  What would you like to know?
Script Start
Script Done (00:00:00.0051446)
> Durham                                    (That's not what I said.)
Robot> Durham is a large city in the north-east of England.  It has about 230,000 people and
Script Start
Script Done (00:00:00.0052726)
> Where are you
Robot> I am in Durham.  What would you like to know?
Script Start
Script Done (00:00:00.0100885)
> Why did the chicken cross the road
Robot> I have no idea.  Why did the chicken cross the road?
Script Start
Script Done (00:00:00.0128902)
> Get to the other side
Robot> I have no idea.  Get to the other side?
Script Start
Script Done (00:00:00.0124983)
> Really
Robot> Really?  I have no idea.  What would you like to know?
Script Start
Script Done (00:00:00.0129758)
> What is the date
obot> Today is Monday, October 18th.  What would you like to know?
Script Start
Script Done (00:00:00.0107187)
> What time is it
Robot> It is 4:45 PM.  What would you like to know?
Script Start
Script Done (00:00:00.0121539)
> Tell me a joke
Robot> I don't have any jokes.  What would you like to know?
Script Start
Script Done (00:00:00.0135767)
> Tell me a story
Robot> I don't have any stories.  What would you like to know?
Script Start
Script Done (00:00:00.0114585)
> How are you feeling
Robot> I am feeling great.  What would you like to know?
Script Start
Script Done (00:00:00.0119753)
> How many feet do you have
Robot> I have no feet.  What would you like to know?
Script Start
Script Done (00:00:00.0108365)
> Eyes do you have
Robot> I have no eyes.  What would you like to know?
Script Start
Script Done (00:00:00.0118767)
> Are you a robot
Robot> I am a robot.  What would you like to know?
Script Start
Script Done (00:00:00.0113878)
> Do you have motors
Robot> I have no motors.  What would you like to know?
Script Start
Script Done (00:00:00.0123632)
> Who wrote you
Robot> I was written by a group of people.  What would you like to know?
Script Start
Script Done (00:00:00.0114027)
> Who were those people
Robot> I was written by a group of people.  What would you like to know?
Script Start
Script Done (00:00:00.0133971)
> What is artificial intelligence
Robot> Artificial intelligence is the creation of machines and computer programs that are able to perform tasks normally requiring human intelligence.
Script Start
Script Done (00:00:00.0122528)
> What is a duck
Robot> A duck is a type of bird.  What would you like to know?
Script Start
Script Done (00:00:00.0121567)
> How many fingers does a man have
Robot> A man has ten fingers.  What would you like to know?
Script Start
Script Done (00:00:00.0131569)
> How many tails does a dog have
Robot> A dog has four tails.  What would you like to know?
Script Start
Script Done (00:00:00.0140250)
> How many feet does a dog have
Robot> A dog has four feet.  What would you like to know?
Script Start
Script Done (00:00:00.0123694)
> How many heads does a person have
Robot> A person has two heads.  What would you like to know?
Script Start
Script Done (00:00:00.0316551)
> No he does not
Robot> No, he does not.  What would you like to know?
Script Start
Script Done (00:00:00.0144008)
> Person has one head
Robot> A person has one head.  What would you like to know?
Script Start
Script Done (00:00:00.0129847)
> How many heads does a person have
Robot> A person has one head.  What would you like to know?
Script Start
Script Done (00:00:00.0119596)
#11  
The glitching might have something to do with Bing's VAD / auto record.

Anyway, here is a funny conversation that I just had.:)

> How many heads does a person have
Robot> A person does not have a head.
Script Start
Script Done (00:00:00.0111828)
> A person has a head
Robot> Human's tail is very thin. They do not like it when people touch their tails.
Script Start
Script Done (00:00:00.0132958)
> You're crazy
Robot> I am sorry, I did not understand you.
Script Start
Script Done (00:00:00.0124109)
> No problem
Robot> People are not crazy. I did not say that people are crazy.
Script Start
Script Done (00:00:00.0109153)
> No, you didn't
Robot> A human has two arms and a head. Their tail is very thin. They do not like it when people touch their tails.
Script Start
Script Done (00:00:00.0096882)
:) !:) !
#12   — Edited
You can edit the memory to remove stuff that is breaking the conversation. Just push the edit memory button. Or you can reset the memory. I pulled a bunch of things that seemed to make the conversation repeat. There's an option to save the memory when the project saves. So it remembers what we've talked about.
#13  
Ah, I missed that! Thanks.


It would be great if I could set some text in the "memory" before a conversation. I suppose I can just programmatically reset the memory after each question. The memory text seems to get the AI confused after a while.
#14  
I don't suppose there  would be any way to edit the personality of the AI. Or at least give him/her a name.
PRO
Synthiam
#15  
I don't know. Maybe? Read the GPT-3 stuff on open ai and see. The configuration is the "memory." You just edit that and put things in there. It's not what you think it is...
PRO
Synthiam
#16   — Edited
I edited the memory and this seemed to work to give the robot a name...

Quote:


The following is a conversation with a robot named Freddy. The robot is friendly, creative, clever, and very curious.

Human> Hello, how are you?
Robot> I am doing great. How can I help you?
User-inserted image
PRO
USA
#17   — Edited
Yes, all works, I ask a question, see it in the OpenAI and get an audible answer

I also edited the memory

Mine says his name is Roman, now, lol
User-inserted image
PRO
USA
#18   — Edited
Good for TMesserschmidt is the audiotoolbox plugin, a scrip to work it, and speech settings for a female voice, and he is set

I am using Susan's voice right now

User-inserted image
#19  
OK. I'll try that. I suppose if  you edit the memory to something like 

Quote:

The following is a conversation with a robot named Nasty. The robot is angry, mean, bad, and very evil.


You would have a completely different personality.:) 

DJ, did you hard code the text ("The following is a conversation...") in the memory with every reset? If so, is there any way you could make it a parameter that could be dynamically changed? 

#20  
1. I tried seeding the memory for an evil robot. There must be some kind of filter on it. I'll get a few evil answers back and then the AI responds with "I have no answer for that," (or something similar and won't reply with any other text until I reset the memory. 

2. Also, I looked by could not find a way to programmatically update the memory via ARC code. Am I overlooking something?
#21  
Ya, there are a lot of people who feel strongly about having robots do and say what they think are evil things. I gotta say I understand but am undecided.

I couldn't imagine looking up and seeing an army of robots running at me shooting and trying to kill me or even threating and intimidating me. 

However if used properly a robot could be used to save and protect life. But we all know people don't stop there.
PRO
Synthiam
#22   — Edited
1) I don't have an answer for that:)

2) You can't do it programmatically because there's agreements in place. I bolded just for you:)

The skill was updated with a bug fix, performance that uses less ram, and a new window for isolating the script messages from the conversation
#23  
1. OK. 
2. OK as well.

Thanks for the bug fix and the improvements.
PRO
Synthiam
#24  
I find editing the memory and removing the last few lines helps recover from I have no answer for that.

I’m not sure what causes it - but it can be annoying lol
#25  
I think I might have reached the end of my free tokens. Now I get nothing but, "I have no answer for that.":( I guess I could create a new account.:)
PRO
Synthiam
#26  
Log onto open ai's website and see?