AIU. - Artificial Intelligence Utility

<< Click to Display Table of Contents >>

Navigation:  3. Script Language > AI - Artificial Intelligence Commands > AIU. - OpenAI API > !Model and Endpoint Configuration >

AIU. - Artificial Intelligence Utility

AIU.SetModel

Previous Top Next


MiniRobotLanguage (MRL)

 

AIU.SetModel
Set Active OpenAI Model

 

Intention

 

SetModel Command: Setting the Active OpenAI Model
 
The SetModel command sets the active OpenAI model used by the AIU system for subsequent operations, such as API calls or processing tasks.

This allows you to choose a model based on capability, cost, or performance needs.

It’s part of the AIU - OpenAI API suite.

 

What is the SetModel Command?

 

The SetModel command updates the active model for AIU operations, selecting from available OpenAI models like gpt-4o or gpt-3.5-turbo.

It requires a single parameter specifying the model name.

 

Why Do You Need It?

 

Setting the active model is useful for:

Performance: Choose a model optimized for your task’s complexity.

Cost Control: Select a cost-effective model to manage API expenses.

Flexibility: Switch models dynamically within scripts.

 

How to Use the SetModel Command?

 

The command requires a valid OpenAI model name as its parameter.

Available models and their prices (as of March 18, 2025, from OpenAI’s pricing page) include:

gpt-4o: $5.00/1M input tokens, $15.00/1M output tokens (multimodal, 128K context).

gpt-4o-mini: $0.15/1M input tokens, $0.60/1M output tokens (cost-effective, 128K context).

gpt-4-turbo: $10.00/1M input tokens, $30.00/1M output tokens (high performance, 128K context).

gpt-3.5-turbo: $0.50/1M input tokens, $1.50/1M output tokens (dialog-optimized, 16K context).

o1-preview: $15.00/1M input tokens, $60.00/1M output tokens (advanced reasoning, 128K context).

o1-mini: $3.00/1M input tokens, $12.00/1M output tokens (reasoning, cost-effective, 128K context).

 

Example Usage

 

AIU.SetModel|gpt-4o

AIU.GetModel|$$MOD

DBP.Active Model: $$MOD

 

Illustration

 

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

│ Active Model  │

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

│ gpt-4o        │

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

A simple representation of setting the active model.

 

Syntax

 

AIU.SetModel|P1

AIU.Set_Model|P1

 

Parameter Explanation

 

P1 - The OpenAI model name to set as active (required).

 

Example

 

AIU.SetModel|gpt-3.5-turbo

AIU.GetModel|$$MOD

DBP.Active Model: $$MOD

ENR.

 

Remarks

 

- The model name must match an available OpenAI model exactly.

- Use AIU.GetModel to verify the active model.

 

Limitations

 

- The command does not validate model availability or API access.

- Exactly one parameter is required; incorrect usage will cause an error.

 

See also:

 

AIU.Get_Model

AIU.Set_Folder

AIU.Get_Folder

AIU.Set_Key

Model Management

Key Management