AIX. - Grok / X - API

<< Click to Display Table of Contents >>

Navigation:  3. Script Language > AI - Artificial Intelligence Commands > AIX. - Grok / X - API > !Core Operations >

AIX. - Grok / X - API

AIX.Ask

Previous Top Next


MiniRobotLanguage (MRL)

 

AIX.Ask
Ask a Text-Based Question to the AI

 

Intention

 

Ask Command: Querying Grok with Text
 
The Ask command enables you to send a text-based question or prompt to the Grok API for a response.

It’s a straightforward way to leverage AI for information, assistance, or task automation.

It’s part of the AIX - Grok / X - API suite.

 

What is the Ask Command?

 

The Ask command sends a chat completion request to the Grok API with a text prompt, returning the AI’s response.

The result is stored in AIX_GrokContent and can be optionally copied to the clipboard.

 

Why Do You Need It?

 

This command is useful for:

Quick Answers: Get instant responses to questions or prompts.

Script Integration: Use AI responses in your automation scripts.

Customization: Adjust response style with parameters like temperature or model.

 

How to Use the Ask Command?

 

Simply provide a text prompt and optionally specify clipboard output.

The response is stored in AIX_GrokContent, accessible via AIX.Get Content.

 

Example Usage

 

AIX.SetAPI_Key|your_api_key_here

AIX.Ask|What is artificial intelligence?|1

DBP.Response: $$AIX_GrokContent

 

The response is generated by Grok and copied to the clipboard if P2 is 1.

 

Illustration

 

┌───────────────┐

│ Text Prompt   │

├───────────────┤

│ Grok Response │

└───────────────┘

Sending a text prompt to Grok for a response.

 

Syntax

 

AIX.Ask|P1|P2

 

Parameter Explanation

 

P1 - The text prompt or question to send to Grok (required).

P2 - (Optional) Clipboard flag: 1 to copy the response to the clipboard, 0 otherwise (default: uses AIX_ClipboardOutput).

 

Example

 

AIX.Ask|What’s the weather like today?|0

DBP.Grok says: $$AIX_GrokContent

ENR.

 

Remarks

 

- Requires a valid API key set via AIX.Set Key.

- Response length is limited by AIX.Set MaxToken (default: 4096).

 

Limitations

 

- Clipboard output is capped at 1MB (%MAX_CLIPBOARD_SIZE).

- No image support; use AIX.Ask Vision for vision tasks.

 

See also:

 

AIX.Ask Vision

AIX.Get Content

AIX.Set Key

AIX.Set ClipboardOutput