|
<< Click to Display Table of Contents >> Navigation: 3. Script Language > AI - Artificial Intelligence Commands > AIU. - OpenAI API > !Tool and Function Management > AIU. - Artificial Intelligence Utility |
MiniRobotLanguage (MRL)
AIU.SetTools
Set the Tools Available for the AI to Use
Intention
SetTools Command: Configuring AI Tools
The SetTools Command defines the tools that the AI can utilize during operations such as AIU.Chat or AIU.Responses.
This enhances the AI�s capabilities by enabling features like web searches or custom functions.
It�s part of the AIU - OpenAI API suite.
This Command specifies a list of tools available to the AI, passed as a single string parameter.
The string can be a comma-separated list (e.g., "web_search,calculator") or a JSON array (e.g., "[{\"type\":\"function\",\"function\":{\"name\":\"web_search\"}}]") compatible with OpenAI�s API.
Setting the tools configuration is essential for:
�Extending Functionality: Enable the AI to perform tasks like searching the web or computing values.
�Task Control: Restrict the AI to specific tools relevant to the script�s purpose.
�Customization: Tailor the AI�s behavior to meet specific operational needs.
The Command requires one parameter: a string listing the tools.
The setting persists until changed by another AIU.SetTools call or reset via Init_AIU().
Example Usage
AIU.SetTools|web_search,calculator
AIU.GetTools|$$TLS
DBP.Available Tools: $$TLS
This sets the tools to "web_search" and "calculator", then retrieves and displays the configuration.
Illustration
+----------------------+
� Tools Configuration ��
+----------------------�
� web_search,calculator�
+----------------------+
The tools set for the AI to use in subsequent operations.
Syntax
AIU.SetTools|P1
AIU.Set_Tools|P1
Parameter Explanation
P1 - (Required) A string specifying the tools, e.g., "web_search,calculator" or a JSON array like "[{\"type\":\"function\",\"function\":{\"name\":\"web_search\"}}]".
Example
AIU.SetTools|web_search
AIU.Chat|Search for recent news|$$RES
DBP.Response: $$RES
ENR.
Remarks
- Tool names must be supported by the underlying AICA implementation.
- For JSON format details, refer to OpenAI API - tools.
Limitations
- Exactly one parameter is required; omitting or adding extra parameters triggers an error.
- Invalid tool names may be accepted but ignored by the AI.
See also:
? AIU.Chat