Interface ToolPredicate

All Known Implementing Classes:
NamedToolPredicate
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface ToolPredicate
这是一个功能接口,用于根据当前上下文来决定某个工具是否应该被提供给大型语言模型(LLM)使用。
  • 方法详细信息(Method Details)

    • test

      @Deprecated boolean test(BaseTool tool, Optional<ReadonlyContext> readonlyContext)
      Deprecated.
      用于决定是否选中指定的工具。
      Parameters:
      tool - The tool to check.
      readonlyContext - The current context.
      Returns:
      true if the tool should be selected, false otherwise.
    • test

      default boolean test(BaseTool tool, @Nullable ReadonlyContext readonlyContext)
      用于决定是否选中指定的工具。
      Parameters:
      tool - The tool to check.
      readonlyContext - The current context.
      Returns:
      true if the tool should be selected, false otherwise.