AIC. - Artificial Intelligence Command

<< Click to Display Table of Contents >>

Navigation:  3. Script Language > AI - Artificial Intelligence Commands > AIC. - Artificial Intelligence Command > AI - Set Parameters >

AIC. - Artificial Intelligence Command

AIC.Set Number

Previous Top Next


MiniRobotLanguage (MRL)

 

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

 

clip0682

 

Intention

 

The AIC.Set Number command in the Smart-Package Robot (SPR) allows users to set the number of outputs to be generated when using OpenAI endpoints.
This command is versatile and can be used across all OpenAI endpoints, including:

text generation,

image generation,

and more.

Setting the number of outputs is particularly useful when you want to generate multiple variations of content based on a single prompt.

 

Syntax:

 

AIC.Set Number|<Number>

 

Parameters:

<Number>: An integer value representing the number of outputs you want to generate. This number should be greater than or equal to 1.
Note that setting a very high number may have cost implications and might be subject to rate limits imposed by the OpenAI API.

 

Example Usage:

AIC.Set Number|5

 

This example sets the number of outputs to be generated to 5. This means that when you issue a command to generate content (e.g., text, images), it will produce 5 different outputs.

 

Important Considerations:

Costs: Generating multiple outputs might have cost implications. OpenAI may charge based on the number of tokens (for text) or images generated. Be sure to understand the pricing structure of the OpenAI API to avoid unexpected charges.

 

Rate Limits: OpenAI imposes rate limits on its API. Generating a large number of outputs in a short time frame might cause you to hit these rate limits. It is recommended to check the OpenAI documentation for the latest information on rate limits.

 

Quality of Outputs: Generating a higher number of outputs might give you more options to choose from, but it’s important to keep in mind that not all outputs will necessarily meet the desired quality or relevance. Review the generated content carefully.

 

 

' Set OpenAI API-Key from the saved File

AIC.SetKey|File

 

' This will make the AI to generate 3 Pictures

AIC.SetNumber|5

' Can be 256 or 512 or 1024

AIC.Set Image Size|256

$$TXT=Chessboard with a golden and silver figures in an galactic atmosphere. 

AIC.Generate Image|$$TXT

ENR.

 

 

Syntax

 

 

AIC.Set Number|P1

AIC.SNB[|P1]

 

 

Parameter Explanation

 
P1 - opt. Variable or numeric value, this is the number of alternative results, the AI should produce.  

 

 

Example

 

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

' EXAMPLE 1: AIC.-Commands

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

' Set OpenAI API-Key from the saved File

AIC.SetKey|File

 

' Set Model

AIC.SetModel_Completion|4

 

' Set Model-Temperature

AIC.Set_Temperature|0

 

' Set Max-Tokens (Possible lenght of answer, depending on the Model up to 2000 Tokens which is about ~6000 characters)

' The more Tokens you use the more you need to pay.

AIC.SetMax_Token|25

 

' We will create 4 alternative answers

AIC.Set Number|4

 

' Ask Question and receive answer to $$RET

AIC.Ask_Completion|What is a "Windows Button"?|$$RET

MBX.$$RET

 

:enx

ENR.

 

 

Remarks

-

 

Limitations:

-

 

 

See also:

 

  Set_Key

  Ask_Chat

  Ask_Completion