Class WebSearchTool

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      String searchWeb(String query) Runs a search query on the web search engine and returns a pretty-string representation of the search results.
      static WebSearchTool from(WebSearchEngine searchEngine) Creates a new WebSearchTool with the specified web search engine.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • searchWeb

         String searchWeb(String query)

        Runs a search query on the web search engine and returns a pretty-string representation of the search results.

        Parameters:
        query - the search user query
        Returns:

        a pretty-string representation of the search results

      • from

         static WebSearchTool from(WebSearchEngine searchEngine)

        Creates a new WebSearchTool with the specified web search engine.

        Parameters:
        searchEngine - the web search engine to use for searching the web
        Returns:

        a new WebSearchTool