重试谓词(Predicate)

Decides whether the model may retry a failed tool call.

函数

Link copied to clipboard
abstract fun isRetryable(context: ToolContext, tool: BaseTool, args: Map<String, Any?>, error: Any): Boolean

返回值 false 如果重试仍然无法解决问题…… 错误例如:永久性的客户端错误(permanent client error)。