AIG. - AI Google Gemini Integration

<< Click to Display Table of Contents >>

Navigation:  »No topics above this level«

AIG. - AI Google Gemini Integration

AIG.SetModel

Previous Top Next


MiniRobotLanguage (MRL)

 

AIG.Set Model
Set the AI Model for Google Generative AI API

 

Intention

 

SetModel Command: Configuring the AI Model
 
The SetModel command allows you to specify which Google Generative AI model (e.g., "gemini-pro") will be used for subsequent API requests.

This gives you control over the AI’s capabilities and behavior tailored to your needs.

It’s part of the Model Configuration suite within AIG.

 

What is the SetModel Command?

 

The SetModel command updates the AIG_Model global variable, which determines the AI model used by the Google Generative AI API.

If no model is provided, it defaults to "gemini-pro". Supported models include "gemini-pro", "gemini-pro-vision", "gemini-1.5-pro", and "gemini-1.5-flash".

 

Why Do You Need It?

 

Setting the AI model is essential for:

Customization: Choose a model that matches your task (e.g., text generation or vision).

Performance: Optimize speed and accuracy based on model capabilities.

Compatibility: Ensure the model supports your input (e.g., "gemini-pro-vision" for images).

 

How to Use the SetModel Command?

 

Use this command to specify the desired model before making API calls like AIG.Ask.

The model name is optional; omitting it resets to the default ("gemini-pro"). Check Google’s API documentation for available models.

Available models (as of March 19, 2025) include:

gemini-pro: Text generation, general-purpose.

gemini-pro-vision: Multimodal (text and images).

gemini-1.5-pro: Advanced text generation.

gemini-1.5-flash: Faster, lightweight option.

 

Example Usage

 

AIG.Set Model|gemini-pro-vision

DBP.Model set to: gemini-pro-vision

AIG.Set Model

 

In the second case, the model reverts to the default "gemini-pro".

 

Illustration

 

┌───────────────┐

│ Model         │

├───────────────┤

│ gemini-pro    │

└───────────────┘

Default model set by AIG.Set Model when no parameter is provided.

 

Syntax

 

AIG.SetModel[|P1]

AIG.Set Model[|P1]

 

Parameter Explanation

 

P1 - (Optional) The model name (e.g., "gemini-pro"). If omitted, defaults to "gemini-pro".

 

Example

 

AIG.Set Model|gemini-1.5-pro

AIG.Ask|What is the weather like today?

DBP.Response: $$RET

ENR.

 

Remarks

 

- The model name is case-sensitive and must match Google’s API specifications.

- Use AIG.Get Model to verify the current setting.

 

Limitations

 

- Only models supported by the Google Generative AI API are valid.

- Invalid model names are ignored, reverting to the default.

 

See also:

 

AIG.Get Model

AIG.Ask

Model Configuration

Generation Parameters