AIX - Artificial Intelligence and X Platform Utility

<< Click to Display Table of Contents >>

Navigation:  3. Script Language > AI - Artificial Intelligence Commands > AIX. - Grok / X - API > !Tool and Function Management >

AIX - Artificial Intelligence and X Platform Utility

AIX.Set Tools

Previous Top Next


MiniRobotLanguage (MRL)

 

AIX.Set Tools
Set the Tools Available for the AI to Use

 

Intention

 

Set Tools Command: Configure AI Capabilities
 
The Set Tools command defines the tools (e.g., functions or APIs) that the Grok AI can use to enhance its responses, stored as a configuration.

This enables function calling functionality.

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

 

What is the Set Tools Command?

 

The Set Tools command updates a global configuration (e.g., AIX_Tools) with a JSON string describing available tools, such as {"name": "get_weather", "description": "Get current weather"}.

This configuration is used by HTP_AnalyzeGrokResponse to detect and process tool calls in responses.

 

Why Do You Need It?

 

Setting the tools is beneficial for:

Functionality: Enables the AI to invoke external tools.

Customization: Limits or expands AI capabilities as needed.

Integration: Supports workflows requiring tool-based responses.

 

How to Use the Set Tools Command?

 

Use the command to define tools before executing AI queries with AIX.Ask or AIX.AskVision that may trigger tool calls.

Provide a JSON string and verify with AIX.Get Tools.

 

Example Usage

 

AIX.Set Tools|""{""name"": ""get_weather"", ""description"": ""Get current weather""}""

AIX.Ask|""What is the weather like today?""

AIX.Get Tools|$$TOOLS

DBP.Current tools: $$TOOLS

 

This example sets a weather tool, sends a query, retrieves the tool configuration, and displays it.

 

Illustration

 

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

│ Set Tools          │

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

│ Input: JSON Config │

│ Process: Update    │

│ Output: Setting    │

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

A visual of setting and updating the tools configuration.

 

Syntax

 

AIX.Set Tools|json_string

AIX_Set_Tools|json_string

 

Parameter Explanation

 

json_string - (Required) A JSON string (e.g., ""{""name"": ""get_weather"", ""description"": ""Get current weather""}"") defining the tools available to the AI.

 

Remarks

 

- The tools configuration is used by HTP_AnalyzeGrokResponse to handle tool_calls in responses.

- Each tool should include a name and description, potentially with additional parameters depending on the API.

 

Limitations

 

- Changes apply only to future responses; existing responses use the previous tools configuration.

- Invalid JSON or unsupported tools may cause errors or be ignored.

 

See also:

 

AIX.Get Tools

AIX.Ask

AIX.AskVision

Model Configuration and Tools