Class ToolErrorInterceptor

java.lang.Object
com.alibaba.cloud.ai.graph.agent.interceptor.ToolInterceptor
com.alibaba.cloud.ai.graph.agent.interceptor.toolerror.ToolErrorInterceptor
All Implemented Interfaces:
Interceptor

public class ToolErrorInterceptor extends ToolInterceptor
  • Constructor Details

    • ToolErrorInterceptor

      public ToolErrorInterceptor()
  • Method Details

    • interceptToolCall

      public ToolCallResponse interceptToolCall(ToolCallRequest request, ToolCallHandler handler)
      Description copied from class: ToolInterceptor
      Wrap a tool call with custom logic. Implementations can: - Modify the request before calling the handler - Call the handler multiple times (retry logic) - Modify the response after handler returns - Add caching, logging, monitoring, etc.
      Specified by:
      interceptToolCall in class ToolInterceptor
      Parameters:
      request - The tool call request
      handler - The next handler in the chain (or base handler)
      Returns:
      The tool call response
    • getName

      public String getName()
    • builder

      public static ToolErrorInterceptor.Builder builder()