AIN. - AnythingLLM AI

<< Click to Display Table of Contents >>

Navigation:  »No topics above this level«

AIN. - AnythingLLM AI

AIN.GetContent

Previous Top Next


MiniRobotLanguage (MRL)

 

AIN.GetContent
Get the Content from the Last Response

 

Intention

 

Retrieve Last Response Content
 
The AIN.GetContent command extracts the main content (e.g., text reply) from the last AnythingLLM API response, such as from AIN.Ask or AIN.AskV.

 

What is the GetContent Command?

 

This command isolates the core response text, excluding metadata like token counts or finish reasons, from the last API call.

 

Why Do You Need It?

 

Useful for:

Processing: Extract just the reply for further use.

Display: Show only the response text to users.

 

How to Use the GetContent Command?

 

Call AIN.GetContent after an API query; specify a variable to store the content, or it’s pushed to the stack.

 

Example Usage

AIN.SetKey|your_api_key_here

AIN.Ask|What is the weather like?|$$RES

AIN.GetContent|$$CNT

DBP.Content: $$CNT

Outputs only the text response, e.g., "The weather is sunny."

 

Syntax

AIN.GetContent[|P1]

 

Parameter Explanation

P1 - (Optional) Variable to store the response content (e.g., $$CNT); defaults to stack if omitted.

 

Remarks

- Returns empty string if no prior response exists.

- Alias: AIN.GCT

 

Limitations

- Only retrieves content from the most recent API call.

 

See also:

AIN.

AIN.Ask

AIN.AskV

AIN.GetRaw

Response Analysis Getters