AID. - Artificial Intelligence DeepSeek Utility

<< Click to Display Table of Contents >>

Navigation:  3. Script Language > AI - Artificial Intelligence Commands > AID. - DeepSeek > !Generation Parameters >

AID. - Artificial Intelligence DeepSeek Utility

AID.GetMaxToken

Previous Top Next


MiniRobotLanguage (MRL)

 

AID.Get MaxToken
Retrieve the Current Maximum Token Limit

 

Intention

 

GetMaxToken Command: Retrieve Token Limit
 
The GetMaxToken command fetches the current maximum token limit set for DeepSeek API responses.

This is useful for verifying or adjusting response constraints in your scripts.

It’s part of the AID - DeepSeek API suite.

 

What is the GetMaxToken Command?

 

The GetMaxToken command retrieves the current value of the AID_MaxToken variable, which caps the token count for API responses.

You can store this value in a variable or, if omitted, it’s placed on the Top of Stack (TOS).

 

Why Do You Need It?

 

Retrieving the token limit is valuable for:

Verification: Confirm the current response length limit.

Script Logic: Use the value in conditional checks or cost estimates.

Debugging: Ensure the limit aligns with your application’s needs.

 

How to Use the GetMaxToken Command?

 

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

The default is 1024 unless changed via AID.Set MaxToken.

 

Example Usage

 

AID.Get MaxToken|$$MAX

DBP.Current Max Tokens: $$MAX

AID.Get MaxToken

POP.$$MAX

DBP.Max Tokens from Stack: $$MAX

 

Returns the current limit, e.g., 1024 if unchanged.

 

Illustration

 

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

│ AID_MaxToken     │

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

│ 1024             │

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

Retrieving the default maximum token limit.

 

Syntax

 

AID.GetMaxToken[|P1]

AID.Get MaxToken[|P1]

 

Parameter Explanation

 

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

 

Example

 

AID.Get MaxToken|$$TOK

DBP.Current Max Token Limit: $$TOK

ENR.

 

Remarks

 

- Returns 1024 by default unless modified by AID.Set MaxToken.

- Returns a numeric value as a long integer.

 

Limitations

 

- Reflects only the local setting; actual API limit is 8000 tokens.

 

See also:

 

AID.Set MaxToken

AID.Ask

Generation Parameters