Package dev.langchain4j.service.tool
Class DefaultToolExecutor
java.lang.Object
dev.langchain4j.service.tool.DefaultToolExecutor
- All Implemented Interfaces:
ToolExecutor
-
Constructor Summary
ConstructorDescriptionDefaultToolExecutor
(Object object, ToolExecutionRequest toolExecutionRequest) DefaultToolExecutor
(Object object, Method method) -
Method Summary
Modifier and TypeMethodDescriptionexecute
(ToolExecutionRequest toolExecutionRequest, Object memoryId) Executes a tool requests.
-
Constructor Details
-
DefaultToolExecutor
-
DefaultToolExecutor
-
-
Method Details
-
execute
Description copied from interface:ToolExecutor
Executes a tool requests.- Specified by:
execute
in interfaceToolExecutor
- Parameters:
toolExecutionRequest
- The tool execution request. Contains tool name and arguments.memoryId
- The ID of the chat memory. SeeMemoryId
for more details.- Returns:
- The result of the tool execution.
-