Class ToolSearchResult

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

@Experimental public class ToolSearchResult extends Object
The result of a tool search. Contains a list of the found tool names and the text to be sent to the LLM inside the ToolExecutionResultMessage.
Since:
1.12.0
  • Constructor Details

    • ToolSearchResult

      public ToolSearchResult(List<String> foundToolNames, String toolResultMessageText)
      Creates a ToolSearchResult from a list of tool names and a tool result message text.
      Parameters:
      foundToolNames - the names of the found tools
      toolResultMessageText - the text to be set in the ToolExecutionResultMessage and sent to the LLM as the result of the tool search
  • Method Details

    • foundToolNames

      public List<String> foundToolNames()
      Returns the list of the found tool names.
    • toolResultMessageText

      public String toolResultMessageText()
      Returns the text to be set in the ToolExecutionResultMessage and sent to the LLM as the result of the tool search.
    • 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