Package com.google.adk.plugins
Class ReflectAndRetryToolPlugin.Builder
java.lang.Object
com.google.adk.plugins.ReflectAndRetryToolPlugin.Builder
- Enclosing class:
- ReflectAndRetryToolPlugin
Builder for
ReflectAndRetryToolPlugin.-
Method Summary
Modifier and TypeMethodDescriptionbuild()maxRetries(int maxRetries) Sets the number of consecutive failures of one tool answered with retry guidance;0disables retrying.Sets the plugin instance name.resultErrorExtractor(ReflectAndRetryToolPlugin.ResultErrorExtractor resultErrorExtractor) Sets how errors reported inside tool results are found.throwExceptionIfRetryExceeded(boolean throwExceptionIfRetryExceeded) Sets whether, past the limit, the error propagates rather than the model being told to stop using the tool.trackingScope(ReflectAndRetryToolPlugin.TrackingScope trackingScope) Sets whether failures are counted per invocation or across invocations.
-
Method Details
-
maxRetries
Sets the number of consecutive failures of one tool answered with retry guidance;0disables retrying.- Throws:
IllegalArgumentException- ifmaxRetriesis negative
-
throwExceptionIfRetryExceeded
@CanIgnoreReturnValue public ReflectAndRetryToolPlugin.Builder throwExceptionIfRetryExceeded(boolean throwExceptionIfRetryExceeded) Sets whether, past the limit, the error propagates rather than the model being told to stop using the tool. -
trackingScope
@CanIgnoreReturnValue public ReflectAndRetryToolPlugin.Builder trackingScope(ReflectAndRetryToolPlugin.TrackingScope trackingScope) Sets whether failures are counted per invocation or across invocations. -
resultErrorExtractor
@CanIgnoreReturnValue public ReflectAndRetryToolPlugin.Builder resultErrorExtractor(ReflectAndRetryToolPlugin.ResultErrorExtractor resultErrorExtractor) Sets how errors reported inside tool results are found. -
name
Sets the plugin instance name. -
build
-