Package dev.langchain4j.service.tool
package dev.langchain4j.service.tool
-
ClassDescriptionRepresents a tool managed by an AI Service, combining:
ToolSpecification— what is sent to the LLMToolExecutor— what is called when the LLM invokes the tool Metadata that controls how the AI Service handles this tool (e.g.,ReturnBehavior)AToolProviderthat passes on only the tools of another tool provider that are relevant to the conversation, as decided by aDecisionModel.What the tool provider does when the decision model fails.Handler forToolArgumentsExceptions thrown by aToolExecutor.Represents the execution of a tool, including the request and the result.Handler forToolExecutionExceptions thrown by aToolExecutor.Represents the result of a tool execution.A low-level executor/handler of aToolExecutionRequest.A tool provider.The results of a round of tool executions, keeping successful and failed tools together so the caller can compensate the tools that did succeed before failing the invocation with the tool error.