|
<< Click to Display Table of Contents >> Navigation: 3. Script Language > AI - Artificial Intelligence Commands > AIU. - OpenAI API > !Operator Mode > AIU. - Artificial Intelligence Utility |
MiniRobotLanguage (MRL)
AIU.OperatorBeginSession
Initializes a new Operator session and its arrays.
Intention
The AIU.OperatorBeginSession command (aliased as AIU.Obs) is the starting point for using the advanced Operator Mode. This command prepares the necessary environment by designating three ARR arrays to manage the session's state: one for tool definitions, one for screen/session state, and one for the conversation history. It also populates the specified tools array with a powerful set of default, built-in tools like screen capture and file I/O.
It’s like setting up your robot’s workbench—AIU.OperatorBeginSession lays out all the tools and notebooks required for the AI to start a complex task.
Illustration
┌───────────────────────────────┐
│ AIU.OperatorBeginSession │
├──────────┬──────────┬─────────┤
│ ARR 1 │ ARR 2 │ ARR 3 │
├──────────┼──────────┼─────────┤
│ Tools │ State │ History │
│(Default) │(Empty) │(Empty) │
└──────────┴──────────┴─────────┘
Preparing the ARR arrays for an Operator session.
Syntax
AIU.OperatorBeginSession[|$$TLA|$$STA|$$HSA]
Parameter Explanation
P1 - $$TLA - (Variable, numeric, Optional)
The ARR array number to use for storing tool definitions. Defaults to 1 if omitted.
P2 - $$STA - (Variable, numeric, Optional)
The ARR array number to use for storing session state (e.g., screen resolution). Defaults to 2 if omitted.
P3 - $$HSA - (Variable, numeric, Optional)
The ARR array number to use for storing the conversation history. Defaults to 3 if omitted.
Examples
'***********************************
' AIU.OperatorBeginSession - Sample 1: Default Setup
'***********************************
' This will use ARR 1 for Tools, 2 for State, and 3 for History.
AIU.OperatorBeginSession
' You can now add a user prompt to the history array (ARR 3)
ARR.Add|3|user*Please open Notepad.
MBX.OK|Session initialized with default arrays.
END.
'***********************************
' AIU.OperatorBeginSession - Sample 2: Custom Array Setup
'***********************************
' Designate ARR 10, 11, and 12 for the session
AIU.OperatorBeginSession|10|11|12
' The default tools are now in ARR 10.
' We can add a custom tool to it.
VAR.$$TOL=my_custom_tool*Does something special*SUB:RunMyTool
AIU.OperatorAddTool|$$TOL
MBX.OK|Session initialized with custom arrays 10, 11, and 12.
END.
Remarks
- This command must be called before any other AIU.Operator* commands.
- It will clear any existing data in the specified Tools array and populate it with the default toolset.
- The State and History arrays are designated but left empty for the script to populate.
See also: