AIO.SetMaxCompTok

<< Click to Display Table of Contents >>

Navigation:  3. Script Language > AI - Artificial Intelligence Commands > AIO. - OpenRouter AI >

AIO.SetMaxCompTok

AIO.SetMaxCompTok

Previous Top Next


MiniRobotLanguage (MRL)

 

AIO.SetMaxCompTok|`TOKENS
Set Maximum Completion Tokens

 

Purpose

 

Alternative to AIO.SetMaxTok, sets the maximum number of tokens to generate in the completion. This command specifically controls the output length limit for AI responses.

 

Syntax

 

AIO.SetMaxCompTok|`TOKENS

 

Parameters

 

`TOKENS - The maximum number of tokens to generate in the completion response. This limits the length of the AI's output.

 

Notes

 

- This is an alternative syntax to AIO.SetMaxTok

- Different models have different maximum token limits

- Lower values result in shorter, more concise responses

- Must be called before AIO.Chat to take effect

 

Example

 

' Set maximum completion tokens to 500

AIO.SetMaxCompTok|500

 

' Send chat request with limited output

AIO.Chat|Summarize this in brief|`Result

 

Related Commands

 

AIO.SetMaxTok - Alternative syntax for max tokens

AIO.Chat - Send chat request