AIG. - AI Google Gemini Integration

<< Click to Display Table of Contents >>

Navigation:  3. Script Language > AI - Artificial Intelligence Commands > AIG. - Google AI > 3. Configuration (Model, Context & Reasoning) >

AIG. - AI Google Gemini Integration

AIG.SetModel

Previous Top Next


MiniRobotLanguage (MRL)

 

AIG.Set Model
Select the Active AI Intelligence Engine

 

Intention

 

The SetModel command selects the specific "Brain" (Model) that will process your requests. It updates the internal configuration so that all subsequent commands (like AIG.Ask or AIG.AskVision) use this specific version of the AI.

 

Important: Endpoints & Model Availability

 

Not all models are available at all times. Google separates models into two categories:

Stable Models (v1): Production-ready. (e.g., gemini-1.5-flash, gemini-1.5-pro).

Preview/Experimental (v1beta): Newest features. (e.g., gemini-2.0-flash-exp, gemini-1.5-pro-latest).

If you try to set a Preview model while connected to the Stable endpoint, the API will return a "Model not found" error. You must switch endpoints first.

 

Workflow: How to Select the Correct Model

 

1.Choose Endpoint: Decide if you need Stable or Preview features.

2. ' Use v1beta for newest models

3.AIG.SetApiVersion|v1beta

4.List Available Models: Ask Google what is available on that endpoint.
AIG.ListModels|$$LIS

5.MBX.$$LIS
(This returns a string like: "name: models/gemini-1.5-pro", "name: models/gemini-exp-1121", etc.)

6.Set the Model: Copy the model name (without "models/") and use it here.
AIG.SetModel|gemini-exp-1121

 

Common Models (Reference)

 

gemini-1.5-flash : Fast, cheap, reliable. Good for OCR and simple text.

gemini-1.5-pro : High intelligence. Best for coding and complex logic.

gemini-2.0-flash-exp : (Requires v1beta) Next-gen speed and reasoning.

imagen-3.0-generate-001 : (Requires v1beta) For Image Generation commands.

 

Example Usage

 

' --- Scenario: Using a cutting-edge Preview Model ---

 

' 1. Switch to Beta Endpoint

AIG.SetApiVersion|v1beta

 

' 2. Check what is available (Optional, for debugging)

AIG.ListModels|$$AvailableModels

DBP.$$AvailableModels

 

' 3. Set the specific preview model found in the list

AIG.SetModel|gemini-2.0-flash-exp

 

' 4. Run your prompt

AIG.Ask|What is new in Gemini 2.0?

 

Syntax

 

AIG.SetModel[|P1]

AIG.smd[|P1]

 

Parameter Explanation

 

P1 - (Optional) The model name string (e.g., "gemini-1.5-pro"). If omitted, the system resets to the library default (usually "gemini-1.5-flash").

 

See also:

 

? AIG.ListModels (Crucial for finding names)

? AIG.SetApiVersion (Required for Beta models)

? AIG.GetModel