Package com.axelor.ai.tool.meta
Class ListModelsTool
java.lang.Object
com.axelor.ai.tool.meta.ListModelsTool
- All Implemented Interfaces:
SystemTool<ListModelsTool.Input>
Lists model names the current agent may read for its user. The list is also auto-injected into
the system prompt via
provideContext() so the LLM can map business terms to correct
model names without an explicit tool call.-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncode()Unique code matching AiTool.systemTool field.Brief description of what this tool does.execute(ListModelsTool.Input input, ToolContext context) Execute with the given typed input and agent-scoped context.The input record class.name()Human-readable display name (e.g.Provides context text to inject into the system prompt at request time, avoiding the need for the LLM to call this tool just to learn the current state.safety()Safety classification for approval decisions.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.axelor.ai.tool.system.SystemTool
beforeApproval, callTitle, refusal, runsOutsideTransaction, undoneByRollback
-
Field Details
-
CODE
- See Also:
-
-
Constructor Details
-
ListModelsTool
public ListModelsTool()
-
-
Method Details
-
code
Description copied from interface:SystemToolUnique code matching AiTool.systemTool field.- Specified by:
codein interfaceSystemTool<ListModelsTool.Input>
-
name
Description copied from interface:SystemToolHuman-readable display name (e.g. "Search Records").- Specified by:
namein interfaceSystemTool<ListModelsTool.Input>
-
description
Description copied from interface:SystemToolBrief description of what this tool does.- Specified by:
descriptionin interfaceSystemTool<ListModelsTool.Input>
-
inputType
Description copied from interface:SystemToolThe input record class. ReturnVoid.classfor tools with no input.- Specified by:
inputTypein interfaceSystemTool<ListModelsTool.Input>
-
safety
Description copied from interface:SystemToolSafety classification for approval decisions. Tools default toToolSafety.WRITE. Override toToolSafety.READ_ONLYfor safe tools that never require approval orToolSafety.DESTRUCTIVEfor tools that should always require approval.- Specified by:
safetyin interfaceSystemTool<ListModelsTool.Input>
-
execute
Description copied from interface:SystemToolExecute with the given typed input and agent-scoped context.- Specified by:
executein interfaceSystemTool<ListModelsTool.Input>
-
provideContext
Description copied from interface:SystemToolProvides context text to inject into the system prompt at request time, avoiding the need for the LLM to call this tool just to learn the current state.Called automatically for each tool assigned to the agent before the LLM runs. Return
null(the default) if this tool has no context to provide.- Specified by:
provideContextin interfaceSystemTool<ListModelsTool.Input>- Returns:
- context text to append to the system prompt, or null
-