Interface ToolPredicate

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
Functional interface to decide whether a tool should be exposed to the LLM based on the current context.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    test(BaseTool tool, Optional<ReadonlyContext> readonlyContext)
    Decides if the given tool is selected.
  • Method Details

    • test

      boolean test(BaseTool tool, Optional<ReadonlyContext> readonlyContext)
      Decides if the given tool is selected.
      Parameters:
      tool - The tool to check.
      readonlyContext - The current context.
      Returns:
      true if the tool should be selected, false otherwise.