|
<< Click to Display Table of Contents >> Navigation: »No topics above this level« AIG. - AI Google Gemini Integration |
MiniRobotLanguage (MRL)
AIG.Get EndpointAction
Retrieve the Current API Endpoint Action Suffix
Intention
Retrieve the currently configured action suffix (e.g., :generateContent) that is used by AIG.Get Endpoint to dynamically construct the full API endpoint URL. Part of the AIG - Google Gemini API suite.
This command returns the value currently stored in the AIG_EndpointAction global variable. This variable holds the suffix string (like `":generateContent"` or `":embedContent"`) that defines the specific API operation targeted. You can change this value using AIG.SetEndpointAction.
Knowing the current action suffix helps understand how the full endpoint URL will be constructed by AIG.Get Endpoint.
Use this command to:
•Verify Configuration: Check which API operation is currently targeted before making a call.
•Debugging: Confirm the action suffix if API calls are behaving unexpectedly.
•Conditional Logic: Use the retrieved suffix in your scripts to adapt behavior based on the current setting.
Simply call the command. You can optionally provide a variable name (P1) to store the result.
Example Usage
// Get the current action suffix and store it in $$MyAction
AIG.Get EndpointAction|$$MyAction
DBP.Current Action Suffix: @$$MyAction
// Set a different action
AIG.Set EndpointAction|:embedContent
// Verify the change
AIG.Get EndpointAction|$$MyAction
DBP.New Action Suffix: @$$MyAction
Syntax
AIG.GetEndpointAction[|P1]
AIG.Get EndpointAction[|P1]
Parameter Explanation
P1 - (Optional) The name of the variable (e.g., `$$MyVar`) where the retrieved action suffix string should be stored.
Example
// Retrieve the current action suffix
AIG.Get EndpointAction|$$CurrentAction
DBP.Action is: @$$CurrentAction
ENR.
Remarks
- This command returns only the suffix part (e.g., `":generateContent"`), not the full URL.
- To get the complete endpoint URL that will be used in an API call, use AIG.Get Endpoint.
Limitations
- None specific to this command.
See also:
• AIG.SetEndpointAction (or AIG.setendpoint)
• Endpoint Management (Conceptual Overview)