AIO.SetLogprobs

<< Click to Display Table of Contents >>

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

AIO.SetLogprobs

AIO.SetLogprobs

Previous Top Next


MiniRobotLanguage (MRL)

 

AIO.SetLogprobs|$$FLAG
Enable/Disable Log Probability Output

 

Purpose

 

Enables or disables the inclusion of log probability information in API responses. When enabled, the API returns log probabilities for each output token, which can be useful for analyzing model confidence and debugging generation behavior.

 

Syntax

 

AIO.SetLogprobs|$$FLAG

 

Parameters

 

$$FLAG - A numeric flag to enable or disable log probabilities:

0 - Disable log probabilities (default)

1 - Enable log probabilities

 

Return Value

 

None. The setting is stored internally and applied to subsequent API requests.

 

Example

 

' Enable log probabilities for debugging

AIO.SetLogprobs|1

 

' Also set top logprobs to get more candidates

AIO.SetTopLogprobs|5

 

' Send a request that includes logprob data

AIO.Chat|Explain quantum computing|$$Response

 

Notes

 

- Log probabilities indicate the model's confidence for each token

- Enabling logprobs increases response size and may impact performance

- Use with AIO.SetTopLogprobs to control how many token candidates are returned

- Not all models support log probability output

- Disabled by default

 

Related Commands

 

AIO.SetTopLogprobs - Set number of top logprobs

AIO.Chat - Send chat request

AIO.Init - Initialize AIO system