|
<< Click to Display Table of Contents >> Navigation: 3. Script Language > AI - Artificial Intelligence Commands > AIG. - Google AI > 6. Core Operations > AIG. - AI Google Gemini Integration |
MiniRobotLanguage (MRL)
AIG.Ask
Ask a Text-Based Question to the Google Gemini AI
Intention
Ask Command: Querying the AI with Text
The Ask Command enables you to send a text-based question or prompt to the Google Gemini AI, leveraging its natural language understanding to generate a response.
This Command is the primary interface for interacting with the AI. It automatically incorporates any System Instructions (Persona) or Reasoning Configurations you have set previously.
The Ask Command sends a user-defined text prompt to the Google Gemini API via the internal `AIG_ChatCompletion` function. It constructs the JSON payload, handles the HTTP request, and processes the response.
You provide a question as the first parameter. The response is placed in the optional result variable or on the Top of Stack (TOS). The result is also stored internally for retrieval via AIG.Get Content.
�gemini-2.5-flash: Current standard for speed and efficiency.
�gemini-3.0-pro-preview: Advanced reasoning (requires `AIG.SetApiVersion|v1beta`).
�gemini-1.5-pro / flash: Previous generation stable models.
' 1. Basic Usage
AIG.Set Key|your_api_key
AIG.Set Model|gemini-2.5-flash
AIG.Ask|What is the capital of France?|$$ANS
DBP.Response: $$ANS
' 2. Using Context/Persona
AIG.SetApiVersion|v1beta
AIG.SetSystemPrompt|You are a poet. Reply in rhymes.
AIG.Ask|Explain quantum physics.|$$Poem
DBP.$$Poem
Syntax
AIG.Ask|P1[|P2]
Parameter Explanation
P1 - (Required) The text prompt or question.
P2 - (Optional) Variable to store the response. If omitted, result is on TOS.
Remarks
�This command respects all configuration settings (Temperature, MaxTokens, Safety, System Prompt).
�For image input, use AIG.AskVision instead.
See also: