AIU. - Artificial Intelligence Utility

<< Click to Display Table of Contents >>

Navigation:  3. Script Language > AI - Artificial Intelligence Commands > AIU. - OpenAI API > !Folder Management >

AIU. - Artificial Intelligence Utility

AIU.GetFolder

Previous Top Next


MiniRobotLanguage (MRL)

 

AIU.GetFolder
Retrieve Current AIU Folder Path

 

Intention

 

GetFolder Command: Retrieving the Current AIU Folder Path
 
The GetFolder command retrieves the current folder path used by the AIU system for file operations, such as saving API keys.

This is useful for verifying or utilizing the folder location in your scripts.

It’s part of the AIU - OpenAI API suite.

 

What is the GetFolder Command?

 

The GetFolder command fetches the current value of the AIU_Folder, which is the default directory for AIU file operations.

You can store this path in a variable or, if no variable is specified, it will be placed on the Top of Stack (TOS).

 

Why Do You Need It?

 

Retrieving the AIU folder path is valuable for:

Verification: Confirm the default location where files (e.g., API keys) are stored.

File Operations: Use the path for reading or writing files in scripts.

Debugging: Ensure the folder aligns with your script’s expectations.

 

How to Use the GetFolder Command?

 

The command can be called with or without a variable to store the result.

By default, AIU_Folder is set to ?exeloc\AIU_Folder\ unless changed via AIU.SetFolder.

 

Example Usage

 

AIU.GetFolder|$$FOL

DBP.Current AIU Folder: $$FOL

AIU.GetFolder

POP.$$FOL

DBP.Current AIU Folder from Stack: $$FOL

 

The returned path always ends with a backslash (\).

 

Illustration

 

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

│ AIU_Folder    │

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

│ ?exeloc\...   │

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

A simple representation of retrieving the AIU_Folder path.

 

Syntax

 

AIU.GetFolder[|P1]

AIU.Get_Folder[|P1]

 

Parameter Explanation

 

P1 - (Optional) The variable where the folder path will be stored. If omitted, the path is placed on the Top of Stack (TOS).

 

Example

 

AIU.GetFolder|$$PAT

DBP.AIU Folder: $$PAT

AIU.GetFolder

POP.$$STA

DBP.Stack Retrieved Folder: $$STA

ENR.

 

Remarks

 

- The default folder is initialized to ?exeloc\AIU_Folder\ unless modified by AIU.SetFolder.

- The returned path always includes a trailing backslash for consistency.

 

Limitations

 

- The command only retrieves the current folder path and does not verify its existence or accessibility.

 

See also:

 

AIU.Set_Folder

AIU.Save_Key

AIU.Set_Key

AIU.Get_Key

Folder Management

Key Management