Set Model Commands

<< Click to Display Table of Contents >>

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

Set Model Commands

AIC.Set Model Edit

Previous Top Next


MiniRobotLanguage (MRL)

 

AIC.Set Model Edit
Choose one of 2 Models available for Text-Editing.

 

clip0601

In this Sample you can see that the AI will do corrections in Texts much better then normal Spellcheckers.

 

 

clip0602

You can also have the AI remove or add words or Sentences.

 

Intention

 

The AIC.Set Model Edit-Command works together with the AIC.Ask Edit command, which is a specialized command that is used in conjunction with the OpenAI Edits Endpoint. It is specifically designed for scenarios where you need the AI to make modifications to an existing piece of text, based on certain instructions.

There will be changes in the Model, beginning 2024. For details see here (Open AI Blog)..

 

Usage

AIC.Ask Edit|<Instruction>|<Text to be changed>

 

This command takes two parameters:

 

1. Instruction

This is the first parameter and should be a clear and concise directive on what kind of edit or modification needs to be done to the text.

 

Example: If you want the AI to remove mistakes from the text, the instruction could be "Remove mistakes".

 

2. Text to be changed

This is the second parameter and should be the original text that you want the AI to modify based on the instruction provided.

 

Example: "Theres mistakes in this sentense, which needs correction."

 

Full Example

$$TXT=Theres mistakes in this sentense, which needs correction.

AIC.Ask Edit|Remove mistakes|$$TXT

 

In this example, the command is instructing the AI to remove mistakes from the text in $$TXT.
The Result of the Operation will also be in $$TXT. Please note that the Edits-Endpoint is rather slow in Operation.

 

Notes

It is important to ensure that the instruction is clear, as ambiguous instructions may result in unexpected edits.

The text to be changed should be well-structured to make sure that the AI understands the context properly.

The command and the parameters are separated by a vertical bar |. This is crucial for the command to be processed correctly.

Use the AIC.Ask Edit command when you need the AI to perform specific editing tasks, and always ensure that your instructions are clear and the text is contextual for the best results.

 

Important Note:
For this command, only 2 Models can be used. One is for Text, and one is for Code, mainly Python, C++ etc.
The usage is very cheap compared to the state-of-the-art Models.

Yet, the results are limited to some degree.

You can not ask for a "Rewrite as if you are Shakespear". This is something that you can get from the "chat-endpoint" models,

yet these come at a much higher price.

 

If you fail to set these Models prior to calling the AIC.Ask Edit command, then you will not get an result.

Because the command will not change the Model it self.

 

These two Models are:

Model Name

Use Case

Cost (per token)

Usage

text-davinci-edit-001

Text editing, summarization, paraphrasing

very cheap, but nobody knows. :-)

Suitable for natural language processing tasks like editing, summarizing or paraphrasing text.

code-davinci-edit-001

Code editing, code generation, code review

very cheap, but nobody knows. :-)

Suitable for code-related tasks such as editing code, generating code snippets, or reviewing code for errors or improvements.

Please note that the cost per token might change and it is best to check the OpenAI pricing page for the most up-to-date information.

 

 

 

' Usage for Ask-Edits
' Set OpenAI API-Key from the saved File

AIC.SetKey|File

 

' ("1") - Set Model to Text,

' ("2") - Set for Code, 

' from 2024 choose ("3") that is "GPT 3.5".

AIC.SetModel_Edit|1

 

' 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. But the longer Input and Output can be.

AIC.SetMax_Token|300

 

$$TXT=Hey, what's up? Just checking in. Ply the gme as a mathatiian. Do it step-by-steck. 

AIC.Ask Edit|Remove Mistakes. Delete first sentence. |$$TXT

 

' Get the Result

MBX.$$TXT 

ENR.

 

 

 

 

 

Syntax

 

 

AIC.Ask Edit|P1|P2

AIC.ase|P1|P2

 

 

Parameter Explanation

 
P1 - opt. Variable with Instructions what to do. If omitted the default Instruction is "Remove typing mistakes"

P2 - Variable with Text, and also will receive the corrected Result. Can not be omitted.

 

 

Example

 

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

' EXAMPLE 1: AIC.-Commands

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

' Set OpenAI API-Key from the saved File

AIC.SetKey|File

 

' 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. But the longer Input and Output can be.

AIC.SetMax_Token|300

 

' Set Model

AIC.SetModel_Edit|0

 

$$TXT=Hey, what's up? Just checking in. Ply the gme as a mathatiian. Do it step-by-steck. 

AIC.Ask Edit|Remove Mistakes. Delete first sentence.|$$TXT

MBX.$$TXT 

 

' See the Original Output of the Command (JSON Format).

' This is useful in case of Errors.

AIC.gro|$$ROW

MBX.$$ROW

ENR.

 

 

 

Remarks

-

 

Limitations:

-

 

 

See also:

 

  DMP. Dump System Values