Class ToolSearchRequest

java.lang.Object
dev.langchain4j.service.tool.search.ToolSearchRequest

@Experimental public class ToolSearchRequest extends Object
A request to search for tools. Contains a ToolExecutionRequest representing an LLM tool call (including search terms or a query), as well as all searchable tools in the AI Service.
Since:
1.12.0
  • Constructor Details

  • Method Details

    • toolExecutionRequest

      public ToolExecutionRequest toolExecutionRequest()
      Returns the tool call containing the search query.
    • searchableTools

      public List<ToolSpecification> searchableTools()
      Returns all searchable tools for the AI Service. This list does not include tools that were already found during previous searches.
    • invocationContext

      public InvocationContext invocationContext()
      Returns the AI Service invocation context associated with this tool search request.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • builder

      public static ToolSearchRequest.Builder builder()