AIO.Chat

<< Click to Display Table of Contents >>

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

AIO.Chat

AIO.Chat

Previous Top Next


MiniRobotLanguage (MRL)

 

AIO.Chat
Send Chat Completion Request to OpenRouter

 

Purpose

 

Sends a chat completion request to OpenRouter.ai API using the configured model and parameters. This command allows you to interact with AI models through natural language prompts and receive generated responses.

 

Syntax

 

AIO.Chat|$$PROMPT[|$$RET]

 

Parameters

 

$$PROMPT - The text prompt or question to send to the AI model. This can be any natural language input up to the token limit of the selected model.

 

$$RET (optional) - The variable name to store the AI response. If not specified, the response may be stored in a default result variable depending on the implementation.

 

Return Value

 

The AI-generated response is stored in the variable specified by $$RET. The content depends on the prompt and the configured AI model.

 

Example

 

' Initialize the AIO system

AIO.Init

 

' Set your OpenRouter API key

AIO.SetKey|sk-or-v1-your-api-key-here

 

' Send a chat request and store response

AIO.Chat|What is the capital of France?|$$Result

 

' Display the result

DBP.Result: $$Result

 

Related Commands

 

AIO.Init - Initialize OpenRouter AI system

AIO.SetKey - Set API key

AIO.SetModel - Set AI model

AIO.SetMaxTokens - Set maximum tokens

AIO.SetTemperature - Set temperature