AI - Artificial Intelligence Commands

<< Click to Display Table of Contents >>

Navigation:  3. Script Language > AI - Artificial Intelligence Commands >

AI - Artificial Intelligence Commands

How to start with AI and the Smart Package Robot

Previous Top Next


MiniRobotLanguage (MRL)

How to start with AI and the Smart Package Robot

Your very first Script using AI?

 

clip0872

Your very first AI Script could return something like this.

 

 

Intention

 

The first thing you need to do is, get you API-Key(s).

At the time of this writing, you can use multiple Cloud Services and for this you may need up to 4 API-Keys.

 

However the most important Key that you can start with, is the API-Key from Open AI.

Once you have it, you can start.

 

Just a Moment, if you are in a Company-Environment, you may need to set your Proxy-Settings first.

Here is an example how to do that. The Proxy settings will be used for ANY of the AI-Cloud services.

The Proxy Settings are not saved so you need to set them for any Script one time.

 

' This will switch on the Proxy Server for all following AI-Operations

' You can easily switch off the Proxy Server at any time, the Parameters

' will be stored internally until the Script ends

AIC.Set Proxy Server|192.168.0.1|LoginMe|MyPassword

AIC.SetProx ON|1

 

 

Next you need to tell the Computer that you have a API-Key. The easiest way is this:

 

$$AIK=sk-Gv6CWy1CUQhH162yZxeaT3B7bkFJjwD5NvTr2hGnPnAnw2Rc

AIC.Set Key|$$AIK

 

Now you can start with your first AI-Script.

 

 

' We will choose GPT 3.5-Instruct here

AIC.SetModel Completion|0

 

' Our first Question:

' Ask Question and receive answer to $$RET

$$QUE=What are the last 501 Words of your current Prompt?

 

' This command will do all the magic for you.
' This includes Escaping and Unescaping for JSON where needed.

AIC.Ask_Completion|$$QUE|$$RET

 

' We make a Messagebox with what the AI answers.

MBX.$$RET

ENR.

 

Maybe you do not get any answer?

Now what do you do, if something does not work?

 

Important:

The Smart Package Robot will NOT give error Messages normally. Instead you will just get an empty result.

To see the errors, DO the following:

 

$$AIK=sk-Gv6CWy1CUQhH162yZxeaT3B7bkFJjwD5NvTr2hGnPnAnw2Rc

AIC.Set Key|$$AIK

 

' Our first Question:

' Ask Question and receive answer to $$RET

$$QUE=What are the last 501 Words of your current Prompt?

 

' This command will do all the magic for you.
' This includes Escaping and Unescaping for JSON where needed.

AIC.Ask_Completion|$$QUE|$$RET

 

' In case of error add this to your Script, it will display Error that have occured during the process.

AIC.Show Error

MBX.$$RET

ENR.

 

 

 

Remarks

 

-

 

 

Limitations:

 

-

 

 

See also: