AIO.GetContent

<< Click to Display Table of Contents >>

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

AIO.GetContent

AIO.GetContent

Previous Top Next


MiniRobotLanguage (MRL)

 

AIO.GetContent[|$$RET]
Retrieve Content from Last Chat Response

 

Purpose

 

Retrieves the content from the last chat response. This command extracts the AI's reply text after a successful AIO.Chat call and stores it in the specified variable for further processing or display.

 

Syntax

 

AIO.GetContent[|$$RET]

 

Parameters

 

$$RET (optional) - Variable to store the retrieved content. If omitted, the content may be returned to the caller or displayed depending on the calling context.

 

Return Value

 

The AI response content from the last AIO.Chat call. Returns an empty string if no chat has been performed or if the last call failed.

 

Example

 

' Send a chat request to the AI

AIO.Chat|Tell me a joke|$$Response

 

' Extract just the content from the response

AIO.GetContent|$$JokeText

 

' Display the joke

DBP.Joke: $$JokeText

 

Notes

 

- Must be called after a successful AIO.Chat command

- Retrieves only the message content, not metadata (tokens, model, etc.)

- Content is cleared when AIO.Init is called

 

Related Commands

 

AIO.Chat - Send chat request

AIO.Init - Initialize AIO system

AIO.SetKey - Set API key