AI - Direct Access

<< Click to Display Table of Contents >>

Navigation:  3. Script Language > AI - Artificial Intelligence Commands > AIC. - Artificial Intelligence Command > AI - Direct Access >

AI - Direct Access

AIC.Get Several

Previous Top Next


MiniRobotLanguage (MRL)

 

AIC.Get Several
Set the Amount of alternative results you want to have generated.

clip0667

 

This command gives you access to many important "inner values" of the AI Engines.

 

Intention

 

The AIC.Get Several command in the Smart-Package Robot (SPR) allows users to get several internal AI-Values. For this the first Parameter P1 is a number that defines, which value will be returned.

 

0  -  AI_Last_A - The last Answer from the AI. In case of multiple Answers, this is only the last Answer.

1  -  AI_Last_Q -The last Prompt sent to the AI.

2  -  AI_All - The complete history of Answers and Questions.

3  -  AI_Return - This is the Result of the last Operation, in RAW Format. In case of problems, this will often contain something useful.

4  -  AIO_HTTP_Status This is the Result of the last http:// Operation, in RAW Format. In case of problems, this will often contain something useful.

5  -  AIO_Model This will return the effectively used Model that has been used in the last Operation.

6  -  AIO_Choices This will return the number of choices returned from the last AI-Operation no matter if Open AI or GPT4All..

7  -  Infostring This will return the InfoString Output from Stable Diffusion.

       -  AI_Model This is the Model for ChatGPT.                

       -  AI_SBody  This is the last JSON Structure that was sent as Chat-Input

10 -  AIO_Error  This is the last Error that was registered inside the System.

11 -  NegPrompt This is the internal Register for the negative Prompt

12 -  PosPrompt This is the internal Register for the Positive Prompt

13 -  AIW_Text This is a Textual Return.

14 -  AIO_ID This is a Return from the Vision Model. Looks like this: "chatcmpl-8IwIipyemyAFUuCVgE2RjoIp4Bo5G".

15 -  AIO_Object This is a Return from the Vision Model. Looks like this: "chat.completion".

16 -  AI_Vision_Model This is the current used Model for GPT4-Vision

17 -  AI_TTS_Model This is is the currently used OpenAI Text to Speech Model.

18 -  Vision_Endpoint This is is the currently used OpenAI Vision Endpoint

19 -  TTS_Endpoint This is is the currently used OpenAI TTS-Endpoint

20 -  AI_TTS_Voice This is is the currently used OpenAI TTS-Voice

21 -  AI_TTS_Format This is is the currently used OpenAI TTS-Output Format

 

 

 Changes:

 

08 was: AI_CNT This is the Counter for the number of History Entries. Moved to AIC.Get Any Value

 

Syntax:

 

AIC.Get Several|<Number>|<Variable for Result>

 

 

Example Usage:

AIC.Get Several|5|$$MOD

 

This example gets the name of the Model that was effectively used during the last AI Operation.

 

 

 

Syntax

 

 

AIC.Get Several|P1[|P2]

AIC.GTS|P1[|P2]

 

 

Parameter Explanation

 
P1 - <Number>: An integer from the values see Table above.

 

P2 - opt. <Variable for Result>: A variable that will receive the result of the Operation. If omitted TOS is used.

 

 

 

Example

 

'*****************************************************

' EXAMPLE 1: AIC.-Commands

'*****************************************************

$$LOG=?exeloc\Output.txt

DEL.$$LOG

$$WOA="GTO.JMP.JNJ.JNF.GSB.JSR.JIV.JIZ.JNZ.PRR.JLE.JME.JRR.JIT.JNT.JIS.JIE.VBS.JNS.JRS.JNR.PWS.JNP.JFP.JTP.JTN.JIO.JNO.JAC.JNC."

     '"GSB.GTO.JAC.JFP.JIE.JIO.JIS.JIT.JIV.JIZ.JLE.JME.JMP.JNC.JNF.JNJ.JNO.JNP.JNR.JNS.JNT.JNZ.JRR.JRS.JSR.JTN.JTP.PRR.PWS.VBS."

GSC.$$WOA|.|$$ANZ

GSB.Write_Log|SPR counted: $$ANZ Elements.$crlf$------------------------------$crlf$

 

FOR.$$NUM|1|7

  AIC.Set MaxToken|1024 

  GSB.Lab_SetModel

  AIC.SetModel|$$MOD

  AIC.Set Number|2

  AIC.Set Temperatur|1

  

  GSB.Write_Log|Model: $$MOD

  $$TXT=Act as my Assistant.

  $$TXT Below is a Line with a a number of words that are each 3 letters ending with a Dot.

  $$TXT Tell me how many words are in there.$crlf$ 

  $$TXT Do not generate code. Do not repeat yourself. Use english language.

  $$TXT Sort these words alphabetically step by step, and show me the  result.$crlf$  

  $$TXT $$WOA

  IVV.$$NUM>6

    GSB.Call_GPT     

  ELS.

    AIC.Ask GPT4All|$$TXT|$$RET

  EIF.

  GSB.Write_Log|$$RET

  AIC.Get Several|5|$$RAW

  GSB.Write_Log|Used Model: $$RAW

  DBP.---------------------

NEX.

 

ENR.

'-----------------------------------------------------------

:Lab_SetModel

SCS.$$NUM

CAN.1

  $$MOD=Wizard Uncensored

CAN.2

  $$MOD=Hermes  

CAN.3

  $$MOD=Snoozy  

CAN.4

  $$MOD=Replit  

CAN.5

  $$MOD=Nous Vicuna

CAN.6

  $$MOD=Groovy

'CAN.7

'  $$MOD=ChatGPT-3.5 Turbo

'CAN.8

'  $$MOD=ChatGPT-4  

CAE.

  $$MOD=$$MOD

ESC.

RET.

'-----------------------------------------------------------

:Write_Log

VAV.$$OUT=§§_01$crlf$

ATF.$$LOG|$$OUT

DBP.$$OUT

RET.

'-----------------------------------------------------------

' We do this separate as the other way sometime4s the GUI seems to crash.

'-----------------------------------------------------------

:Call_GPT

$$MOD=gpt-3.5-turbo-0613

AIC.SetKey|File

AIC.SetModel_Chat|1

AIC.Ask_Chat|$$TXT|$$RET

RET.

'-----------------------------------------------------------

ENR.

 

 

Remarks

-

 

Limitations:

-

 

 

See also:

 

  Set_Key

  Ask_Chat

  Ask_Completion