|
<< Click to Display Table of Contents >> Navigation: 3. Script Language > AI - Artificial Intelligence Commands > AIG. - Google AI > 3. Configuration (Model, Context & Reasoning) > AIG.SetThinking |
MiniRobotLanguage (MRL)
AIG.SetThinking
Configure reasoning capabilities and token budget.
Intention
To control the "Thinking" process of advanced models (like Gemini 2.0 Flash Thinking or Gemini 3.0). This allows you to define how many tokens the model can spend on internal reasoning before generating an answer, and whether you want to see those thoughts.
What is the SetThinking Command?
This command updates the `thinking_config` parameters in the API payload. It is specifically designed for models that support Chain-of-Thought reasoning.
Important Prerequisites:
�You must select a model that supports thinking (e.g., `gemini-2.0-flash-thinking-exp` or `gemini-3.0-pro`).
�You must set the API version to Beta: AIG.SetApiVersion|v1beta.
Example Usage
// 1. Setup for Reasoning
AIG.SetApiVersion|v1beta
AIG.SetModel|gemini-2.0-flash-thinking-exp-01-21
// 2. Configure Thinking: Show thoughts, Budget 2048 tokens
AIG.SetThinking|1|2048
// 3. Ask a complex logic question
AIG.Ask|Solve this riddle: ...|$$Result
// The result will contain the thoughts followed by the answer
DBP. $$Result
Syntax
AIG.SetThinking|P1[|P2]
AIG.stk|P1[|P2]
Parameter Explanation
P1 - Include Thoughts (0 or 1).
�`0`: The model thinks silently; only the final answer is returned.
�`1`: The model's internal monologue (thoughts) is returned alongside the answer.
P2 - (Optional) Token Budget (Integer). The maximum number of tokens the model is allowed to use for reasoning. Pass `0` to use the model's default limit.
See also: