AIX. - Grok / X - API

<< Click to Display Table of Contents >>

Navigation:  3. Script Language > AI - Artificial Intelligence Commands > AIX. - Grok / X - API > !Response Behavior Settings >

AIX. - Grok / X - API

AIX.GetStop

Previous Top Next


MiniRobotLanguage (MRL)

 

AIX.Get Stop
Retrieve the Current Stop Sequence

 

Intention

 

GetStop Command: Checking Stop Sequence
 
The Get Stop command retrieves the current stop sequence setting stored in AIX_Stop, used to terminate Grok’s response generation.

This helps verify or adjust the configuration.

It’s part of the AIX - Grok / X - API suite.

 

What is the GetStop Command?

 

The Get Stop command returns the current value of AIX_Stop, which defines the sequence(s) that halt response generation.

The default is an empty sequence unless set by AIX.Set Stop.

 

Why Do You Need It?

 

Retrieving the stop sequence is useful for:

Verification: Confirm the current stop sequence before querying.

Debugging: Check why responses terminate at specific points.

Scripting: Use the sequence in conditional logic.

 

How to Use the GetStop Command?

 

Call the command with an optional variable to store the result.

The value can be a string or JSON array, accessible via AIX_Stop if no variable is specified.

 

Example Usage

 

AIX.Set Stop|"END"

AIX.Get Stop|$$STP

DBP.Stop Sequence: $$STP

 

Returns "END" as the current stop sequence.

 

Illustration

 

┌───────────────┐

│ AIX_Stop      │

├───────────────┤

│ "END"         │

└───────────────┘

Retrieving the current stop sequence.

 

Syntax

 

AIX.GetStop[|P1]

AIX.Get Stop[|P1]

 

Parameter Explanation

 

P1 - (Optional) The variable to store the retrieved stop sequence. If omitted, the value remains in AIX_Stop.

 

Example

 

AIX.Set Stop|["STOP","END"]

AIX.Get Stop|$$SEQ

DBP.Stop Sequence: $$SEQ

ENR.

 

Remarks

 

- Default is an empty sequence unless set by AIX.Set Stop.

- Used in AIX.Ask to terminate responses.

 

Limitations

 

- Only retrieves the current setting; does not validate its effectiveness.

- May not work if the stop sequence is filtered or ignored by Grok.

 

See also:

 

AIX.Set Stop

AIX.Ask

AIX.Set MaxToken

AIX.Get Content