名为 `NamedToolPredicate` 的类

java.lang.Object
com.google.adk.tools.NamedToolPredicate
All Implemented Interfaces:
ToolPredicate

public class NamedToolPredicate extends Object implements ToolPredicate
  • 构造函数详细信息

    • NamedToolPredicate

      public NamedToolPredicate(List<String> toolNames)
    • NamedToolPredicate

      public NamedToolPredicate(String... toolNames)
  • 方法详细信息(Method Details)

    • test

      public boolean test(BaseTool tool, Optional<ReadonlyContext> readonlyContext)
      描述内容复制自接口文档: ToolPredicate
      用于决定是否选中指定的工具。
      Specified by:
      test in interface ToolPredicate
      Parameters:
      tool - The tool to check.
      readonlyContext - The current context.
      Returns:
      true if the tool should be selected, false otherwise.