Package com.axelor.ai.tool.executor
Class SystemToolExecutor
java.lang.Object
com.axelor.ai.tool.executor.SystemToolExecutor
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbeforeApproval(AiTool tool, Object input, Supplier<ToolContext> context) What the tool says before its call is put to the user; seeSystemTool.beforeApproval(T, com.axelor.ai.tool.system.ToolContext).execute(AiTool tool, Object input, ToolContext context) SystemTool<?> Resolves a system tool by code, or null if not found.What the tool calls this call of itself, in the user's language: the name comes from the code, not from the configuredname, which is only the fallback for a tool not registered here.
-
Constructor Details
-
SystemToolExecutor
-
-
Method Details
-
resolve
Resolves a system tool by code, or null if not found. -
titleOf
What the tool calls this call of itself, in the user's language: the name comes from the code, not from the configuredname, which is only the fallback for a tool not registered here.Titling is cosmetic, so nothing here may fail a call: an input the tool cannot even parse still has to reach
execute(com.axelor.ai.db.AiTool, java.lang.Object, com.axelor.ai.tool.system.ToolContext), which is where that is reported properly. -
beforeApproval
What the tool says before its call is put to the user; seeSystemTool.beforeApproval(T, com.axelor.ai.tool.system.ToolContext). Null, to ask as usual, when the tool has nothing to say or its input does not read: that isexecute(com.axelor.ai.db.AiTool, java.lang.Object, com.axelor.ai.tool.system.ToolContext)'s to report, once approved.- Parameters:
context- the call's context, built on the thread that checks it
-
execute
-