|
<< Click to Display Table of Contents >> Navigation: 3. Script Language > AI - Artificial Intelligence Commands > AID. - DeepSeek > !Generation Parameters > AID. - Artificial Intelligence DeepSeek Utility |
MiniRobotLanguage (MRL)
AID.GetResponseFormat
Retrieve Current DeepSeek API Response Format
Intention
GetResponseFormat Command: Retrieving the Current Response Format
The GetResponseFormat command fetches the current response format setting for DeepSeek API requests.
This is useful for verifying or utilizing the format in your scripts.
It’s part of the AID - DeepSeek API suite.
The GetResponseFormat command retrieves the current value of the AID_RespFormat variable, which determines whether API responses are in JSON or text format.
You can store this value in a variable or, if no variable is specified, it will be placed on the Top of Stack (TOS).
Retrieving the response format is valuable for:
•Verification: Confirm the format expected from API responses.
•Debugging: Ensure the format aligns with your script’s parsing logic.
•Dynamic Usage: Adapt script behavior based on the current format.
The command can be called with or without a variable to store the result.
By default, AID_RespFormat is set to json unless changed via AID.SetResponseFormat.
Example Usage
AID.GetResponseFormat|$$FMT
DBP.Current Response Format: $$FMT
AID.GetResponseFormat
POP.$$FMT
DBP.Format from Stack: $$FMT
The returned value will be either json or text.
Illustration
┌────────────────────┐
│ AID_RespFormat │
├────────────────────┤
│ json / text │
└────────────────────┘
Retrieving the current response format setting.
Syntax
AID.GetResponseFormat[|P1]
AID.Get_Response_Format[|P1]
Parameter Explanation
P1 - (Optional) The variable where the response format will be stored. If omitted, the format is placed on the Top of Stack (TOS).
Example
AID.SetResponseFormat|json
AID.GetResponseFormat|$$FMT
DBP.Current Format: $$FMT
ENR.
Remarks
- The default format is json unless modified by AID.SetResponseFormat.
- The returned value is a string: either json or text.
Limitations
- The command only retrieves the current format and does not validate its applicability.
See also:
• AID.Ask
• AID.AskT