Package dev.langchain4j.service.tool
Interface ToolExecutor
- All Known Implementing Classes:
DefaultToolExecutor
public interface ToolExecutor
A low-level executor/handler of a
ToolExecutionRequest.-
Method Summary
-
Method Details
-
execute
String execute(dev.langchain4j.agent.tool.ToolExecutionRequest toolExecutionRequest, Object memoryId) Executes a tool requests.- Parameters:
toolExecutionRequest- The tool execution request. Contains tool name and arguments.memoryId- The ID of the chat memory. SeeMemoryIdfor more details.- Returns:
- The result of the tool execution that will be sent to the LLM.
-