AIG. - AI Google Gemini Integration

<< Click to Display Table of Contents >>

Navigation:  3. Script Language > AI - Artificial Intelligence Commands > AIG. - Google AI > 4. Configuration (Generation Parameters) >

AIG. - AI Google Gemini Integration

AIG.GetResponseFormat

Previous Top Next


MiniRobotLanguage (MRL)

 

AIG.GetResponseFormat
Retrieve the Current Response Format Setting

 

Intention

 

Retrieve the JSON string value indicating the currently requested format for the AI model's response (e.g., `"text"` or `"json_object"`).

 

What is the GetResponseFormat Command?

 

This Command returns the current value stored in the AIG_ResponseFormat global variable. This value is set using the AIG.SetResponseFormat Command.

 

Why Do You Need It?

 

Use this Command to:

Verify Configuration: Check which format is currently requested before making an API call.

Debugging: Confirm the response format setting if the output structure is not as expected.

 

How to Use

 

Call the Command, optionally providing a variable name (P1) to store the resulting JSON string value.

 

Example Usage

 

// Set format to JSON

AIG.SetResponseFormat|$"""json_object"""

 

// Retrieve the current setting

AIG.GetResponseFormat|$$CurrentFormat

DBP. Current Response Format: @$$CurrentFormat

// Output: Current Response Format: "json_object"

 

Syntax

 

AIG.GetResponseFormat[|P1]

AIG.grf[|P1]

 

Parameter Explanation

 

P1 - (Optional) The name of the variable (e.g., `$$MyVar`) where the retrieved response format JSON string should be stored.

 

Remarks

 

- Returns the exact JSON string value (including quotes) stored in the AIG_ResponseFormat global variable.

 

See also:

 

? AIG.SetResponseFormat

? AIG. Commands Overview