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
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ToolErrorInterceptor.Builderbuilder()getName()interceptToolCall(ToolCallRequest request, ToolCallHandler handler) Wrap a tool call with custom logic.
-
Constructor Details
-
ToolErrorInterceptor
public ToolErrorInterceptor()
-
-
Method Details
-
interceptToolCall
Description copied from class:ToolInterceptorWrap 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:
interceptToolCallin classToolInterceptor- Parameters:
request- The tool call requesthandler- The next handler in the chain (or base handler)- Returns:
- The tool call response
-
getName
-
builder
-