AIU. - Artificial Intelligence Utility

<< 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

AIU.GetSeed

Previous Top Next


MiniRobotLanguage (MRL)

 

AIU.GetSeed
Retrieve the Current Seed Value

 

Intention

 

GetSeed Command: Accessing the Seed Setting
 
The GetSeed command retrieves the current seed value used for generating reproducible AI responses in operations like AIU.Chat or AIU.Responses.

This helps verify or log the seed in use.

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

 

What is the GetSeed Command?

 

This command returns the integer seed value previously set by AIU.SetSeed, or a default value (typically 0) if unset.

The result can be stored in a variable or pushed onto the Top of Stack (TOS).

 

Why Do You Need It?

 

Retrieving the seed value is useful for:

Verification: Confirm the seed before or after operations.

Logging: Record the seed for documentation or debugging.

Consistency: Ensure the expected seed is active.

 

How to Use the GetSeed Command?

 

The command accepts an optional variable to store the result; if omitted, the seed is placed on the stack.

The default value is typically 0 unless set by AIU.SetSeed.

 

Example Usage

 

AIU.SetSeed|42

AIU.GetSeed|$$SED

DBP.Current Seed: $$SED

AIU.GetSeed

POP.$$SED

 

This retrieves the seed value into a variable or from the stack after setting it to 42.

 

Illustration

 

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

│ Seed Value    │

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

│ 42            │

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

The current seed value retrieved by the command.

 

Syntax

 

AIU.GetSeed[|P1]

AIU.Get_Seed[|P1]

 

Parameter Explanation

 

P1 - (Optional) The variable to store the seed value. If omitted, the value is placed on the Top of Stack (TOS).

 

Example

 

AIU.SetSeed|9876

AIU.GetSeed|$$SED

DBP.Current Seed: $$SED

ENR.

 

Remarks

 

- Returns 0 if no seed has been set via AIU.SetSeed.

 

Limitations

 

- More than one parameter causes an error.

- Only reflects the locally set seed, not any server-side defaults.

 

See also:

 

AIU.Set_Seed

AIU.Chat

AIU.Responses

OpenAI API - seed