Ask AI Commands

<< Click to Display Table of Contents >>

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

Ask AI Commands

AIC.Ask Edit

Previous Top Next


MiniRobotLanguage (MRL)

 

AIC.Ask Edit
Let AI do the text-corrections for you.

 

 

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.Ask Edit command 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.

 

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 fpr Text, and one is for Code, mainly Python, C++ etc.
The usage is very cheap compared to the stae-o-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 it comes 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,

Text completion,

Text corrections

very cheap, but nobody knows. :-)

Suitable used for correcting errors in text, such as grammar and spelling.

code-davinci-edit-001

Code editing,

code generation,

code review.
Used in Github-Copilot.

very cheap, but nobody knows. :-)

Used for editing code through the edits endpoint. This means, rather than just completing code, it can be used to edit existing code. When using this model, you provide some code along with instructions for how it should be modified, and the model will attempt to make the edits accordingly.

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

 

' Set Model to Text ("0"), ("1") would be Code.

AIC.SetModel_Edit|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. 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:

 

  Ask AI Commands