|
<< Click to Display Table of Contents >> Navigation: 3. Script Language > AI - Artificial Intelligence Commands > AIU. - OpenAI API > !Session and Storage Management > AIU. - Artificial Intelligence Utility |
MiniRobotLanguage (MRL)
AIU.GetStore
Retrieve the Current Store Configuration
Intention
GetStore Command: Verify Response Storage
The GetStore command retrieves the current store configuration set for managing AI responses.
This allows you to confirm or utilize the store setting in your script.
It’s part of the AIU - OpenAI API suite.
The GetStore command returns the current store configuration set by AIU.SetStore, or an empty string if unset.
The result is returned as a string to an optional variable or the Top of Stack (TOS). It reflects metadata used with AIU.Responses, with no direct impact on response content or token costs.
Retrieving the store configuration is valuable for:
•Verification: Confirm the store ID before performing response-related operations.
•Logic: Use the store setting in script conditions or logging.
•Debugging: Ensure the correct store is associated with response handling.
Call the command with an optional variable to store the result; if omitted, the value is pushed to the stack.
It’s tied to AIU.Responses, with negligible token cost impact (e.g., gpt-4o-mini: $0.60/1M output tokens).
Example Usage
AIU.SetStore|store456
AIU.GetStore|$$STR
DBP.Current Store: $$STR
Sets the store to "store456" and retrieves it, storing "store456" in $$STR.
Illustration
┌──────────────┬──────────────┐
│ Set Store │ Retrieved │
├──────────────┼──────────────┤
│ store456 │ store456 │
├──────────────┼──────────────┤
│ (unset) │ "" │
└──────────────┴──────────────┘
Illustration of retrieving the store configuration, including unset state.
Syntax
AIU.GetStore[|P1]
AIU.Get_Store[|P1]
Parameter Explanation
P1 - (Optional) The variable where the store configuration is stored. If omitted, the value is placed on the Top of Stack (TOS).
Example
AIU.SetStore|store789
AIU.GetStore|$$CFG
DBP.Store Config: $$CFG
ENR.
Remarks
- Returns an empty string ("") if no store configuration is set.
- Reflects the last value set by AIU.SetStore in the session.
Limitations
- Accepts zero or one parameter; extra parameters trigger an error (%IC_ER_PA).
- Does not validate the store configuration’s existence or compatibility.
See also: